Initial release v0.1.0

opencode-power-pack bundles eleven Claude Code skills as an OpenCode plugin
under one config line, with each skill also exposed as a slash command.

Skills (by category):

  Review
    code-review        multi-agent PR review with cross-check pass and
                       concrete reproduction scenarios
    security-review    OWASP-bucketed three-stage filtering with mandatory
                       PoC per finding

  Feature dev
    feature-dev        seven-phase guided workflow
    code-explorer      deep codebase analysis sub-task
    code-architect     decisive architecture blueprint sub-task
    code-reviewer      two-pass adversarial review sub-task

  Design
    frontend-design    distinctive, production-grade UI generation

  Authoring
    mcp-builder        build high-quality MCP servers (Python or TypeScript)
    skill-creator      author new SKILL.md files

  Project memory
    agents-md-improver audit and update AGENTS.md / CLAUDE.md
    agents-md-revise   capture session learnings into the rules file

Architecture:
  - .opencode/plugins/opencode-power-pack.js auto-registers skills/ via
    config.skills.paths.push() (live config singleton modification, pattern
    adapted from obra/superpowers).
  - skills/<name>/SKILL.md hold the workflows the model executes.
  - commands/<name>.md ship physical slash command files that inline the
    full SKILL.md content, so the model receives the actual workflow as
    its prompt rather than a meta-instruction. Symlinked into
    ~/.config/opencode/commands/ during install.

Almost all skill content is ported or translated from upstream Anthropic
projects (claude-code/plugins, skills, claude-code-security-review,
claude-plugins-official). The plugin loader pattern is adapted from
obra/superpowers. See README.md -> Acknowledgments for per-skill
attribution; each SKILL.md frontmatter also carries a license field
naming its specific upstream.
This commit is contained in:
Wayner Barrios
2026-04-26 21:16:17 -04:00
commit b98c1f54e2
28 changed files with 3191 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Personal / private context files
CLAUDE.md
.claude/
.claude.local.md
.agents.local.md
AGENTS.md.local
# Personal memory / notes
memory/
MEMORY.md
*.memory.md
.notes/
NOTES.md
# Local OpenCode state
.opencode/local.json
.opencode/cache/
# Node / Bun
node_modules/
*.log
npm-debug.log*
.npm/
.cache/
# Environment & secrets
.env
.env.*
!.env.example
# OS / editor cruft
.DS_Store
Thumbs.db
*.swp
*.swo
*~
.vscode/
.idea/
+46
View File
@@ -0,0 +1,46 @@
/**
* opencode-power-pack
*
* Auto-registers the bundled skills directory so OpenCode discovers all
* skills shipped by this plugin (code-review, feature-dev, code-explorer,
* code-architect, code-reviewer, security-review, frontend-design,
* mcp-builder, skill-creator, agents-md-improver, agents-md-revise) without
* requiring symlinks or manual config.
*
* Slash commands are NOT registered here on purpose — they are provided by
* physical markdown files under `commands/` in this repo, intended to be
* symlinked into `~/.config/opencode/commands/`. Each command file inlines
* the full SKILL.md content, so the model receives the actual workflow as
* its prompt rather than a meta-instruction telling it to load the skill.
*
* ──── Attribution ────────────────────────────────────────────────────────
*
* The plugin loader pattern (importing fs/path via fileURLToPath, exporting
* an async ctx → hooks function, pushing into config.skills.paths via the
* `config` hook) is adapted directly from Jesse Vincent's superpowers
* plugin: https://github.com/obra/superpowers
*
* The skills under skills/ are ports/translations of artifacts originally
* written by Anthropic for Claude Code. See README.md → Acknowledgments
* and each SKILL.md's `license` frontmatter for the specific upstream of
* each skill.
* ─────────────────────────────────────────────────────────────────────────
*/
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const skillsDir = path.resolve(__dirname, '../../skills');
export const OpencodePowerPack = async () => {
return {
config: async (config) => {
config.skills = config.skills || {};
config.skills.paths = config.skills.paths || [];
if (!config.skills.paths.includes(skillsDir)) {
config.skills.paths.push(skillsDir);
}
},
};
};
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Wayner Barrios
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+442
View File
@@ -0,0 +1,442 @@
<p align="center">
<img src="assets/logo.svg" alt="opencode-power-pack" width="100%" />
</p>
<p align="center">
<i>Eleven Claude Code skills, ported to OpenCode.<br/>
Code review, security audit, feature dev, frontend design, and the rest of the kit — installable in one line.</i>
</p>
<p align="center">
<a href="https://github.com/waybarrios/opencode-power-pack/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square"></a>
<a href="https://github.com/waybarrios/opencode-power-pack/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/waybarrios/opencode-power-pack?style=flat-square&color=FFD60A"></a>
<a href="https://github.com/waybarrios/opencode-power-pack/commits/main"><img alt="Last commit" src="https://img.shields.io/github/last-commit/waybarrios/opencode-power-pack?style=flat-square"></a>
<a href="https://github.com/waybarrios/opencode-power-pack/issues"><img alt="Issues" src="https://img.shields.io/github/issues/waybarrios/opencode-power-pack?style=flat-square"></a>
<img alt="Skills" src="https://img.shields.io/badge/skills-11-FFD60A?style=flat-square&labelColor=0B0F14">
<img alt="OpenCode" src="https://img.shields.io/badge/opencode-compatible-0B0F14?style=flat-square&labelColor=FFD60A">
<img alt="Claude Code compat" src="https://img.shields.io/badge/claude--code-skills_format-D97706?style=flat-square">
</p>
<p align="center">
<a href="#installation"><b>Install</b></a> ·
<a href="#whats-inside"><b>Skills</b></a> ·
<a href="#slash-commands"><b>Commands</b></a> ·
<a href="#how-it-works"><b>How it works</b></a> ·
<a href="#acknowledgments"><b>Credits</b></a> ·
<a href="LICENSE"><b>License</b></a>
</p>
<p align="center">
<i>Built on top of <a href="https://github.com/anthropics/claude-code">anthropics/claude-code</a>,
<a href="https://github.com/anthropics/skills">anthropics/skills</a>,
<a href="https://github.com/anthropics/claude-code-security-review">anthropics/claude-code-security-review</a>,
and <a href="https://github.com/obra/superpowers">obra/superpowers</a>. See <a href="#acknowledgments">Acknowledgments</a>.</i>
</p>
---
## Why this exists
OpenCode reads Claude Code's `SKILL.md` format natively, but **most of Anthropic's official Claude Code plugins put their value in `commands/` and `agents/`** — and those are Claude-Code-only. So if you want `/code-review`, `/security-review`, or `/feature-dev` in OpenCode, copy-paste won't get you there.
This pack does the **translation**: the multi-agent workflows from those plugins are rewritten as OpenCode-compatible skills, so the methodology survives the platform jump. Plus a few direct ports of skills that already lived in Anthropic's `skills/` repo.
It pairs nicely with **[obra/superpowers](https://github.com/obra/superpowers)**, which provides the meta-workflow skills (brainstorming, TDD, executing-plans). This pack adds the domain-specific muscle.
---
## What's inside
<table>
<tr>
<th align="left">Category</th>
<th align="left">Skill</th>
<th align="left">Source</th>
<th align="left">Purpose</th>
</tr>
<tr><td rowspan="2"><b>Review</b></td>
<td><code>code-review</code></td>
<td>translated · plugins/code-review</td>
<td>Multi-agent PR review with confidence-filtered cross-checks and reproduction scenarios</td></tr>
<tr><td><code>security-review</code></td>
<td>translated · claude-code-security-review</td>
<td>OWASP-bucketed, three-stage filtering, requires concrete attack PoC per finding</td></tr>
<tr><td rowspan="4"><b>Feature dev</b></td>
<td><code>feature-dev</code></td>
<td>translated · plugins/feature-dev</td>
<td>Seven-phase guided workflow: discovery → exploration → questions → architecture → impl → review → summary</td></tr>
<tr><td><code>code-explorer</code></td>
<td>translated · feature-dev/agents</td>
<td>Deep codebase analysis sub-task — traces a feature end-to-end</td></tr>
<tr><td><code>code-architect</code></td>
<td>translated · feature-dev/agents</td>
<td>Decisive architecture blueprint sub-task with file-level implementation map</td></tr>
<tr><td><code>code-reviewer</code></td>
<td>translated · feature-dev/agents</td>
<td>Two-pass adversarial review sub-task with explicit edge-case checklist</td></tr>
<tr><td><b>Design</b></td>
<td><code>frontend-design</code></td>
<td>copied · plugins/frontend-design</td>
<td>Distinctive, production-grade UI generation that avoids generic AI aesthetics</td></tr>
<tr><td rowspan="2"><b>Authoring</b></td>
<td><code>mcp-builder</code></td>
<td>copied · skills/mcp-builder</td>
<td>Build high-quality MCP servers (Python or TypeScript)</td></tr>
<tr><td><code>skill-creator</code></td>
<td>adapted · skills/skill-creator</td>
<td>Author new SKILL.md files with progressive-disclosure structure</td></tr>
<tr><td rowspan="2"><b>Project memory</b></td>
<td><code>agents-md-improver</code></td>
<td>adapted · plugins/claude-md-management</td>
<td>Audit and update <code>AGENTS.md</code> / <code>CLAUDE.md</code> against the current codebase</td></tr>
<tr><td><code>agents-md-revise</code></td>
<td>translated · claude-md-management/commands</td>
<td>Capture session learnings into project rules — complement to <code>improver</code></td></tr>
</table>
---
## Installation
### Prerequisites
- **OpenCode** installed and on your PATH. If you do not have it: <https://opencode.ai>
- **git** (used by OpenCode to fetch the plugin)
- **Bun** is bundled with OpenCode, so the plugin's `npm install` step at startup is automatic
### Pick an install method
Two paths that work today; pick whichever fits how you plan to use the pack.
| | **A — Install from GitHub** | **B — Install from a local git clone** |
|---|---|---|
| Best for | Just using the pack | Tinkering, contributing, or running offline |
| Requires | Network during first install | A local clone of the repo |
| Updates | `git pull` + cache clear (the cache holds Bun's checkout) | `git pull` updates everything live; symlinks pick up changes immediately |
| Internet at runtime | Only at first install / on cache miss | Never |
Both methods share **steps 2 (symlink commands) and 3 (restart)**. Only step 1 differs.
---
### A — Install from GitHub
**Step 1A.** Add to `~/.config/opencode/opencode.json`:
```jsonc
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-power-pack@git+https://github.com/waybarrios/opencode-power-pack.git"
]
}
```
If you already use other plugins (e.g. `superpowers`), keep all of them in the array:
```jsonc
{
"plugin": [
"superpowers@git+https://github.com/obra/superpowers.git",
"opencode-power-pack@git+https://github.com/waybarrios/opencode-power-pack.git"
]
}
```
To pin a specific tag (recommended once releases exist):
```jsonc
"opencode-power-pack@git+https://github.com/waybarrios/opencode-power-pack.git#v0.1.0"
```
You still need a local copy of the repo for **step 2** (the slash command files live there). Clone it next to wherever you keep code:
```bash
git clone https://github.com/waybarrios/opencode-power-pack.git ~/code/opencode-power-pack
```
Then jump to **step 2 (symlink commands)** below.
---
### B — Install from a local git clone
This avoids the GitHub round-trip entirely. The plugin lives on your disk, and OpenCode reads it via a `file://` URL.
**Step 1B.1.** Clone the repo wherever you keep code:
```bash
git clone https://github.com/waybarrios/opencode-power-pack.git ~/code/opencode-power-pack
```
If the repo is not yet on GitHub and you only have it locally, skip the clone — just point at the existing directory.
**Step 1B.2.** Add to `~/.config/opencode/opencode.json`, using the **absolute path** to your clone:
```jsonc
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-power-pack@git+file:///Users/you/code/opencode-power-pack"
]
}
```
Notes:
- The `file://` URL needs to be an **absolute path** with three slashes (`file:///Users/...`) and no trailing slash.
- The directory must be a git repo (have a `.git/`). If you copied the files without git, run `git init && git add . && git commit -m init` inside the directory first — Bun's git-style installer requires a real git tree.
- Updating is just `cd ~/code/opencode-power-pack && git pull`, then clear the cache and restart (see [Updating](#updating)).
Then continue to **step 2** below.
### 2. Symlink the slash commands (both methods)
The plugin auto-registers the skills directory programmatically. Slash commands, however, need to live in OpenCode's canonical commands path; the plugin ships physical markdown files under `commands/` for you to symlink in.
```bash
mkdir -p ~/.config/opencode/commands
ln -s ~/code/opencode-power-pack/commands/*.md ~/.config/opencode/commands/
```
Adjust the source path if you cloned somewhere other than `~/code/opencode-power-pack`. If a command of the same name already exists in `~/.config/opencode/commands/`, that file wins — `ln -s` will refuse to overwrite, which is the desired behavior.
If you prefer **copies** over symlinks (e.g. you do not want `git pull` to silently change your commands):
```bash
cp ~/code/opencode-power-pack/commands/*.md ~/.config/opencode/commands/
```
Trade-off: copies are static — you have to re-copy after every `git pull`. Symlinks track the working tree live.
### 3. Restart OpenCode (both methods)
```bash
# kill ALL opencode processes (not just the active TUI)
pkill -f opencode
# clear the npm-style plugin cache so the new version is fetched fresh
rm -rf ~/.cache/opencode/node_modules/opencode-power-pack 2>/dev/null
# start again
opencode
```
### 4. Verify
In a new OpenCode session, run:
```
List the skills you have available.
```
You should see the eleven skills under the `opencode-power-pack:` namespace (or unprefixed, depending on your OpenCode version).
Then hit **`ctrl+p`** to open the command palette and look for any of:
- `code-review`
- `security-review`
- `feature-dev`
- `frontend-design`
- `agents-md-improver`
If they show up, you're done. If not, see [Troubleshooting](#troubleshooting).
---
## Updating
```bash
# 1. Pull the latest skills + commands
cd ~/code/opencode-power-pack
git pull
# 2. If new skills were added, the existing symlinks are unaffected,
# but new commands need to be linked in:
ln -s ~/code/opencode-power-pack/commands/*.md ~/.config/opencode/commands/ 2>/dev/null
# 3. Clear the plugin cache and restart OpenCode
rm -rf ~/.cache/opencode/node_modules/opencode-power-pack
pkill -f opencode
opencode
```
If you pinned a version in `opencode.json` (e.g. `#v0.1.0`), bump the tag in the JSON before restarting, otherwise OpenCode keeps using the pinned commit.
---
## Uninstalling
```bash
# 1. Remove from opencode.json
# delete the "opencode-power-pack@..." line from the "plugin" array
# 2. Remove the symlinked commands
for f in ~/code/opencode-power-pack/commands/*.md; do
rm -f ~/.config/opencode/commands/"$(basename "$f")"
done
# 3. Remove the plugin cache
rm -rf ~/.cache/opencode/node_modules/opencode-power-pack
# 4. Restart OpenCode
pkill -f opencode
opencode
# 5. Optional: delete the local clone
rm -rf ~/code/opencode-power-pack
```
To remove **just one skill** (keeping the rest), delete its symlink only:
```bash
rm ~/.config/opencode/commands/code-review.md
```
The skill itself remains discoverable via the native `skill` tool unless you also remove it from the skills directory, but the slash command will no longer appear.
---
## Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| `/code-review` not in command palette | Symlinks not in `~/.config/opencode/commands/` | Re-run the `ln -s` step from Installation |
| `/code-review` shows the old meta-prompt ("If the skill is not yet loaded, load it via the native skill tool…") | Stale plugin cache from a pre-`v0.1.0` build | `rm -rf ~/.cache/opencode/node_modules/opencode-power-pack && pkill -f opencode && opencode` |
| Skills do not appear when you run "list available skills" | Plugin entry missing or misspelled in `opencode.json` | Validate JSON: `python3 -m json.tool ~/.config/opencode/opencode.json` |
| Plugin install fails with a git error | Bad URL, network issue, or private repo | Check the `git+...` URL works manually: `git ls-remote <url>` |
| Symlink command fails on macOS with permission denied | `~/.config/opencode/commands/` does not exist | `mkdir -p ~/.config/opencode/commands` first |
| Command appears but model "rushes" and gives a one-line answer | Local model not following multi-step instructions | Use a stronger backing model. The skill content is correct; small models may still skim. The skills mark themselves as "expected to take multiple minutes" — bigger models honor that. |
| Want to disable for one project | Project-level override | Add `"plugin": []` (empty) to `<project>/.opencode/opencode.json` |
If none of the above match: `tail -f ~/.cache/opencode/log/*.log` while you start OpenCode and look for plugin-load errors.
---
---
## Slash commands
Each skill is exposed as a slash command. The command body inlines the **full skill workflow**, so the model receives the actual instructions as its prompt — not a meta-instruction telling it to load something else.
```
/code-review Multi-agent PR review with cross-check and reproduction scenarios
/security-review OWASP-bucketed audit with three-stage filtering and PoC requirement
/feature-dev Start the 7-phase guided feature workflow
/code-explorer Trace a feature deeply across the codebase
/code-architect Produce a complete architecture blueprint for a feature
/code-reviewer Two-pass adversarial review of a small change set
/frontend-design Generate a distinctive frontend with a bold aesthetic direction
/mcp-builder Guide MCP server creation
/skill-creator Author a new SKILL.md
/agents-md-improver Audit and improve AGENTS.md / CLAUDE.md
/agents-md-revise Capture session learnings into the rules file
```
### Examples
```
/code-review --comment
/code-review can you review https://github.com/owner/repo/pull/449
/feature-dev add a logout button to the topbar
/security-review
/frontend-design pricing page, brutalist tone, single-screen
/agents-md-improver
```
If you have a command of the same name in `~/.config/opencode/commands/foo.md` or under `command` in `opencode.json`, **your version wins** — the plugin only registers the skill discovery path, never overwrites a command.
---
## How it works
```
┌─────────────────────────── opencode-power-pack ────────────────────────────┐
│ │
│ .opencode/plugins/opencode-power-pack.js │
│ ├── exports OpencodePowerPack(ctx) → { config(c) } │
│ └── pushes skills/ into c.skills.paths (live config singleton) │
│ │
│ skills/<name>/SKILL.md │
│ └── frontmatter: name + description (+ license) │
│ body: the actual workflow the model executes │
│ │
│ commands/<name>.md ──symlink──▶ ~/.config/opencode/commands/ │
│ ├── frontmatter: description (for menu) │
│ └── body: full inlined SKILL.md content + $ARGUMENTS │
│ │
└────────────────────────────────────────────────────────────────────────────┘
```
**Two surfaces, one source of truth.** The skills directory feeds OpenCode's native `skill` tool (so the model can load any skill on demand). The commands directory feeds the slash-command palette (so you can invoke a skill directly with `/<name>`). Both are generated from the same `SKILL.md` files — edit the SKILL.md, regenerate the command file with the script in the repo, and both paths stay in sync.
The plugin entry-point only registers the skills path. Slash commands are **physical files**, not programmatic — this avoids OpenCode's runtime-config caching gotchas and means you can edit, symlink, or selectively delete commands without touching code.
---
## Scope and non-goals
| In scope | Out of scope |
|---|---|
| Porting Claude Code skills where the methodology is portable | Claude Code slash commands ported as Claude-Code-style commands |
| Translating commands and agents into SKILL.md format | Claude Code hooks |
| Direct copies of `anthropics/skills` skills with attribution | Claude Code output styles |
| OpenCode-native slash commands generated from skills | Anything that breaks if you also use Claude Code |
---
## Contributing
Pull requests welcome, especially for:
- New skill ports (Trail of Bits security skills, language-specific packs from `wshobson/agents`, document skills, etc.)
- Improvements to existing skill instructions based on real-world failure modes
- Tooling to keep `commands/*.md` in sync with `skills/*/SKILL.md` automatically
Skill format must follow the OpenCode spec:
- Directory name matches the `name` frontmatter field
- Lowercase alphanumeric with single hyphens, regex `^[a-z0-9]+(-[a-z0-9]+)*$`
- `description` 1–1024 chars, specific enough to trigger correctly
- Body in markdown, ideally under 500 lines
- Cite the upstream source in `license` frontmatter when porting
---
## Acknowledgments
**This package is not original work.** Almost everything in `skills/` is either a direct copy or a translation of skills, commands, or agent definitions written by **Anthropic** for Claude Code, plus one direct adaptation of the OpenCode plugin pattern from **Jesse Vincent (obra)**. The credit belongs to them; this repo's contribution is the *porting and packaging* for OpenCode.
### Upstream sources
| Upstream | Project | What we use from it |
|---|---|---|
| Anthropic | [`anthropics/claude-code/plugins/code-review`](https://github.com/anthropics/claude-code/tree/main/plugins/code-review) | The four-reviewer parallel-review methodology that became `code-review` |
| Anthropic | [`anthropics/claude-code/plugins/feature-dev`](https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev) | The seven-phase workflow and the three sub-agents (`code-explorer`, `code-architect`, `code-reviewer`) |
| Anthropic | [`anthropics/claude-code/plugins/frontend-design`](https://github.com/anthropics/claude-code/tree/main/plugins/frontend-design) | The `frontend-design` skill (direct copy) |
| Anthropic | [`anthropics/claude-code-security-review`](https://github.com/anthropics/claude-code-security-review) | The `/security-review` slash command, translated and extended |
| Anthropic | [`anthropics/skills/skills/mcp-builder`](https://github.com/anthropics/skills/tree/main/skills/mcp-builder) | The `mcp-builder` skill (direct copy, references stripped) |
| Anthropic | [`anthropics/skills/skills/skill-creator`](https://github.com/anthropics/skills/tree/main/skills/skill-creator) | The `skill-creator` skill (adapted, eval-tooling references trimmed) |
| Anthropic | [`anthropics/claude-plugins-official/.../claude-md-management`](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/claude-md-management) | Renamed to `agents-md-improver` and `agents-md-revise`; covers AGENTS.md too |
| Jesse Vincent (obra) | [`obra/superpowers`](https://github.com/obra/superpowers) | The OpenCode plugin pattern (`config.skills.paths.push(...)`) used in `.opencode/plugins/opencode-power-pack.js` |
### What this repo actually contributes
- The translation of Claude-Code-only artifacts (commands and agents) into the SKILL.md format OpenCode reads natively
- Renaming and adapting `claude-md-improver` / `revise-claude-md` to cover both `AGENTS.md` (OpenCode-native) and `CLAUDE.md` (compatibility)
- Deepening the review skills (`code-review`, `code-reviewer`, `security-review`) with extra reviewers, multi-pass adversarial analysis, mandatory category coverage, and concrete-PoC requirements — the originals were already strong; the ports try to compensate for the smaller models people sometimes run under OpenCode by being more directive
- Bundling everything as a one-line OpenCode plugin, plus generating physical slash command files that inline each skill's full content
Each individual SKILL.md frontmatter includes a `license` field naming its specific upstream. The wrapper code (the plugin JS, the README, the LICENSE) is the only original-work portion of this repo.
If you are one of the upstream authors and you'd like the attribution worded differently — or removed — open an issue and we'll fix it.
## License
MIT for the wrapper code and original work in this repo. Each ported skill cites its upstream source in its frontmatter; upstream Anthropic projects are also MIT-licensed. See [LICENSE](LICENSE) for full attribution.
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 360" role="img" aria-label="opencode-power-pack">
<title>opencode-power-pack</title>
<defs>
<linearGradient id="bolt" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#FFE15D"/>
<stop offset="100%" stop-color="#F59E0B"/>
</linearGradient>
<linearGradient id="boltText" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color="#FFE15D"/>
<stop offset="100%" stop-color="#E08E0B"/>
</linearGradient>
<pattern id="scan" width="1" height="3" patternUnits="userSpaceOnUse">
<line x1="0" y1="0" x2="2" y2="0" stroke="#FFFFFF" stroke-opacity="0.035"/>
</pattern>
<filter id="boltGlow" x="-30%" y="-30%" width="160%" height="160%">
<feGaussianBlur stdDeviation="6" result="b"/>
<feMerge>
<feMergeNode in="b"/>
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
</defs>
<!-- background -->
<rect width="1200" height="360" fill="#0B0F14"/>
<rect width="1200" height="360" fill="url(#scan)"/>
<!-- subtle frame: 1px inner border -->
<rect x="14" y="14" width="1172" height="332" fill="none" stroke="#1F2933" stroke-width="1"/>
<!-- pixel-art lightning bolt (Z-shape, 12px pixel size) -->
<!-- coordinate system: 10 cols × 12 rows, each pixel 12×12 -->
<g transform="translate(120, 70)" fill="url(#bolt)" filter="url(#boltGlow)">
<!-- row 0: cols 4-7 -->
<rect x="48" y="0" width="48" height="12"/>
<!-- row 1: cols 3-6 -->
<rect x="36" y="12" width="48" height="12"/>
<!-- row 2: cols 2-5 -->
<rect x="24" y="24" width="48" height="12"/>
<!-- row 3: cols 1-4 -->
<rect x="12" y="36" width="48" height="12"/>
<!-- row 4: cols 0-3 -->
<rect x="0" y="48" width="48" height="12"/>
<!-- row 5: cols 0-9 (the cross/bridge) -->
<rect x="0" y="60" width="120" height="12"/>
<!-- row 6: cols 4-8 -->
<rect x="48" y="72" width="60" height="12"/>
<!-- row 7: cols 3-7 -->
<rect x="36" y="84" width="60" height="12"/>
<!-- row 8: cols 2-6 -->
<rect x="24" y="96" width="60" height="12"/>
<!-- row 9: cols 1-4 -->
<rect x="12" y="108" width="48" height="12"/>
<!-- row 10: cols 1-3 -->
<rect x="12" y="120" width="36" height="12"/>
<!-- row 11: cols 1-2 -->
<rect x="12" y="132" width="24" height="12"/>
</g>
<!-- Wordmark -->
<g font-family="ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace" font-weight="800">
<!-- top line: opencode -->
<text x="320" y="158" fill="#E8E6E3" font-size="76" letter-spacing="-2">opencode</text>
<!-- bottom line: POWER PACK -->
<text x="320" y="240" fill="url(#boltText)" font-size="76" letter-spacing="6">POWER PACK</text>
<!-- tagline -->
<text x="320" y="282" fill="#7B8794" font-size="16" letter-spacing="4" font-weight="600">
ELEVEN SKILLS · OPENCODE
</text>
</g>
<!-- bottom-right voltage stamp -->
<g transform="translate(1050, 290)" font-family="ui-monospace, monospace">
<rect x="0" y="0" width="124" height="36" fill="none" stroke="#FFE15D" stroke-width="1.25"/>
<text x="62" y="24" font-size="14" font-weight="800" fill="#FFE15D" text-anchor="middle" letter-spacing="3">v0.1.0</text>
</g>
<!-- top-left registry mark -->
<g transform="translate(40, 40)" font-family="ui-monospace, monospace">
<text x="0" y="14" font-size="11" font-weight="700" fill="#3D4A57" letter-spacing="3">[ MIT · 2026 · WAYBARRIOS ]</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

+181
View File
@@ -0,0 +1,181 @@
---
description: Audit and improve project-rules files (AGENTS.md, CLAUDE.md, .agents/instructions, etc.) in repositories. Use when the user asks to check, audit, update, improve, or fix their AGENTS.md or CLAUDE.md,
---
# AGENTS.md / CLAUDE.md Improver
Audit, evaluate, and improve project-rules files across a codebase to ensure the agent has optimal project context.
OpenCode reads project rules from several files in a priority order: **`AGENTS.md`** (native), then **`CLAUDE.md`** (Claude Code compatibility), then `.agents/instructions.md`. This skill works on whichever your project uses, but treats `AGENTS.md` as the canonical name when creating new files.
**This skill can write to project-rules files.** After presenting a quality report and getting user approval, it updates the files with targeted improvements.
## Workflow
### Phase 1: Discovery
Find all relevant files in the repository:
```bash
find . \( -name "AGENTS.md" -o -name "CLAUDE.md" -o -name ".claude.local.md" -o -name ".agents.local.md" \) 2>/dev/null | head -50
```
**File types and locations:**
| Type | Location | Purpose |
|------|----------|---------|
| Project root (OpenCode native) | `./AGENTS.md` | Primary project context (committed, shared) |
| Project root (Claude compat) | `./CLAUDE.md` | Same purpose; OpenCode reads it as fallback |
| Local overrides | `./.agents.local.md` or `./.claude.local.md` | Personal/local settings (gitignored) |
| Global defaults | `~/.config/opencode/AGENTS.md` or `~/.claude/CLAUDE.md` | User-wide defaults |
| Package-specific | `./packages/*/AGENTS.md` | Module-level context in monorepos |
| Subdirectory | Any nested location | Feature/domain-specific context |
OpenCode walks up from the working directory toward the git root, loading any matching rules files along the way, so monorepos and nested projects work automatically.
### Phase 2: Quality assessment
For each rules file, evaluate against the criteria below.
**Quick assessment checklist:**
| Criterion | Weight | Check |
|-----------|--------|-------|
| Commands / workflows documented | High | Are build / test / deploy commands present? |
| Architecture clarity | High | Can the agent understand the codebase structure? |
| Non-obvious patterns | Medium | Are gotchas and quirks documented? |
| Conciseness | Medium | No verbose explanations or obvious info? |
| Currency | High | Does it reflect the current codebase state? |
| Actionability | High | Are instructions executable, not vague? |
**Quality scores:**
- **A (90–100)** — Comprehensive, current, actionable.
- **B (70–89)** — Good coverage, minor gaps.
- **C (50–69)** — Basic info, missing key sections.
- **D (30–49)** — Sparse or outdated.
- **F (0–29)** — Missing or severely outdated.
### Phase 3: Quality-report output
**Always output the quality report BEFORE making any updates.**
Format:
```
## Project-Rules Quality Report
### Summary
- Files found: X
- Average score: X/100
- Files needing update: X
### File-by-File Assessment
#### 1. ./AGENTS.md (Project Root)
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands / workflows | X/20 | ... |
| Architecture clarity | X/20 | ... |
| Non-obvious patterns | X/15 | ... |
| Conciseness | X/15 | ... |
| Currency | X/15 | ... |
| Actionability | X/15 | ... |
**Issues:**
- [List specific problems]
**Recommended additions:**
- [List what should be added]
#### 2. ./packages/api/AGENTS.md (Package-specific)
...
```
### Phase 4: Targeted updates
After the quality report, ask the user for confirmation before updating.
**Update guidelines (critical):**
1. **Propose targeted additions only.** Focus on genuinely useful info:
- Commands or workflows discovered during analysis
- Gotchas or non-obvious patterns found in code
- Package relationships that were unclear
- Testing approaches that work
- Configuration quirks
2. **Keep it minimal.** Avoid:
- Restating what is obvious from the code
- Generic best practices already covered
- One-off fixes unlikely to recur
- Verbose explanations when a one-liner suffices
3. **Show diffs.** For each change, show:
- Which file to update
- The specific addition (diff or quoted block)
- A brief explanation of why this helps future sessions
**Diff format:**
````markdown
### Update: ./AGENTS.md
**Why:** Build command was missing, causing confusion about how to run the project.
```diff
+ ## Quick Start
+
+ ```bash
+ npm install
+ npm run dev # Start development server on port 3000
+ ```
```
````
### Phase 5: Apply updates
After user approval, apply changes using the editor tool. Preserve the existing content structure; only add what was approved.
## Common issues to flag
1. **Stale commands** — build commands that no longer work.
2. **Missing dependencies** — required tools not mentioned.
3. **Outdated architecture** — file structure that has changed.
4. **Missing environment setup** — required env vars or config.
5. **Broken test commands** — test scripts that have changed.
6. **Undocumented gotchas** — non-obvious patterns not captured.
## What makes a great rules file
**Key principles:**
- Concise and human-readable.
- Actionable commands that can be copy-pasted.
- Project-specific patterns, not generic advice.
- Non-obvious gotchas and warnings.
**Recommended sections** (use only what is relevant):
- Commands (build, test, dev, lint)
- Architecture (directory structure)
- Key files (entry points, config)
- Code style (project conventions)
- Environment (required vars, setup)
- Testing (commands, patterns)
- Gotchas (quirks, common mistakes)
- Workflow (when to do what)
## Tips to share with the user
- **Keep it concise** — the rules file is part of the prompt, so brevity matters. Dense is better than verbose.
- **Actionable commands** — all documented commands should be copy-paste ready.
- **Use a `.local` override** — for personal preferences not shared with the team (add to `.gitignore`).
- **Global defaults** — put user-wide preferences in `~/.config/opencode/AGENTS.md` (or `~/.claude/CLAUDE.md`).
- **Prefer `AGENTS.md`** — when creating a new rules file, use `AGENTS.md`. OpenCode reads it natively and Claude Code reads it via fallback. If a `CLAUDE.md` already exists, leave it; OpenCode reads it via the compatibility layer.
---
**User arguments:** $ARGUMENTS
+94
View File
@@ -0,0 +1,94 @@
---
description: Capture learnings from the current session into the project-rules file (AGENTS.md, CLAUDE.md, or local override) so future sessions benefit. Use when the user says "revise the rules", "update AGENTS.m
---
# AGENTS.md / CLAUDE.md Revise
Review the current session for learnings about working in this codebase, then update the project-rules file with context that would help future sessions be more effective.
OpenCode reads project rules from `AGENTS.md` (native) or `CLAUDE.md` (Claude Code compatibility). When this skill creates a new file, prefer `AGENTS.md`. When updating an existing file, edit whichever the project already uses.
## Step 1 — Reflect
Look back over the session and identify what context was missing that would have helped the agent work more effectively. Examples:
- Bash commands that were used or discovered
- Code-style patterns followed
- Testing approaches that worked
- Environment / configuration quirks
- Warnings or gotchas encountered
- Build steps that surprised you
- Tool versions that mattered
- Project-specific conventions that took time to figure out
Be selective. Only capture things that:
1. Will recur in future sessions (not one-off fixes).
2. Would have saved time if known up front.
3. Cannot be derived by reading the code.
## Step 2 — Find rules files
```bash
find . \( -name "AGENTS.md" -o -name "CLAUDE.md" -o -name ".agents.local.md" -o -name ".claude.local.md" \) 2>/dev/null | head -20
```
Decide where each addition belongs:
- **`AGENTS.md` / `CLAUDE.md`** — team-shared, committed to git. Use for project-wide conventions, build commands, architectural notes.
- **`.agents.local.md` / `.claude.local.md`** — personal / local only, gitignored. Use for personal preferences that should not affect teammates.
If no rules file exists yet, propose creating `AGENTS.md` at the project root.
## Step 3 — Draft additions
**Keep it concise.** The rules file is part of every prompt, so brevity matters. One line per concept when possible.
Format: `<command or pattern> — <brief description>`
**Avoid:**
- Verbose explanations
- Obvious information that any reader of the code would already know
- One-off fixes unlikely to recur
- Restating what is already documented elsewhere in the rules file
**Prefer:**
- Imperative commands ("Run `pnpm i --frozen-lockfile` after pulling")
- Concrete gotchas ("The `dev` script binds to port 3000 — kill any other process on that port first")
- Project-specific patterns ("All dates are stored in UTC; convert at the boundary")
## Step 4 — Show proposed changes
For each addition, show the user the diff before applying. Format:
````markdown
### Update: ./AGENTS.md
**Why:** [one-line reason this matters for future sessions]
```diff
+ [the addition — keep it brief]
```
````
If multiple additions go to the same file, group them under one header so the user can review the whole change in one view.
## Step 5 — Apply with approval
Ask the user explicitly: *"Apply these changes?"* Edit only files they approve.
Preserve the existing structure. Place additions in the most relevant section (e.g., a new build command goes under "Commands" if that section exists). If no obvious section fits, create one with a clear header.
If the user rejects an addition, do not retry it in the same session — they may have a reason. Move on.
## Notes
- This skill **writes** to project files. Always show the diff first and wait for approval.
- Pair this skill with `agents-md-improver` for the full maintenance loop: improver audits and identifies gaps; this one captures fresh session-specific learnings.
- Do not include sensitive information (API keys, tokens, internal URLs) in committed rules files. Put those in `.agents.local.md` / `.claude.local.md` or in environment variables.
---
**User arguments:** $ARGUMENTS
+49
View File
@@ -0,0 +1,49 @@
---
description: Design a feature architecture by analyzing existing codebase patterns and conventions, then provide a comprehensive implementation blueprint with specific files to create or modify, component designs,
---
# Code Architect
You are a senior software architect who delivers comprehensive, actionable architecture blueprints by deeply understanding codebases and making confident architectural decisions.
## Core process
### 1. Codebase pattern analysis
Extract existing patterns, conventions, and architectural decisions. Identify:
- The technology stack
- Module boundaries and abstraction layers
- Project guidelines (`CLAUDE.md` / `AGENTS.md`)
- Similar features already implemented — how were they structured?
- Key abstractions the codebase already provides
### 2. Architecture design
Based on patterns found, design the complete feature architecture:
- Make decisive choices. Pick one approach and commit to it.
- Ensure seamless integration with existing code.
- Design for testability, performance, and maintainability.
### 3. Complete implementation blueprint
Specify every file to create or modify, component responsibilities, integration points, and data flow. Break the implementation into clear phases.
## Output
Deliver a decisive, complete architecture blueprint. Include:
- **Patterns & conventions found** — list existing patterns with `file:line` references, similar features, and key abstractions to leverage.
- **Architecture decision** — your chosen approach with rationale and trade-offs.
- **Component design** — each component with its file path, responsibilities, dependencies, and interfaces.
- **Implementation map** — specific files to create or modify, with detailed change descriptions.
- **Data flow** — complete flow from entry points through transformations to outputs.
- **Build sequence** — phased implementation steps as a checklist.
- **Critical details** — error handling, state management, testing approach, performance, security.
Make confident architectural choices. Be specific and actionable: provide file paths, function names, and concrete steps. Avoid presenting multiple equally-weighted options unless the user specifically asked for trade-off analysis.
---
**User arguments:** $ARGUMENTS
+58
View File
@@ -0,0 +1,58 @@
---
description: Deeply analyze an existing codebase feature by tracing execution paths, mapping architecture layers, understanding patterns and abstractions, and documenting dependencies. Use this skill when you need
---
# Code Explorer
You are an expert code analyst specializing in tracing and understanding feature implementations across codebases.
## Core mission
Provide a complete understanding of how a specific feature works by tracing its implementation from entry points to data storage, through all abstraction layers.
## Analysis approach
### 1. Feature discovery
- Find entry points: APIs, UI components, CLI commands.
- Locate core implementation files.
- Map feature boundaries and configuration surface.
### 2. Code-flow tracing
- Follow call chains from entry to output.
- Trace data transformations at each step.
- Identify all dependencies and integrations.
- Document state changes and side effects.
### 3. Architecture analysis
- Map abstraction layers: presentation → business logic → data.
- Identify design patterns and architectural decisions.
- Document interfaces between components.
- Note cross-cutting concerns: auth, logging, caching, observability.
### 4. Implementation details
- Key algorithms and data structures.
- Error handling and edge cases.
- Performance considerations.
- Technical debt or improvement areas.
## Output
Deliver a comprehensive analysis that helps developers understand the feature deeply enough to modify or extend it. Always include:
- **Entry points** with `file:line` references
- **Step-by-step execution flow** with data transformations
- **Key components** and their responsibilities
- **Architecture insights** — patterns, layers, design decisions
- **Dependencies** — internal and external
- **Observations** about strengths, issues, or opportunities
- **Essential files list** — the files a developer absolutely must read to understand this topic
Structure the response for maximum clarity and usefulness. Always cite specific file paths and line numbers.
---
**User arguments:** $ARGUMENTS
+138
View File
@@ -0,0 +1,138 @@
---
description: Review a pull request or a set of code changes for bugs, logic errors, and project-convention violations using a confidence-filtered, multi-agent process. Use this skill when the user asks to review a
---
# Code Review
Provide a high-signal code review for a pull request or set of pending changes. The goal is to surface only issues that are clearly real and actionable, while filtering out noise, nitpicks, and false positives.
## When to use this skill
Trigger on phrases like "review this PR", "code review", "check my diff", "audit the pending changes on this branch", or when the user asks for a security/quality pass before merging.
## High-level process
Follow these steps in order. Use OpenCode's parallel sub-task dispatch where the original Claude Code workflow used parallel agents.
### 1. Pre-flight check
Before doing any review work, verify the PR (or change set) is worth reviewing. Skip the review and stop early if any of the following hold:
- The PR is closed
- The PR is a draft
- The change is trivial (single-line typo, formatting, automated dependency bump) and obviously correct
- A previous review by the agent already exists on this PR
Use `gh pr view <PR>` (or the local `git diff` for non-PR review) to gather state.
### 2. Identify project conventions
Build a list of all project-convention files relevant to the change:
- The repository root `CLAUDE.md` / `AGENTS.md` (whichever exists)
- Any nested `CLAUDE.md` / `AGENTS.md` in directories containing modified files
You only need the file paths at this stage, not the contents.
### 3. Summarize the change
Read `gh pr view --json title,body` and `gh pr diff` (or `git diff`) and produce a one-paragraph summary of what the PR is doing and why. This grounds the rest of the review.
### 4. Parallel issue detection (deep mode)
Dispatch **seven independent reviewers** in parallel. Each returns a list of candidate issues, where each issue includes a description, a reason category, an initial confidence (0–100), and a one-sentence failure scenario explaining how this would manifest in practice.
- **Reviewer 1 + Reviewer 2 — Convention compliance.** Audit the diff against the relevant `CLAUDE.md` / `AGENTS.md` rules. Only consider rule files that apply to the file being reviewed (same path or ancestor directory). Quote the exact rule being violated.
- **Reviewer 3 — Diff-only bug scan.** Scan the diff for obvious bugs without reading surrounding files. Flag only clear issues that do not need unseen context.
- **Reviewer 4 — Deep-context bug scan.** Read the **full file(s)** for each changed function, not just the diff hunks. Trace data flow into and out of the changed code. Flag bugs that depend on context the diff alone does not show (e.g., callers that pass `None`, shared state mutated elsewhere, lock ordering across files).
- **Reviewer 5 — Concurrency, ordering & state.** Race conditions, time-of-check-time-of-use, cache invalidation, idempotency, retry safety, ordering guarantees. Especially important in PRs that touch caches, queues, locks, or any shared mutable state.
- **Reviewer 6 — Error handling & edge cases.** What happens on empty input, max input, partial failure, downstream errors, network timeouts, malformed data? Is failure logged, swallowed, or propagated? Are exceptions caught at the right layer?
- **Reviewer 7 — Test coverage gap.** What scenarios in the changed code are *not* covered by existing tests? List them concretely (no generic "needs more tests"). Especially flag changed branches with no test exercising them.
Each reviewer must receive the PR title, description, and the relevant project rules. Take the time to read the actual files; do not rely on the diff alone for reviewers 4–7.
**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag:
- Code that will fail to compile or parse (syntax, type errors, missing imports)
- Code that will definitely produce wrong results regardless of inputs
- Clear, unambiguous convention violations (must quote the exact rule)
- Concrete edge cases that are reachable in production with a specific trigger
**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag:
- Code that will fail to compile or parse (syntax, type errors, missing imports)
- Code that will definitely produce wrong results regardless of inputs
- Clear, unambiguous convention violations (must quote the exact rule)
Do NOT flag:
- Style or quality concerns that aren't in the project rules
- Potential issues that depend on specific runtime state or inputs
- Subjective suggestions
- Anything a linter would catch — you are not the linter
- Pre-existing issues
- Issues silenced via lint-ignore comments
When uncertain, do not flag. False positives erode trust.
### 5. Cross-check pass
Before validation, dispatch a **second-pass reviewer** that explicitly tries to **break** each candidate finding:
- For each candidate, ask: "What is the strongest argument this is *not* a real issue?" Write that argument out.
- If the strongest counter-argument holds, drop the finding before validation (it is likely a false positive).
- If the candidate survives, keep it for validation in step 6.
This pass exists to catch the failure mode of "looks suspicious but is actually correct in this codebase".
### 6. Validate each surviving issue
For each candidate from step 5, dispatch a validator sub-task. Give it the PR title, description, the exact issue description, and the failure scenario. Its job is to verify with high confidence that the issue is real:
- For "variable not defined" → verify it is actually undefined in the relevant scope by reading the imports and surrounding code.
- For convention violations → verify the rule applies to the file's path and is genuinely violated. Quote the rule.
- For concurrency / state issues → trace the state through at least two callers and confirm the unsafe interleaving is reachable.
- For edge cases → identify the specific input or condition that triggers the failure.
For each validated issue, the validator must produce:
1. A re-stated confidence score (0–100). Drop anything below 80.
2. A 1–3 line **reproduction scenario**: concrete inputs or conditions that trigger the failure.
3. A pointer to the smallest test that would have caught this (if no such test exists, that goes in the suggested fix).
Drop any issue the validator cannot confirm with confidence ≥ 80 *and* a concrete reproduction scenario.
### 7. Output
Output a summary to the terminal. For each validated issue include:
- File path and line number
- Severity (Critical / Important)
- Confidence (0–100)
- One-sentence problem statement
- 1–3 line reproduction scenario from step 6
- Concrete fix suggestion (or path to add a missing test)
- The exact rule or bug category
Group by severity. If no issues were validated, output exactly: `No issues found. Checked for bugs, edge cases, concurrency, and project-convention compliance.`
This review is expected to take multiple minutes when run on a non-trivial PR. Quality and concrete reproduction scenarios are the deliverable; if you find yourself finishing in seconds, you have skipped steps 4–6.
### 8. Optional GitHub posting
If the user invoked the review with a `--comment` style instruction (i.e. "post the review on the PR"):
- If no issues found, post the summary as a single PR comment via `gh pr comment`
- If issues found, post one inline comment per issue using the GitHub inline-comment API. Do not duplicate comments. Include a link to the relevant code with the format:
```
https://github.com/<owner>/<repo>/blob/<full-sha>/<path>#L<start>-L<end>
```
Always provide the full SHA (no shell substitution), include 1+ line of context above and below, and use `L<start>-L<end>` format.
For small, self-contained fixes, include a committable suggestion block. For larger fixes (6+ lines, multi-location, or structural), describe the issue and suggested fix without a suggestion block. Never post a committable suggestion unless committing it fixes the issue entirely.
## Notes
- Use `gh` CLI for all GitHub interactions; do not use web fetch
- Keep a todo list for the steps above
- Cite each issue with a link when posting
---
**User arguments:** $ARGUMENTS
+115
View File
@@ -0,0 +1,115 @@
---
description: Review code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly
---
# Code Reviewer
You are an expert code reviewer specializing in modern software development across multiple languages and frameworks. Your primary responsibility is to review code against project guidelines (typically `CLAUDE.md` or `AGENTS.md`) with high precision to minimize false positives.
## Scope
By default, review unstaged changes from `git diff`. The user may specify different files, a commit range, or a specific function to review.
## Required reading depth
Do not review from the diff alone. For each function or class touched by the change:
1. Read the **entire file** containing it, not just the changed hunks.
2. Identify and read at least **one caller** of the changed code (search with grep / glob for call sites).
3. If the change touches shared state (caches, globals, locks, queues, modules with module-level data), trace at least one path that mutates and one path that reads that state.
This reading is the input to the analysis below. Skipping it is the most common cause of both false positives and missed bugs.
## Core review responsibilities
### Project-guidelines compliance
Verify adherence to explicit project rules:
- Import patterns
- Framework conventions
- Language-specific style
- Function declarations
- Error handling and logging conventions
- Testing practices
- Platform compatibility
- Naming conventions
### Bug detection
Identify actual bugs that will impact functionality:
- Logic errors
- Null / undefined handling
- Race conditions
- Memory leaks
- Security vulnerabilities
- Performance problems
### Code quality
Evaluate significant issues:
- Code duplication
- Missing critical error handling
- Accessibility problems
- Inadequate test coverage
## Multi-pass analysis
Do **two analysis passes**, not one. The first pass is broad; the second pass is adversarial.
### Pass 1 — Broad scan
Walk through every changed function and check it against the four review categories above (project-guidelines compliance, bug detection, code quality, edge cases). Produce a candidate list with initial confidence scores.
### Pass 2 — Adversarial / edge-case pass
For every candidate from pass 1, AND for every changed function regardless of whether it raised a flag in pass 1, ask the following questions explicitly. Each one should produce either a "no issue here" line or a new candidate.
- What happens with empty / `None` / zero-length input?
- What happens with the maximum input size or boundary value?
- What happens if a downstream call fails or times out?
- Is there shared mutable state? Can two callers race?
- Does the cache (or memoization, or singleton) invalidate on every relevant change, or only some? Could it serve a stale value?
- Is there a comparison or check that uses a length, count, or hash where the underlying values can change while preserving that key? (Common cache-invalidation bug pattern.)
- For each new branch, is there a test that exercises it? If not, that is a candidate.
- Could an exception silently swallow a real failure?
For every candidate from either pass, write a one-sentence **reproduction scenario** that names a concrete input or condition triggering the failure. If you cannot write one, drop the candidate before scoring.
## Confidence scoring
Rate each potential issue on 0–100:
- **0** — Not confident at all. False positive, or pre-existing.
- **25** — Somewhat confident. Might be real, might be a false positive. If stylistic and not in project rules, lower.
- **50** — Moderately confident. Real issue, but possibly a nitpick or rare in practice. Not very important relative to the rest of the changes.
- **75** — Highly confident. Verified twice. Likely to be hit in practice. The existing approach is insufficient. Important and impacts functionality, or directly mentioned in project guidelines.
- **100** — Absolutely certain. Confirmed this will happen frequently. Direct evidence.
**Only report issues with confidence ≥ 80.** Quality over quantity.
## Output
Start by stating clearly what you are reviewing (files, scope, branch).
For each high-confidence issue, provide:
- Clear description with confidence score
- File path and line number
- Specific project-guideline reference or bug explanation
- **Reproduction scenario** from the multi-pass analysis (concrete inputs or conditions that trigger the failure)
- Concrete fix suggestion (and where to add a test if none exists)
Group issues by severity (Critical vs. Important).
If no high-confidence issues exist, confirm the code meets standards with a brief summary that lists the four categories you checked and the multi-pass questions you asked.
Structure the response for maximum actionability. The developer should know exactly what to fix and why.
A thorough review of a non-trivial change set will take multiple minutes. If you finish in under a minute on a non-trivial PR, you have skipped the required reading depth or the multi-pass analysis. Do not rush.
---
**User arguments:** $ARGUMENTS
+101
View File
@@ -0,0 +1,101 @@
---
description: Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when t
---
# Feature Development
Help a developer implement a new feature systematically. Understand the codebase deeply, identify and ask about underspecified details, design elegant architectures, then implement.
## Core principles
- **Ask clarifying questions** — Identify ambiguities, edge cases, and underspecified behaviors. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding.
- **Understand before acting** — Read and comprehend existing code patterns first.
- **Read files identified by sub-tasks** — When dispatching code-explorer sub-tasks, ask them to return lists of the most important files to read. After they complete, read those files yourself to build detailed context.
- **Simple and elegant** — Prioritize readable, maintainable, architecturally sound code.
- **Track progress** — Use a todo list throughout.
## Phase 1: Discovery
Goal: Understand what needs to be built.
1. Create a todo list covering all seven phases.
2. If the feature is unclear, ask the user:
- What problem are they solving?
- What should the feature do?
- Any constraints or requirements?
3. Summarize your understanding and confirm with the user before proceeding.
## Phase 2: Codebase exploration
Goal: Understand relevant existing code at both high and low levels.
1. Dispatch 2–3 `code-explorer` sub-tasks in parallel. Each should:
- Trace through the code comprehensively, focusing on abstractions, architecture, and control flow.
- Target a different aspect (similar features, high-level architecture, UX, extension points).
- Return a list of 5–10 key files to read.
2. After they return, read every file they identified to build deep understanding.
3. Present a comprehensive summary of findings and patterns to the user.
## Phase 3: Clarifying questions
Goal: Fill gaps and resolve ambiguities before designing.
**This is one of the most important phases. Do not skip.**
1. Review the codebase findings and the original feature request.
2. Identify underspecified aspects: edge cases, error handling, integration points, scope boundaries, design preferences, backward compatibility, performance.
3. Present all questions to the user as a clear, organized list.
4. **Wait for answers** before moving to architecture.
If the user says "whatever you think is best", make your recommendation explicit and get confirmation.
## Phase 4: Architecture design
Goal: Design multiple implementation approaches with different trade-offs.
1. Dispatch 2–3 `code-architect` sub-tasks in parallel, each with a different focus:
- **Minimal changes** — smallest diff, maximum reuse of existing code.
- **Clean architecture** — maintainability, elegant abstractions.
- **Pragmatic balance** — speed plus quality.
2. Review all approaches and form an opinion on which fits best for this task. Consider scope (small fix vs. large feature), urgency, complexity, and team context.
3. Present to the user: a brief summary of each approach, a trade-offs comparison, your recommendation with reasoning, and concrete differences in implementation.
4. **Ask the user which approach they prefer.**
## Phase 5: Implementation
Goal: Build the feature.
**Do not start without explicit user approval.**
1. Wait for approval.
2. Re-read all relevant files identified earlier.
3. Implement following the chosen architecture.
4. Strictly follow codebase conventions (naming, style, error-handling patterns).
5. Update todos as you progress.
## Phase 6: Quality review
Goal: Ensure the code is simple, DRY, elegant, readable, and correct.
1. Dispatch 3 `code-reviewer` sub-tasks in parallel, each with a different focus:
- Simplicity / DRY / elegance
- Bugs / functional correctness
- Project conventions and abstractions
2. Consolidate findings and rank issues by severity.
3. Present findings to the user and ask what they want to do (fix now, fix later, proceed as-is).
4. Address issues based on their decision.
## Phase 7: Summary
Goal: Document what was accomplished.
1. Mark all todos complete.
2. Summarize:
- What was built
- Key decisions made
- Files modified
- Suggested next steps
---
**User arguments:** $ARGUMENTS
+47
View File
@@ -0,0 +1,47 @@
---
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
## Design Thinking
Before coding, understand the context and commit to a BOLD aesthetic direction:
- **Purpose**: What problem does this interface solve? Who uses it?
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
- **Constraints**: Technical requirements (framework, performance, accessibility).
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
- Production-grade and functional
- Visually striking and memorable
- Cohesive with a clear aesthetic point-of-view
- Meticulously refined in every detail
## Frontend Aesthetics Guidelines
Focus on:
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
Remember: the model is capable of extraordinary creative work. Don't hold back; show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
---
**User arguments:** $ARGUMENTS
+143
View File
@@ -0,0 +1,143 @@
---
description: Guide the creation of high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when the user wants to build an MCP server
---
## Overview
Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.
## High-level workflow
Creating a high-quality MCP server involves four main phases.
### Phase 1: Deep research and planning
#### 1.1 Understand modern MCP design
**API coverage vs. workflow tools:** Balance comprehensive API endpoint coverage with specialized workflow tools. Workflow tools can be more convenient for specific tasks, while comprehensive coverage gives agents flexibility to compose operations. Performance varies by client — some clients benefit from code execution that combines basic tools, while others work better with higher-level workflows. When uncertain, prioritize comprehensive API coverage.
**Tool naming and discoverability:** Clear, descriptive tool names help agents find the right tools quickly. Use consistent prefixes (e.g., `github_create_issue`, `github_list_repos`) and action-oriented naming.
**Context management:** Agents benefit from concise tool descriptions and the ability to filter / paginate results. Design tools that return focused, relevant data. Some clients support code execution which can help agents filter and process data efficiently.
**Actionable error messages:** Error messages should guide agents toward solutions with specific suggestions and next steps.
#### 1.2 Study MCP protocol documentation
Start with the sitemap to find relevant pages: `https://modelcontextprotocol.io/sitemap.xml`. Then fetch specific pages with `.md` suffix for markdown format, e.g. `https://modelcontextprotocol.io/specification/draft.md`.
Key pages:
- Specification overview and architecture
- Transport mechanisms (streamable HTTP, stdio)
- Tool, resource, and prompt definitions
#### 1.3 Study framework documentation
**Recommended stack:**
- **Language**: TypeScript (high-quality SDK support, broad compatibility, models generate it well due to static typing and good linting).
- **Transport**: Streamable HTTP for remote servers using stateless JSON; stdio for local servers.
For TypeScript: load `https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md`.
For Python: load `https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md`.
#### 1.4 Plan the implementation
- **Understand the API:** review the service's API documentation to identify key endpoints, authentication requirements, and data models.
- **Tool selection:** prioritize comprehensive API coverage. List endpoints to implement, starting with the most common operations.
### Phase 2: Implementation
#### 2.1 Set up project structure
Standard layout for both languages includes a server entry point, a tools module, an API client utility, and a schema definition file.
#### 2.2 Implement core infrastructure
Shared utilities to build first:
- API client with authentication
- Error-handling helpers
- Response formatting (JSON / Markdown)
- Pagination support
#### 2.3 Implement tools
For each tool:
**Input schema:** use Zod (TypeScript) or Pydantic (Python). Include constraints and clear descriptions. Add examples in field descriptions.
**Output schema:** define `outputSchema` where possible for structured data. Use `structuredContent` in tool responses (TypeScript SDK feature). This helps clients understand and process tool outputs.
**Tool description:** concise summary of functionality, parameter descriptions, return-type schema.
**Implementation:** async/await for I/O. Proper error handling with actionable messages. Pagination where applicable. Return both text content and structured data when using modern SDKs.
**Annotations:**
- `readOnlyHint`: true / false
- `destructiveHint`: true / false
- `idempotentHint`: true / false
- `openWorldHint`: true / false
### Phase 3: Review and test
#### 3.1 Code quality
Review for: no duplicated code (DRY), consistent error handling, full type coverage, clear tool descriptions.
#### 3.2 Build and test
**TypeScript:** `npm run build` to verify compilation. Test with the MCP Inspector: `npx @modelcontextprotocol/inspector`.
**Python:** verify syntax with `python -m py_compile your_server.py`. Test with the MCP Inspector.
### Phase 4: Create evaluations
After implementing the server, create evaluations to test its effectiveness with real LLM agents.
#### 4.1 Purpose
Evaluations test whether LLMs can effectively use the MCP server to answer realistic, complex questions.
#### 4.2 Create 10 evaluation questions
1. **Tool inspection** — list available tools and understand their capabilities.
2. **Content exploration** — use READ-ONLY operations to explore available data.
3. **Question generation** — create 10 complex, realistic questions.
4. **Answer verification** — solve each question yourself to verify answers.
#### 4.3 Evaluation requirements
Each question must be:
- **Independent** — not dependent on other questions.
- **Read-only** — only non-destructive operations required.
- **Complex** — requiring multiple tool calls and deep exploration.
- **Realistic** — based on real use cases humans care about.
- **Verifiable** — single, clear answer that can be string-compared.
- **Stable** — the answer will not change over time.
#### 4.4 Output format
Create an XML file with this structure:
```xml
<evaluation>
<qa_pair>
<question>Find discussions about AI model launches with animal codenames. One model needed a specific safety designation that uses the format ASL-X. What number X was being determined for the model named after a spotted wild cat?</question>
<answer>3</answer>
</qa_pair>
<!-- More qa_pairs... -->
</evaluation>
```
## Notes
This is a port of the upstream `mcp-builder` skill from `anthropics/skills`. The original ships bundled reference files (`reference/mcp_best_practices.md`, `reference/node_mcp_server.md`, `reference/python_mcp_server.md`, `reference/evaluation.md`) which are not included in this port. When you need deeper detail, fetch them directly from <https://github.com/anthropics/skills/tree/main/skills/mcp-builder/reference>.
---
**User arguments:** $ARGUMENTS
+195
View File
@@ -0,0 +1,195 @@
---
description: Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging. This is NOT a general code review.
---
# Security Review
You are a senior security engineer conducting a focused security review of the changes on a git branch. The goal is to identify HIGH-CONFIDENCE security vulnerabilities that could have real exploitation potential, while ruthlessly avoiding false positives.
## When to use this skill
Trigger on phrases like "security review", "security audit", "check for vulnerabilities", "vuln scan on this branch", or when the user asks to review pending changes specifically for security implications.
This is **not** a general code review skill. Use the `code-review` skill for general PR review. Use this one only when the user is asking specifically about security.
## Gather context
Before any analysis, run these commands to understand the change set:
```bash
git status
git diff --name-only origin/HEAD...
git log --no-decorate origin/HEAD...
git diff --merge-base origin/HEAD
```
If any command fails (no `origin/HEAD`, not a git repo, no commits ahead of base), stop and report what is missing rather than fabricating results.
## Objective
Perform a security-focused code review to identify HIGH-CONFIDENCE security vulnerabilities introduced by the changes. Focus only on security implications **newly added** by this branch. Do not comment on pre-existing security concerns.
## Critical rules
1. **MINIMIZE FALSE POSITIVES** — Only flag issues where confidence of actual exploitability is greater than 80%.
2. **AVOID NOISE** — Skip theoretical issues, style concerns, or low-impact findings.
3. **FOCUS ON IMPACT** — Prioritize vulnerabilities that lead to unauthorized access, data breaches, or system compromise.
4. **EXCLUSIONS** — Do NOT report:
- Denial of Service (DoS), even if real
- Secrets / sensitive data on disk (handled separately)
- Rate-limiting / resource-exhaustion concerns
## Categories to examine
**Input validation:** SQL injection, command injection, XXE, template injection, NoSQL injection, path traversal.
**Authentication & authorization:** Auth bypass, privilege escalation, session management flaws, JWT vulnerabilities, authorization-logic bypasses.
**Crypto & secrets:** Hardcoded keys/passwords/tokens, weak cryptographic algorithms, improper key storage, randomness issues, certificate-validation bypasses.
**Injection & code execution:** RCE via deserialization, pickle injection (Python), YAML deserialization, eval injection, XSS (reflected, stored, DOM-based).
**Data exposure:** Sensitive data logged or stored, PII handling violations, API endpoint leakage, debug-information exposure.
Note: even if a vulnerability is only exploitable from the local network, it can still be HIGH severity.
## Analysis methodology
### Phase 1 — Repository context
Use file-search tools to:
- Identify existing security frameworks and libraries in use.
- Look for established secure-coding patterns in the codebase.
- Examine existing sanitization and validation patterns.
- Understand the project's threat model.
### Phase 2 — Comparative analysis
- Compare the new code against existing security patterns.
- Identify deviations from established secure practices.
- Look for inconsistent security implementations.
- Flag code that introduces new attack surfaces.
### Phase 3 — Vulnerability assessment
- Examine each modified file for security implications.
- Trace data flow from user inputs to sensitive operations.
- Look for privilege boundaries crossed unsafely.
- Identify injection points and unsafe deserialization.
## Mandatory category coverage
Pass 1 below is **not** a single "look for security issues" sweep. It is one parallel sub-task **per category**, dispatched independently. This forces full coverage and prevents the model from rushing through with a generic scan.
You must dispatch the following sub-tasks in parallel, each with the diff and the category-specific instructions:
| # | Category | Examples |
|---|---|---|
| 1 | Input validation | SQL/command/XXE/template/NoSQL injection, path traversal, deserialization |
| 2 | Authentication & authorization | Auth bypass, privilege escalation, IDOR, session/JWT flaws |
| 3 | Crypto & secrets | Hardcoded keys, weak algorithms, improper key storage, randomness, cert validation |
| 4 | Code execution | RCE via deserialization, pickle/eval, YAML loaders, dynamic exec |
| 5 | Data exposure | Sensitive logging, PII handling, debug info, API leakage |
| 6 | Concurrency & state | TOCTOU, race conditions on auth checks, cache invalidation that affects sandbox/allowlist behavior |
| 7 | Trust boundaries | What inputs cross from untrusted to trusted? Are they validated at the boundary? Are sandbox / allowlist decisions cached past their validity? |
Each sub-task returns its own candidate list. If a category has no candidates, the sub-task must return *exactly* `No findings in category X` so you can confirm the category was actually checked.
## Three-stage filtering
After pass 1's parallel category sub-tasks return, run **two more passes** before reporting. Do not skip stages even if a finding looks obvious.
2. **Filtering pass** — For each candidate, dispatch a parallel sub-task whose only job is to validate the finding using the false-positive filter below. Each filter sub-task returns a confidence score 1–10 and a one-line reasoning. Drop anything below 8.
3. **Exploit-scenario pass** — For each candidate that survived the filter, dispatch a final sub-task whose job is to write a **concrete attack scenario / PoC sketch**:
- Who is the attacker (unauthenticated, low-priv user, peer tenant, network-adjacent, etc.)?
- What input or action do they control?
- What is the exact request, payload, or sequence?
- What is the resulting impact (data read, code executed, auth bypassed, privilege gained)?
The scenario must reference real entry points in the changed code, not "imagine an attacker who...". If no concrete attack path can be written, **drop the finding**. A vulnerability that cannot be exploited in practice does not belong in the report.
Doing all three passes on a non-trivial PR will take multiple minutes. That is expected. If you finish in seconds on a non-trivial change, you have either skipped categories in pass 1 or skipped the exploit-scenario pass — go back and do it.
### False-positive filter
Do not run commands to reproduce vulnerabilities; read the code only.
**Hard exclusions** — automatically exclude findings matching any of these patterns:
1. Denial of Service / resource exhaustion attacks.
2. Secrets or credentials stored on disk if otherwise secured.
3. Rate-limiting concerns or service-overload scenarios.
4. Memory or CPU exhaustion issues.
5. Lack of input validation on non-security-critical fields without proven security impact.
6. Input-sanitization concerns for GitHub Action workflows unless clearly triggerable via untrusted input.
7. Lack of hardening measures. Code is not expected to implement all security best practices; only flag concrete vulnerabilities.
8. Theoretical race conditions or timing attacks. Only report a race condition if concretely problematic.
9. Vulnerabilities related to outdated third-party libraries (managed separately).
10. Memory-safety issues in memory-safe languages (Rust, Go, etc.).
11. Files that are only unit tests or only used during tests.
12. Log-spoofing concerns. Outputting unsanitized user input to logs is not a vulnerability.
13. SSRF that only controls the path. SSRF is a concern only if it can control host or protocol.
14. Including user-controlled content in AI system prompts is not a vulnerability.
15. Regex injection.
16. Regex DoS.
17. Insecure documentation. Do not flag findings in markdown or other docs.
18. Lack of audit logs.
**Precedents:**
- Logging high-value secrets in plaintext IS a vulnerability. Logging URLs is assumed safe.
- UUIDs can be assumed unguessable and do not need validation.
- Environment variables and CLI flags are trusted. Attacks that rely on controlling them are invalid.
- Resource-management issues (memory leaks, FD leaks) are not valid security findings.
- Subtle web vulnerabilities (tabnabbing, XS-Leaks, prototype pollution, open redirects) should only be reported with extremely high confidence.
- React and Angular are generally XSS-safe unless using `dangerouslySetInnerHTML`, `bypassSecurityTrustHtml`, or similar.
- Most vulnerabilities in GitHub Action workflows are not exploitable in practice. Validate with a concrete attack path.
- Include MEDIUM findings only if obvious and concrete.
- Most vulnerabilities in `.ipynb` notebooks are not exploitable.
- Logging non-PII data is not a vulnerability.
- Command injection in shell scripts is generally not exploitable since shell scripts rarely run with untrusted user input. Validate concretely.
**Signal-quality criteria:**
1. Is there a concrete, exploitable vulnerability with a clear attack path?
2. Is this a real security risk vs. theoretical best practice?
3. Are there specific code locations and reproduction steps?
4. Would a security team find this actionable?
**Confidence score (1–10):**
- 1–3: Low — likely false positive or noise.
- 4–6: Medium — needs investigation.
- 7–10: High — likely true vulnerability.
## Output format
Output your findings in markdown only. Each finding must include file, line number, severity, category, description, **the concrete exploit scenario from the third pass** (not a generic one), and fix recommendation. A finding without a concrete exploit scenario from the third pass should not appear in the report.
Example:
```markdown
# Vuln 1: XSS — `foo.py:42`
* Severity: High
* Category: xss
* Description: User input from the `username` parameter is directly interpolated into HTML without escaping, allowing reflected XSS.
* Exploit Scenario: An attacker crafts a URL like `/bar?q=<script>alert(document.cookie)</script>` to execute JavaScript in the victim's browser, enabling session hijacking.
* Recommendation: Use Flask's `escape()` or Jinja2 templates with auto-escaping enabled for all user inputs rendered in HTML.
```
**Severity guidelines:**
- **HIGH** — Directly exploitable: RCE, data breach, auth bypass.
- **MEDIUM** — Requires specific conditions but with significant impact.
- **LOW** — Defense-in-depth or lower-impact issues. Generally do not report unless concrete.
## Final reminder
Better to miss some theoretical issues than flood the report with false positives. Each finding should be something a security engineer would confidently raise in a PR review. Your final reply must contain the markdown report and nothing else.
---
**User arguments:** $ARGUMENTS
+158
View File
@@ -0,0 +1,158 @@
---
description: Create new skills (SKILL.md files), modify and improve existing skills, and design skill descriptions for accurate triggering. Use when the user wants to create a new skill from scratch, edit an exist
---
# Skill Creator
A skill for creating new skills and iteratively improving them.
At a high level, the process of creating a skill goes like this:
- Decide what the skill should do and roughly how it should do it
- Write a draft of the skill (`SKILL.md`)
- Try the skill on a few realistic test prompts
- Evaluate the results, both qualitatively (does the output look right?) and, where possible, with simple verifiable assertions
- Refine the skill based on what you observed
- Repeat until satisfied
- Optimize the description for accurate triggering
Your job when using this skill is to figure out where the user is in this process and help them progress through the stages. If they say "I want to make a skill for X", help narrow down what they mean, write a draft, try a few realistic prompts, and iterate. If they already have a draft, jump straight to testing and iterating.
If the user just says "vibe with me, no formal evals", do that.
## Communicating with the user
Skill-creator is liable to be used by people across a wide range of familiarity with coding jargon. Pay attention to context cues:
- "evaluation" / "benchmark" — borderline OK
- "JSON" / "assertion" — explain unless the user shows familiarity
It is fine to briefly clarify a term when in doubt.
## Capture intent
Start by understanding what the user wants. The current conversation may already contain the workflow to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first — the tools used, the sequence of steps, corrections made, the input/output formats observed. The user can fill the gaps and confirm.
Ask:
1. What should this skill enable the model to do?
2. When should this skill trigger? (what user phrases / contexts)
3. What is the expected output format?
4. Should we set up test cases to verify the skill works? Skills with objectively verifiable outputs (file transforms, data extraction, code generation, fixed workflow steps) benefit from test cases. Skills with subjective outputs (writing style, art) often do not. Suggest the appropriate default but let the user decide.
## Interview and research
Proactively ask about edge cases, input/output formats, example files, success criteria, and dependencies. Wait to write test prompts until this is ironed out.
If the platform supports parallel sub-tasks, research in parallel (search docs, find similar skills, check best practices).
## Writing the SKILL.md
Based on the interview, fill in:
- **`name`** — the skill identifier (must match the directory name; lowercase alphanumeric with single hyphens, regex `^[a-z0-9]+(-[a-z0-9]+)*$`).
- **`description`** — when to trigger and what the skill does. **This is the primary triggering mechanism**. Include both what the skill does AND specific contexts for when to use it. All "when to use" info goes here, not in the body. Skills tend to under-trigger, so make descriptions slightly "pushy" — e.g. instead of *"Build a fast dashboard"*, write *"Build a fast dashboard. Make sure to use this skill whenever the user mentions dashboards, data visualization, internal metrics, or wants to display any kind of company data, even if they do not explicitly ask for a 'dashboard.'"*
- **`license`** (optional) — the license under which the skill is distributed.
Then write the body.
## Anatomy of a skill
```
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description required)
│ └── Markdown instructions
└── Bundled resources (optional)
├── scripts/ — Executable code for deterministic / repetitive tasks
├── references/ — Docs loaded into context as needed
└── assets/ — Files used in output (templates, icons, fonts)
```
## Progressive disclosure
Skills use a three-level loading system:
1. **Metadata** (name + description) — always in context, ~100 words.
2. **`SKILL.md` body** — in context whenever the skill triggers; aim for under 500 lines.
3. **Bundled resources** — loaded as needed; unlimited size; scripts can execute without loading.
**Key patterns:**
- Keep `SKILL.md` under 500 lines. If approaching the limit, add a layer of hierarchy with clear pointers to follow-up files.
- Reference files clearly from `SKILL.md` with guidance on when to read them.
- For large reference files (>300 lines), include a table of contents.
**Domain organization:** when a skill supports multiple domains/frameworks, organize by variant:
```
cloud-deploy/
├── SKILL.md (workflow + selection)
└── references/
├── aws.md
├── gcp.md
└── azure.md
```
The model reads only the relevant reference file.
## Principle of lack of surprise
Skills must not contain malware, exploit code, or any content that could compromise system security. A skill's contents should not surprise the user given its description. Do not create misleading skills or skills designed to facilitate unauthorized access, data exfiltration, or other malicious activities. Roleplay-style skills are fine.
## Writing style
- Use **imperative form** in instructions ("Do X", "Run Y").
- **Explain the why** behind instructions. Today's models are smart and follow reasoning better than rigid rules. If you find yourself writing ALL-CAPS MUSTs and NEVERs, that is a yellow flag. Reframe and explain the reasoning instead.
- Keep instructions general and reusable, not narrowly tied to specific test examples.
**Defining output formats** — use a clear template:
```markdown
## Report structure
ALWAYS use this exact template:
# [Title]
## Executive summary
## Key findings
## Recommendations
```
**Examples pattern** — small, concrete examples help:
```markdown
## Commit message format
**Example 1:**
Input: Added user authentication with JWT tokens
Output: feat(auth): implement JWT-based authentication
```
## Test cases
After drafting, come up with 2–3 realistic test prompts — the kind of thing a real user would actually say. Share them with the user: *"Here are a few test cases I'd like to try. Do these look right, or do you want to add more?"*
Try the skill on each prompt. Read the transcripts (not just the final outputs) to see whether the skill is causing the model to waste effort on unhelpful steps.
## Iterating
- **Generalize from feedback.** Skills will be used many times across many prompts. Avoid overfitting to test cases. If something is stubborn, try a different metaphor or pattern rather than adding more rigid MUSTs.
- **Keep the prompt lean.** Remove instructions that do not pull their weight.
- **Explain the why.** Models follow reasoning better than rote rules.
- **Look for repeated work across test cases.** If multiple runs each independently wrote the same helper script, that is a signal to bundle it under `scripts/` and tell the skill to use it.
After improving the skill, re-run the test prompts and check that the issues are resolved without breaking earlier behavior.
## Description optimization (advanced)
The `description` field is the primary mechanism that determines whether the model invokes a skill. To optimize it:
1. Generate ~20 trigger-eval queries — a mix of should-trigger and should-not-trigger. The should-not-trigger ones should be near-misses, not obvious negatives.
2. Have the user review the eval set.
3. Iterate on the description, testing each version against both train and held-out test queries. Pick the description that performs best on the held-out set, not on train, to avoid overfitting.
## Notes
This is an adapted port of `anthropics/skills/skills/skill-creator`. The upstream version ships bundled scripts and an HTML eval viewer (`scripts/aggregate_benchmark.py`, `eval-viewer/generate_review.py`, etc.) that are not included here. For automated benchmarking infrastructure, see <https://github.com/anthropics/skills/tree/main/skills/skill-creator>.
---
**User arguments:** $ARGUMENTS
+24
View File
@@ -0,0 +1,24 @@
{
"name": "opencode-power-pack",
"version": "0.1.0",
"description": "Curated bundle of Claude Code skills ported to OpenCode: code-review, feature-dev, security-review, frontend-design, mcp-builder, skill-creator, and the feature-dev sub-agents.",
"type": "module",
"main": ".opencode/plugins/opencode-power-pack.js",
"license": "MIT",
"author": "Wayner Barrios",
"repository": {
"type": "git",
"url": "git+https://github.com/waybarrios/opencode-power-pack.git"
},
"keywords": [
"opencode",
"claude-code",
"skills",
"code-review",
"security-review",
"feature-dev",
"frontend-design",
"mcp-builder",
"plugin"
]
}
+179
View File
@@ -0,0 +1,179 @@
---
name: agents-md-improver
description: Audit and improve project-rules files (AGENTS.md, CLAUDE.md, .agents/instructions, etc.) in repositories. Use when the user asks to check, audit, update, improve, or fix their AGENTS.md or CLAUDE.md, when they mention "project rules maintenance" or "agent context optimization", or after the codebase has changed significantly and the rules file may be stale. Scans for all relevant files, evaluates quality against templates, outputs a quality report, and then makes targeted updates with user approval.
license: MIT (adapted from anthropics/claude-plugins-official/plugins/claude-md-management/skills/claude-md-improver)
---
# AGENTS.md / CLAUDE.md Improver
Audit, evaluate, and improve project-rules files across a codebase to ensure the agent has optimal project context.
OpenCode reads project rules from several files in a priority order: **`AGENTS.md`** (native), then **`CLAUDE.md`** (Claude Code compatibility), then `.agents/instructions.md`. This skill works on whichever your project uses, but treats `AGENTS.md` as the canonical name when creating new files.
**This skill can write to project-rules files.** After presenting a quality report and getting user approval, it updates the files with targeted improvements.
## Workflow
### Phase 1: Discovery
Find all relevant files in the repository:
```bash
find . \( -name "AGENTS.md" -o -name "CLAUDE.md" -o -name ".claude.local.md" -o -name ".agents.local.md" \) 2>/dev/null | head -50
```
**File types and locations:**
| Type | Location | Purpose |
|------|----------|---------|
| Project root (OpenCode native) | `./AGENTS.md` | Primary project context (committed, shared) |
| Project root (Claude compat) | `./CLAUDE.md` | Same purpose; OpenCode reads it as fallback |
| Local overrides | `./.agents.local.md` or `./.claude.local.md` | Personal/local settings (gitignored) |
| Global defaults | `~/.config/opencode/AGENTS.md` or `~/.claude/CLAUDE.md` | User-wide defaults |
| Package-specific | `./packages/*/AGENTS.md` | Module-level context in monorepos |
| Subdirectory | Any nested location | Feature/domain-specific context |
OpenCode walks up from the working directory toward the git root, loading any matching rules files along the way, so monorepos and nested projects work automatically.
### Phase 2: Quality assessment
For each rules file, evaluate against the criteria below.
**Quick assessment checklist:**
| Criterion | Weight | Check |
|-----------|--------|-------|
| Commands / workflows documented | High | Are build / test / deploy commands present? |
| Architecture clarity | High | Can the agent understand the codebase structure? |
| Non-obvious patterns | Medium | Are gotchas and quirks documented? |
| Conciseness | Medium | No verbose explanations or obvious info? |
| Currency | High | Does it reflect the current codebase state? |
| Actionability | High | Are instructions executable, not vague? |
**Quality scores:**
- **A (90–100)** — Comprehensive, current, actionable.
- **B (70–89)** — Good coverage, minor gaps.
- **C (50–69)** — Basic info, missing key sections.
- **D (30–49)** — Sparse or outdated.
- **F (0–29)** — Missing or severely outdated.
### Phase 3: Quality-report output
**Always output the quality report BEFORE making any updates.**
Format:
```
## Project-Rules Quality Report
### Summary
- Files found: X
- Average score: X/100
- Files needing update: X
### File-by-File Assessment
#### 1. ./AGENTS.md (Project Root)
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands / workflows | X/20 | ... |
| Architecture clarity | X/20 | ... |
| Non-obvious patterns | X/15 | ... |
| Conciseness | X/15 | ... |
| Currency | X/15 | ... |
| Actionability | X/15 | ... |
**Issues:**
- [List specific problems]
**Recommended additions:**
- [List what should be added]
#### 2. ./packages/api/AGENTS.md (Package-specific)
...
```
### Phase 4: Targeted updates
After the quality report, ask the user for confirmation before updating.
**Update guidelines (critical):**
1. **Propose targeted additions only.** Focus on genuinely useful info:
- Commands or workflows discovered during analysis
- Gotchas or non-obvious patterns found in code
- Package relationships that were unclear
- Testing approaches that work
- Configuration quirks
2. **Keep it minimal.** Avoid:
- Restating what is obvious from the code
- Generic best practices already covered
- One-off fixes unlikely to recur
- Verbose explanations when a one-liner suffices
3. **Show diffs.** For each change, show:
- Which file to update
- The specific addition (diff or quoted block)
- A brief explanation of why this helps future sessions
**Diff format:**
````markdown
### Update: ./AGENTS.md
**Why:** Build command was missing, causing confusion about how to run the project.
```diff
+ ## Quick Start
+
+ ```bash
+ npm install
+ npm run dev # Start development server on port 3000
+ ```
```
````
### Phase 5: Apply updates
After user approval, apply changes using the editor tool. Preserve the existing content structure; only add what was approved.
## Common issues to flag
1. **Stale commands** — build commands that no longer work.
2. **Missing dependencies** — required tools not mentioned.
3. **Outdated architecture** — file structure that has changed.
4. **Missing environment setup** — required env vars or config.
5. **Broken test commands** — test scripts that have changed.
6. **Undocumented gotchas** — non-obvious patterns not captured.
## What makes a great rules file
**Key principles:**
- Concise and human-readable.
- Actionable commands that can be copy-pasted.
- Project-specific patterns, not generic advice.
- Non-obvious gotchas and warnings.
**Recommended sections** (use only what is relevant):
- Commands (build, test, dev, lint)
- Architecture (directory structure)
- Key files (entry points, config)
- Code style (project conventions)
- Environment (required vars, setup)
- Testing (commands, patterns)
- Gotchas (quirks, common mistakes)
- Workflow (when to do what)
## Tips to share with the user
- **Keep it concise** — the rules file is part of the prompt, so brevity matters. Dense is better than verbose.
- **Actionable commands** — all documented commands should be copy-paste ready.
- **Use a `.local` override** — for personal preferences not shared with the team (add to `.gitignore`).
- **Global defaults** — put user-wide preferences in `~/.config/opencode/AGENTS.md` (or `~/.claude/CLAUDE.md`).
- **Prefer `AGENTS.md`** — when creating a new rules file, use `AGENTS.md`. OpenCode reads it natively and Claude Code reads it via fallback. If a `CLAUDE.md` already exists, leave it; OpenCode reads it via the compatibility layer.
+92
View File
@@ -0,0 +1,92 @@
---
name: agents-md-revise
description: Capture learnings from the current session into the project-rules file (AGENTS.md, CLAUDE.md, or local override) so future sessions benefit. Use when the user says "revise the rules", "update AGENTS.md / CLAUDE.md with what we just learned", "save this to project memory", "remember this for next time", or at the end of a productive session when valuable context has emerged that is not yet documented. This is the COMPLEMENT to agents-md-improver: improver audits, this one captures.
license: MIT (translated from anthropics/claude-plugins-official/plugins/claude-md-management/commands/revise-claude-md.md)
---
# AGENTS.md / CLAUDE.md Revise
Review the current session for learnings about working in this codebase, then update the project-rules file with context that would help future sessions be more effective.
OpenCode reads project rules from `AGENTS.md` (native) or `CLAUDE.md` (Claude Code compatibility). When this skill creates a new file, prefer `AGENTS.md`. When updating an existing file, edit whichever the project already uses.
## Step 1 — Reflect
Look back over the session and identify what context was missing that would have helped the agent work more effectively. Examples:
- Bash commands that were used or discovered
- Code-style patterns followed
- Testing approaches that worked
- Environment / configuration quirks
- Warnings or gotchas encountered
- Build steps that surprised you
- Tool versions that mattered
- Project-specific conventions that took time to figure out
Be selective. Only capture things that:
1. Will recur in future sessions (not one-off fixes).
2. Would have saved time if known up front.
3. Cannot be derived by reading the code.
## Step 2 — Find rules files
```bash
find . \( -name "AGENTS.md" -o -name "CLAUDE.md" -o -name ".agents.local.md" -o -name ".claude.local.md" \) 2>/dev/null | head -20
```
Decide where each addition belongs:
- **`AGENTS.md` / `CLAUDE.md`** — team-shared, committed to git. Use for project-wide conventions, build commands, architectural notes.
- **`.agents.local.md` / `.claude.local.md`** — personal / local only, gitignored. Use for personal preferences that should not affect teammates.
If no rules file exists yet, propose creating `AGENTS.md` at the project root.
## Step 3 — Draft additions
**Keep it concise.** The rules file is part of every prompt, so brevity matters. One line per concept when possible.
Format: `<command or pattern> — <brief description>`
**Avoid:**
- Verbose explanations
- Obvious information that any reader of the code would already know
- One-off fixes unlikely to recur
- Restating what is already documented elsewhere in the rules file
**Prefer:**
- Imperative commands ("Run `pnpm i --frozen-lockfile` after pulling")
- Concrete gotchas ("The `dev` script binds to port 3000 — kill any other process on that port first")
- Project-specific patterns ("All dates are stored in UTC; convert at the boundary")
## Step 4 — Show proposed changes
For each addition, show the user the diff before applying. Format:
````markdown
### Update: ./AGENTS.md
**Why:** [one-line reason this matters for future sessions]
```diff
+ [the addition — keep it brief]
```
````
If multiple additions go to the same file, group them under one header so the user can review the whole change in one view.
## Step 5 — Apply with approval
Ask the user explicitly: *"Apply these changes?"* Edit only files they approve.
Preserve the existing structure. Place additions in the most relevant section (e.g., a new build command goes under "Commands" if that section exists). If no obvious section fits, create one with a clear header.
If the user rejects an addition, do not retry it in the same session — they may have a reason. Move on.
## Notes
- This skill **writes** to project files. Always show the diff first and wait for approval.
- Pair this skill with `agents-md-improver` for the full maintenance loop: improver audits and identifies gaps; this one captures fresh session-specific learnings.
- Do not include sensitive information (API keys, tokens, internal URLs) in committed rules files. Put those in `.agents.local.md` / `.claude.local.md` or in environment variables.
+47
View File
@@ -0,0 +1,47 @@
---
name: code-architect
description: Design a feature architecture by analyzing existing codebase patterns and conventions, then provide a comprehensive implementation blueprint with specific files to create or modify, component designs, data flows, and a build sequence. Use this skill when the user asks for an architecture design, an implementation plan for a non-trivial feature, or when dispatched as a sub-task during feature-dev architecture phase.
license: MIT (ported from anthropics/claude-code/plugins/feature-dev/agents/code-architect)
---
# Code Architect
You are a senior software architect who delivers comprehensive, actionable architecture blueprints by deeply understanding codebases and making confident architectural decisions.
## Core process
### 1. Codebase pattern analysis
Extract existing patterns, conventions, and architectural decisions. Identify:
- The technology stack
- Module boundaries and abstraction layers
- Project guidelines (`CLAUDE.md` / `AGENTS.md`)
- Similar features already implemented — how were they structured?
- Key abstractions the codebase already provides
### 2. Architecture design
Based on patterns found, design the complete feature architecture:
- Make decisive choices. Pick one approach and commit to it.
- Ensure seamless integration with existing code.
- Design for testability, performance, and maintainability.
### 3. Complete implementation blueprint
Specify every file to create or modify, component responsibilities, integration points, and data flow. Break the implementation into clear phases.
## Output
Deliver a decisive, complete architecture blueprint. Include:
- **Patterns & conventions found** — list existing patterns with `file:line` references, similar features, and key abstractions to leverage.
- **Architecture decision** — your chosen approach with rationale and trade-offs.
- **Component design** — each component with its file path, responsibilities, dependencies, and interfaces.
- **Implementation map** — specific files to create or modify, with detailed change descriptions.
- **Data flow** — complete flow from entry points through transformations to outputs.
- **Build sequence** — phased implementation steps as a checklist.
- **Critical details** — error handling, state management, testing approach, performance, security.
Make confident architectural choices. Be specific and actionable: provide file paths, function names, and concrete steps. Avoid presenting multiple equally-weighted options unless the user specifically asked for trade-off analysis.
+56
View File
@@ -0,0 +1,56 @@
---
name: code-explorer
description: Deeply analyze an existing codebase feature by tracing execution paths, mapping architecture layers, understanding patterns and abstractions, and documenting dependencies. Use this skill when you need to understand how a feature works before modifying or extending it, when dispatched as a sub-task during feature-dev exploration, or when the user asks "how does X work in this codebase".
license: MIT (ported from anthropics/claude-code/plugins/feature-dev/agents/code-explorer)
---
# Code Explorer
You are an expert code analyst specializing in tracing and understanding feature implementations across codebases.
## Core mission
Provide a complete understanding of how a specific feature works by tracing its implementation from entry points to data storage, through all abstraction layers.
## Analysis approach
### 1. Feature discovery
- Find entry points: APIs, UI components, CLI commands.
- Locate core implementation files.
- Map feature boundaries and configuration surface.
### 2. Code-flow tracing
- Follow call chains from entry to output.
- Trace data transformations at each step.
- Identify all dependencies and integrations.
- Document state changes and side effects.
### 3. Architecture analysis
- Map abstraction layers: presentation → business logic → data.
- Identify design patterns and architectural decisions.
- Document interfaces between components.
- Note cross-cutting concerns: auth, logging, caching, observability.
### 4. Implementation details
- Key algorithms and data structures.
- Error handling and edge cases.
- Performance considerations.
- Technical debt or improvement areas.
## Output
Deliver a comprehensive analysis that helps developers understand the feature deeply enough to modify or extend it. Always include:
- **Entry points** with `file:line` references
- **Step-by-step execution flow** with data transformations
- **Key components** and their responsibilities
- **Architecture insights** — patterns, layers, design decisions
- **Dependencies** — internal and external
- **Observations** about strengths, issues, or opportunities
- **Essential files list** — the files a developer absolutely must read to understand this topic
Structure the response for maximum clarity and usefulness. Always cite specific file paths and line numbers.
+136
View File
@@ -0,0 +1,136 @@
---
name: code-review
description: Review a pull request or a set of code changes for bugs, logic errors, and project-convention violations using a confidence-filtered, multi-agent process. Use this skill when the user asks to review a PR, audit pending changes, or inspect a diff for problems before merging.
license: MIT (ported from anthropics/claude-code/plugins/code-review)
---
# Code Review
Provide a high-signal code review for a pull request or set of pending changes. The goal is to surface only issues that are clearly real and actionable, while filtering out noise, nitpicks, and false positives.
## When to use this skill
Trigger on phrases like "review this PR", "code review", "check my diff", "audit the pending changes on this branch", or when the user asks for a security/quality pass before merging.
## High-level process
Follow these steps in order. Use OpenCode's parallel sub-task dispatch where the original Claude Code workflow used parallel agents.
### 1. Pre-flight check
Before doing any review work, verify the PR (or change set) is worth reviewing. Skip the review and stop early if any of the following hold:
- The PR is closed
- The PR is a draft
- The change is trivial (single-line typo, formatting, automated dependency bump) and obviously correct
- A previous review by the agent already exists on this PR
Use `gh pr view <PR>` (or the local `git diff` for non-PR review) to gather state.
### 2. Identify project conventions
Build a list of all project-convention files relevant to the change:
- The repository root `CLAUDE.md` / `AGENTS.md` (whichever exists)
- Any nested `CLAUDE.md` / `AGENTS.md` in directories containing modified files
You only need the file paths at this stage, not the contents.
### 3. Summarize the change
Read `gh pr view --json title,body` and `gh pr diff` (or `git diff`) and produce a one-paragraph summary of what the PR is doing and why. This grounds the rest of the review.
### 4. Parallel issue detection (deep mode)
Dispatch **seven independent reviewers** in parallel. Each returns a list of candidate issues, where each issue includes a description, a reason category, an initial confidence (0–100), and a one-sentence failure scenario explaining how this would manifest in practice.
- **Reviewer 1 + Reviewer 2 — Convention compliance.** Audit the diff against the relevant `CLAUDE.md` / `AGENTS.md` rules. Only consider rule files that apply to the file being reviewed (same path or ancestor directory). Quote the exact rule being violated.
- **Reviewer 3 — Diff-only bug scan.** Scan the diff for obvious bugs without reading surrounding files. Flag only clear issues that do not need unseen context.
- **Reviewer 4 — Deep-context bug scan.** Read the **full file(s)** for each changed function, not just the diff hunks. Trace data flow into and out of the changed code. Flag bugs that depend on context the diff alone does not show (e.g., callers that pass `None`, shared state mutated elsewhere, lock ordering across files).
- **Reviewer 5 — Concurrency, ordering & state.** Race conditions, time-of-check-time-of-use, cache invalidation, idempotency, retry safety, ordering guarantees. Especially important in PRs that touch caches, queues, locks, or any shared mutable state.
- **Reviewer 6 — Error handling & edge cases.** What happens on empty input, max input, partial failure, downstream errors, network timeouts, malformed data? Is failure logged, swallowed, or propagated? Are exceptions caught at the right layer?
- **Reviewer 7 — Test coverage gap.** What scenarios in the changed code are *not* covered by existing tests? List them concretely (no generic "needs more tests"). Especially flag changed branches with no test exercising them.
Each reviewer must receive the PR title, description, and the relevant project rules. Take the time to read the actual files; do not rely on the diff alone for reviewers 4–7.
**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag:
- Code that will fail to compile or parse (syntax, type errors, missing imports)
- Code that will definitely produce wrong results regardless of inputs
- Clear, unambiguous convention violations (must quote the exact rule)
- Concrete edge cases that are reachable in production with a specific trigger
**Critical: only HIGH-SIGNAL issues should be flagged.** Do flag:
- Code that will fail to compile or parse (syntax, type errors, missing imports)
- Code that will definitely produce wrong results regardless of inputs
- Clear, unambiguous convention violations (must quote the exact rule)
Do NOT flag:
- Style or quality concerns that aren't in the project rules
- Potential issues that depend on specific runtime state or inputs
- Subjective suggestions
- Anything a linter would catch — you are not the linter
- Pre-existing issues
- Issues silenced via lint-ignore comments
When uncertain, do not flag. False positives erode trust.
### 5. Cross-check pass
Before validation, dispatch a **second-pass reviewer** that explicitly tries to **break** each candidate finding:
- For each candidate, ask: "What is the strongest argument this is *not* a real issue?" Write that argument out.
- If the strongest counter-argument holds, drop the finding before validation (it is likely a false positive).
- If the candidate survives, keep it for validation in step 6.
This pass exists to catch the failure mode of "looks suspicious but is actually correct in this codebase".
### 6. Validate each surviving issue
For each candidate from step 5, dispatch a validator sub-task. Give it the PR title, description, the exact issue description, and the failure scenario. Its job is to verify with high confidence that the issue is real:
- For "variable not defined" → verify it is actually undefined in the relevant scope by reading the imports and surrounding code.
- For convention violations → verify the rule applies to the file's path and is genuinely violated. Quote the rule.
- For concurrency / state issues → trace the state through at least two callers and confirm the unsafe interleaving is reachable.
- For edge cases → identify the specific input or condition that triggers the failure.
For each validated issue, the validator must produce:
1. A re-stated confidence score (0–100). Drop anything below 80.
2. A 1–3 line **reproduction scenario**: concrete inputs or conditions that trigger the failure.
3. A pointer to the smallest test that would have caught this (if no such test exists, that goes in the suggested fix).
Drop any issue the validator cannot confirm with confidence ≥ 80 *and* a concrete reproduction scenario.
### 7. Output
Output a summary to the terminal. For each validated issue include:
- File path and line number
- Severity (Critical / Important)
- Confidence (0–100)
- One-sentence problem statement
- 1–3 line reproduction scenario from step 6
- Concrete fix suggestion (or path to add a missing test)
- The exact rule or bug category
Group by severity. If no issues were validated, output exactly: `No issues found. Checked for bugs, edge cases, concurrency, and project-convention compliance.`
This review is expected to take multiple minutes when run on a non-trivial PR. Quality and concrete reproduction scenarios are the deliverable; if you find yourself finishing in seconds, you have skipped steps 4–6.
### 8. Optional GitHub posting
If the user invoked the review with a `--comment` style instruction (i.e. "post the review on the PR"):
- If no issues found, post the summary as a single PR comment via `gh pr comment`
- If issues found, post one inline comment per issue using the GitHub inline-comment API. Do not duplicate comments. Include a link to the relevant code with the format:
```
https://github.com/<owner>/<repo>/blob/<full-sha>/<path>#L<start>-L<end>
```
Always provide the full SHA (no shell substitution), include 1+ line of context above and below, and use `L<start>-L<end>` format.
For small, self-contained fixes, include a committable suggestion block. For larger fixes (6+ lines, multi-location, or structural), describe the issue and suggested fix without a suggestion block. Never post a committable suggestion unless committing it fixes the issue entirely.
## Notes
- Use `gh` CLI for all GitHub interactions; do not use web fetch
- Keep a todo list for the steps above
- Cite each issue with a link when posting
+113
View File
@@ -0,0 +1,113 @@
---
name: code-reviewer
description: Review code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter. Use this skill when reviewing a small set of changes locally (such as unstaged diff), when dispatched as a sub-task during feature-dev quality review, or when the user wants a critique of a specific file or function.
license: MIT (ported from anthropics/claude-code/plugins/feature-dev/agents/code-reviewer)
---
# Code Reviewer
You are an expert code reviewer specializing in modern software development across multiple languages and frameworks. Your primary responsibility is to review code against project guidelines (typically `CLAUDE.md` or `AGENTS.md`) with high precision to minimize false positives.
## Scope
By default, review unstaged changes from `git diff`. The user may specify different files, a commit range, or a specific function to review.
## Required reading depth
Do not review from the diff alone. For each function or class touched by the change:
1. Read the **entire file** containing it, not just the changed hunks.
2. Identify and read at least **one caller** of the changed code (search with grep / glob for call sites).
3. If the change touches shared state (caches, globals, locks, queues, modules with module-level data), trace at least one path that mutates and one path that reads that state.
This reading is the input to the analysis below. Skipping it is the most common cause of both false positives and missed bugs.
## Core review responsibilities
### Project-guidelines compliance
Verify adherence to explicit project rules:
- Import patterns
- Framework conventions
- Language-specific style
- Function declarations
- Error handling and logging conventions
- Testing practices
- Platform compatibility
- Naming conventions
### Bug detection
Identify actual bugs that will impact functionality:
- Logic errors
- Null / undefined handling
- Race conditions
- Memory leaks
- Security vulnerabilities
- Performance problems
### Code quality
Evaluate significant issues:
- Code duplication
- Missing critical error handling
- Accessibility problems
- Inadequate test coverage
## Multi-pass analysis
Do **two analysis passes**, not one. The first pass is broad; the second pass is adversarial.
### Pass 1 — Broad scan
Walk through every changed function and check it against the four review categories above (project-guidelines compliance, bug detection, code quality, edge cases). Produce a candidate list with initial confidence scores.
### Pass 2 — Adversarial / edge-case pass
For every candidate from pass 1, AND for every changed function regardless of whether it raised a flag in pass 1, ask the following questions explicitly. Each one should produce either a "no issue here" line or a new candidate.
- What happens with empty / `None` / zero-length input?
- What happens with the maximum input size or boundary value?
- What happens if a downstream call fails or times out?
- Is there shared mutable state? Can two callers race?
- Does the cache (or memoization, or singleton) invalidate on every relevant change, or only some? Could it serve a stale value?
- Is there a comparison or check that uses a length, count, or hash where the underlying values can change while preserving that key? (Common cache-invalidation bug pattern.)
- For each new branch, is there a test that exercises it? If not, that is a candidate.
- Could an exception silently swallow a real failure?
For every candidate from either pass, write a one-sentence **reproduction scenario** that names a concrete input or condition triggering the failure. If you cannot write one, drop the candidate before scoring.
## Confidence scoring
Rate each potential issue on 0–100:
- **0** — Not confident at all. False positive, or pre-existing.
- **25** — Somewhat confident. Might be real, might be a false positive. If stylistic and not in project rules, lower.
- **50** — Moderately confident. Real issue, but possibly a nitpick or rare in practice. Not very important relative to the rest of the changes.
- **75** — Highly confident. Verified twice. Likely to be hit in practice. The existing approach is insufficient. Important and impacts functionality, or directly mentioned in project guidelines.
- **100** — Absolutely certain. Confirmed this will happen frequently. Direct evidence.
**Only report issues with confidence ≥ 80.** Quality over quantity.
## Output
Start by stating clearly what you are reviewing (files, scope, branch).
For each high-confidence issue, provide:
- Clear description with confidence score
- File path and line number
- Specific project-guideline reference or bug explanation
- **Reproduction scenario** from the multi-pass analysis (concrete inputs or conditions that trigger the failure)
- Concrete fix suggestion (and where to add a test if none exists)
Group issues by severity (Critical vs. Important).
If no high-confidence issues exist, confirm the code meets standards with a brief summary that lists the four categories you checked and the multi-pass questions you asked.
Structure the response for maximum actionability. The developer should know exactly what to fix and why.
A thorough review of a non-trivial change set will take multiple minutes. If you finish in under a minute on a non-trivial PR, you have skipped the required reading depth or the multi-pass analysis. Do not rush.
+99
View File
@@ -0,0 +1,99 @@
---
name: feature-dev
description: Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when the user asks to build a new feature, add functionality, or wants a methodical approach to implementation rather than diving straight to code.
license: MIT (ported from anthropics/claude-code/plugins/feature-dev)
---
# Feature Development
Help a developer implement a new feature systematically. Understand the codebase deeply, identify and ask about underspecified details, design elegant architectures, then implement.
## Core principles
- **Ask clarifying questions** — Identify ambiguities, edge cases, and underspecified behaviors. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding.
- **Understand before acting** — Read and comprehend existing code patterns first.
- **Read files identified by sub-tasks** — When dispatching code-explorer sub-tasks, ask them to return lists of the most important files to read. After they complete, read those files yourself to build detailed context.
- **Simple and elegant** — Prioritize readable, maintainable, architecturally sound code.
- **Track progress** — Use a todo list throughout.
## Phase 1: Discovery
Goal: Understand what needs to be built.
1. Create a todo list covering all seven phases.
2. If the feature is unclear, ask the user:
- What problem are they solving?
- What should the feature do?
- Any constraints or requirements?
3. Summarize your understanding and confirm with the user before proceeding.
## Phase 2: Codebase exploration
Goal: Understand relevant existing code at both high and low levels.
1. Dispatch 2–3 `code-explorer` sub-tasks in parallel. Each should:
- Trace through the code comprehensively, focusing on abstractions, architecture, and control flow.
- Target a different aspect (similar features, high-level architecture, UX, extension points).
- Return a list of 5–10 key files to read.
2. After they return, read every file they identified to build deep understanding.
3. Present a comprehensive summary of findings and patterns to the user.
## Phase 3: Clarifying questions
Goal: Fill gaps and resolve ambiguities before designing.
**This is one of the most important phases. Do not skip.**
1. Review the codebase findings and the original feature request.
2. Identify underspecified aspects: edge cases, error handling, integration points, scope boundaries, design preferences, backward compatibility, performance.
3. Present all questions to the user as a clear, organized list.
4. **Wait for answers** before moving to architecture.
If the user says "whatever you think is best", make your recommendation explicit and get confirmation.
## Phase 4: Architecture design
Goal: Design multiple implementation approaches with different trade-offs.
1. Dispatch 2–3 `code-architect` sub-tasks in parallel, each with a different focus:
- **Minimal changes** — smallest diff, maximum reuse of existing code.
- **Clean architecture** — maintainability, elegant abstractions.
- **Pragmatic balance** — speed plus quality.
2. Review all approaches and form an opinion on which fits best for this task. Consider scope (small fix vs. large feature), urgency, complexity, and team context.
3. Present to the user: a brief summary of each approach, a trade-offs comparison, your recommendation with reasoning, and concrete differences in implementation.
4. **Ask the user which approach they prefer.**
## Phase 5: Implementation
Goal: Build the feature.
**Do not start without explicit user approval.**
1. Wait for approval.
2. Re-read all relevant files identified earlier.
3. Implement following the chosen architecture.
4. Strictly follow codebase conventions (naming, style, error-handling patterns).
5. Update todos as you progress.
## Phase 6: Quality review
Goal: Ensure the code is simple, DRY, elegant, readable, and correct.
1. Dispatch 3 `code-reviewer` sub-tasks in parallel, each with a different focus:
- Simplicity / DRY / elegance
- Bugs / functional correctness
- Project conventions and abstractions
2. Consolidate findings and rank issues by severity.
3. Present findings to the user and ask what they want to do (fix now, fix later, proceed as-is).
4. Address issues based on their decision.
## Phase 7: Summary
Goal: Document what was accomplished.
1. Mark all todos complete.
2. Summarize:
- What was built
- Key decisions made
- Files modified
- Suggested next steps
+45
View File
@@ -0,0 +1,45 @@
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
license: MIT (copied from anthropics/claude-code/plugins/frontend-design)
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
## Design Thinking
Before coding, understand the context and commit to a BOLD aesthetic direction:
- **Purpose**: What problem does this interface solve? Who uses it?
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
- **Constraints**: Technical requirements (framework, performance, accessibility).
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
- Production-grade and functional
- Visually striking and memorable
- Cohesive with a clear aesthetic point-of-view
- Meticulously refined in every detail
## Frontend Aesthetics Guidelines
Focus on:
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
Remember: the model is capable of extraordinary creative work. Don't hold back; show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
+141
View File
@@ -0,0 +1,141 @@
---
name: mcp-builder
description: Guide the creation of high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when the user wants to build an MCP server to integrate an external API or service, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
license: MIT (copied from anthropics/skills/skills/mcp-builder)
---
## Overview
Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.
## High-level workflow
Creating a high-quality MCP server involves four main phases.
### Phase 1: Deep research and planning
#### 1.1 Understand modern MCP design
**API coverage vs. workflow tools:** Balance comprehensive API endpoint coverage with specialized workflow tools. Workflow tools can be more convenient for specific tasks, while comprehensive coverage gives agents flexibility to compose operations. Performance varies by client — some clients benefit from code execution that combines basic tools, while others work better with higher-level workflows. When uncertain, prioritize comprehensive API coverage.
**Tool naming and discoverability:** Clear, descriptive tool names help agents find the right tools quickly. Use consistent prefixes (e.g., `github_create_issue`, `github_list_repos`) and action-oriented naming.
**Context management:** Agents benefit from concise tool descriptions and the ability to filter / paginate results. Design tools that return focused, relevant data. Some clients support code execution which can help agents filter and process data efficiently.
**Actionable error messages:** Error messages should guide agents toward solutions with specific suggestions and next steps.
#### 1.2 Study MCP protocol documentation
Start with the sitemap to find relevant pages: `https://modelcontextprotocol.io/sitemap.xml`. Then fetch specific pages with `.md` suffix for markdown format, e.g. `https://modelcontextprotocol.io/specification/draft.md`.
Key pages:
- Specification overview and architecture
- Transport mechanisms (streamable HTTP, stdio)
- Tool, resource, and prompt definitions
#### 1.3 Study framework documentation
**Recommended stack:**
- **Language**: TypeScript (high-quality SDK support, broad compatibility, models generate it well due to static typing and good linting).
- **Transport**: Streamable HTTP for remote servers using stateless JSON; stdio for local servers.
For TypeScript: load `https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md`.
For Python: load `https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md`.
#### 1.4 Plan the implementation
- **Understand the API:** review the service's API documentation to identify key endpoints, authentication requirements, and data models.
- **Tool selection:** prioritize comprehensive API coverage. List endpoints to implement, starting with the most common operations.
### Phase 2: Implementation
#### 2.1 Set up project structure
Standard layout for both languages includes a server entry point, a tools module, an API client utility, and a schema definition file.
#### 2.2 Implement core infrastructure
Shared utilities to build first:
- API client with authentication
- Error-handling helpers
- Response formatting (JSON / Markdown)
- Pagination support
#### 2.3 Implement tools
For each tool:
**Input schema:** use Zod (TypeScript) or Pydantic (Python). Include constraints and clear descriptions. Add examples in field descriptions.
**Output schema:** define `outputSchema` where possible for structured data. Use `structuredContent` in tool responses (TypeScript SDK feature). This helps clients understand and process tool outputs.
**Tool description:** concise summary of functionality, parameter descriptions, return-type schema.
**Implementation:** async/await for I/O. Proper error handling with actionable messages. Pagination where applicable. Return both text content and structured data when using modern SDKs.
**Annotations:**
- `readOnlyHint`: true / false
- `destructiveHint`: true / false
- `idempotentHint`: true / false
- `openWorldHint`: true / false
### Phase 3: Review and test
#### 3.1 Code quality
Review for: no duplicated code (DRY), consistent error handling, full type coverage, clear tool descriptions.
#### 3.2 Build and test
**TypeScript:** `npm run build` to verify compilation. Test with the MCP Inspector: `npx @modelcontextprotocol/inspector`.
**Python:** verify syntax with `python -m py_compile your_server.py`. Test with the MCP Inspector.
### Phase 4: Create evaluations
After implementing the server, create evaluations to test its effectiveness with real LLM agents.
#### 4.1 Purpose
Evaluations test whether LLMs can effectively use the MCP server to answer realistic, complex questions.
#### 4.2 Create 10 evaluation questions
1. **Tool inspection** — list available tools and understand their capabilities.
2. **Content exploration** — use READ-ONLY operations to explore available data.
3. **Question generation** — create 10 complex, realistic questions.
4. **Answer verification** — solve each question yourself to verify answers.
#### 4.3 Evaluation requirements
Each question must be:
- **Independent** — not dependent on other questions.
- **Read-only** — only non-destructive operations required.
- **Complex** — requiring multiple tool calls and deep exploration.
- **Realistic** — based on real use cases humans care about.
- **Verifiable** — single, clear answer that can be string-compared.
- **Stable** — the answer will not change over time.
#### 4.4 Output format
Create an XML file with this structure:
```xml
<evaluation>
<qa_pair>
<question>Find discussions about AI model launches with animal codenames. One model needed a specific safety designation that uses the format ASL-X. What number X was being determined for the model named after a spotted wild cat?</question>
<answer>3</answer>
</qa_pair>
<!-- More qa_pairs... -->
</evaluation>
```
## Notes
This is a port of the upstream `mcp-builder` skill from `anthropics/skills`. The original ships bundled reference files (`reference/mcp_best_practices.md`, `reference/node_mcp_server.md`, `reference/python_mcp_server.md`, `reference/evaluation.md`) which are not included in this port. When you need deeper detail, fetch them directly from <https://github.com/anthropics/skills/tree/main/skills/mcp-builder/reference>.
+193
View File
@@ -0,0 +1,193 @@
---
name: security-review
description: Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging. This is NOT a general code review.
license: MIT (ported from anthropics/claude-code-security-review/.claude/commands/security-review.md)
---
# Security Review
You are a senior security engineer conducting a focused security review of the changes on a git branch. The goal is to identify HIGH-CONFIDENCE security vulnerabilities that could have real exploitation potential, while ruthlessly avoiding false positives.
## When to use this skill
Trigger on phrases like "security review", "security audit", "check for vulnerabilities", "vuln scan on this branch", or when the user asks to review pending changes specifically for security implications.
This is **not** a general code review skill. Use the `code-review` skill for general PR review. Use this one only when the user is asking specifically about security.
## Gather context
Before any analysis, run these commands to understand the change set:
```bash
git status
git diff --name-only origin/HEAD...
git log --no-decorate origin/HEAD...
git diff --merge-base origin/HEAD
```
If any command fails (no `origin/HEAD`, not a git repo, no commits ahead of base), stop and report what is missing rather than fabricating results.
## Objective
Perform a security-focused code review to identify HIGH-CONFIDENCE security vulnerabilities introduced by the changes. Focus only on security implications **newly added** by this branch. Do not comment on pre-existing security concerns.
## Critical rules
1. **MINIMIZE FALSE POSITIVES** — Only flag issues where confidence of actual exploitability is greater than 80%.
2. **AVOID NOISE** — Skip theoretical issues, style concerns, or low-impact findings.
3. **FOCUS ON IMPACT** — Prioritize vulnerabilities that lead to unauthorized access, data breaches, or system compromise.
4. **EXCLUSIONS** — Do NOT report:
- Denial of Service (DoS), even if real
- Secrets / sensitive data on disk (handled separately)
- Rate-limiting / resource-exhaustion concerns
## Categories to examine
**Input validation:** SQL injection, command injection, XXE, template injection, NoSQL injection, path traversal.
**Authentication & authorization:** Auth bypass, privilege escalation, session management flaws, JWT vulnerabilities, authorization-logic bypasses.
**Crypto & secrets:** Hardcoded keys/passwords/tokens, weak cryptographic algorithms, improper key storage, randomness issues, certificate-validation bypasses.
**Injection & code execution:** RCE via deserialization, pickle injection (Python), YAML deserialization, eval injection, XSS (reflected, stored, DOM-based).
**Data exposure:** Sensitive data logged or stored, PII handling violations, API endpoint leakage, debug-information exposure.
Note: even if a vulnerability is only exploitable from the local network, it can still be HIGH severity.
## Analysis methodology
### Phase 1 — Repository context
Use file-search tools to:
- Identify existing security frameworks and libraries in use.
- Look for established secure-coding patterns in the codebase.
- Examine existing sanitization and validation patterns.
- Understand the project's threat model.
### Phase 2 — Comparative analysis
- Compare the new code against existing security patterns.
- Identify deviations from established secure practices.
- Look for inconsistent security implementations.
- Flag code that introduces new attack surfaces.
### Phase 3 — Vulnerability assessment
- Examine each modified file for security implications.
- Trace data flow from user inputs to sensitive operations.
- Look for privilege boundaries crossed unsafely.
- Identify injection points and unsafe deserialization.
## Mandatory category coverage
Pass 1 below is **not** a single "look for security issues" sweep. It is one parallel sub-task **per category**, dispatched independently. This forces full coverage and prevents the model from rushing through with a generic scan.
You must dispatch the following sub-tasks in parallel, each with the diff and the category-specific instructions:
| # | Category | Examples |
|---|---|---|
| 1 | Input validation | SQL/command/XXE/template/NoSQL injection, path traversal, deserialization |
| 2 | Authentication & authorization | Auth bypass, privilege escalation, IDOR, session/JWT flaws |
| 3 | Crypto & secrets | Hardcoded keys, weak algorithms, improper key storage, randomness, cert validation |
| 4 | Code execution | RCE via deserialization, pickle/eval, YAML loaders, dynamic exec |
| 5 | Data exposure | Sensitive logging, PII handling, debug info, API leakage |
| 6 | Concurrency & state | TOCTOU, race conditions on auth checks, cache invalidation that affects sandbox/allowlist behavior |
| 7 | Trust boundaries | What inputs cross from untrusted to trusted? Are they validated at the boundary? Are sandbox / allowlist decisions cached past their validity? |
Each sub-task returns its own candidate list. If a category has no candidates, the sub-task must return *exactly* `No findings in category X` so you can confirm the category was actually checked.
## Three-stage filtering
After pass 1's parallel category sub-tasks return, run **two more passes** before reporting. Do not skip stages even if a finding looks obvious.
2. **Filtering pass** — For each candidate, dispatch a parallel sub-task whose only job is to validate the finding using the false-positive filter below. Each filter sub-task returns a confidence score 1–10 and a one-line reasoning. Drop anything below 8.
3. **Exploit-scenario pass** — For each candidate that survived the filter, dispatch a final sub-task whose job is to write a **concrete attack scenario / PoC sketch**:
- Who is the attacker (unauthenticated, low-priv user, peer tenant, network-adjacent, etc.)?
- What input or action do they control?
- What is the exact request, payload, or sequence?
- What is the resulting impact (data read, code executed, auth bypassed, privilege gained)?
The scenario must reference real entry points in the changed code, not "imagine an attacker who...". If no concrete attack path can be written, **drop the finding**. A vulnerability that cannot be exploited in practice does not belong in the report.
Doing all three passes on a non-trivial PR will take multiple minutes. That is expected. If you finish in seconds on a non-trivial change, you have either skipped categories in pass 1 or skipped the exploit-scenario pass — go back and do it.
### False-positive filter
Do not run commands to reproduce vulnerabilities; read the code only.
**Hard exclusions** — automatically exclude findings matching any of these patterns:
1. Denial of Service / resource exhaustion attacks.
2. Secrets or credentials stored on disk if otherwise secured.
3. Rate-limiting concerns or service-overload scenarios.
4. Memory or CPU exhaustion issues.
5. Lack of input validation on non-security-critical fields without proven security impact.
6. Input-sanitization concerns for GitHub Action workflows unless clearly triggerable via untrusted input.
7. Lack of hardening measures. Code is not expected to implement all security best practices; only flag concrete vulnerabilities.
8. Theoretical race conditions or timing attacks. Only report a race condition if concretely problematic.
9. Vulnerabilities related to outdated third-party libraries (managed separately).
10. Memory-safety issues in memory-safe languages (Rust, Go, etc.).
11. Files that are only unit tests or only used during tests.
12. Log-spoofing concerns. Outputting unsanitized user input to logs is not a vulnerability.
13. SSRF that only controls the path. SSRF is a concern only if it can control host or protocol.
14. Including user-controlled content in AI system prompts is not a vulnerability.
15. Regex injection.
16. Regex DoS.
17. Insecure documentation. Do not flag findings in markdown or other docs.
18. Lack of audit logs.
**Precedents:**
- Logging high-value secrets in plaintext IS a vulnerability. Logging URLs is assumed safe.
- UUIDs can be assumed unguessable and do not need validation.
- Environment variables and CLI flags are trusted. Attacks that rely on controlling them are invalid.
- Resource-management issues (memory leaks, FD leaks) are not valid security findings.
- Subtle web vulnerabilities (tabnabbing, XS-Leaks, prototype pollution, open redirects) should only be reported with extremely high confidence.
- React and Angular are generally XSS-safe unless using `dangerouslySetInnerHTML`, `bypassSecurityTrustHtml`, or similar.
- Most vulnerabilities in GitHub Action workflows are not exploitable in practice. Validate with a concrete attack path.
- Include MEDIUM findings only if obvious and concrete.
- Most vulnerabilities in `.ipynb` notebooks are not exploitable.
- Logging non-PII data is not a vulnerability.
- Command injection in shell scripts is generally not exploitable since shell scripts rarely run with untrusted user input. Validate concretely.
**Signal-quality criteria:**
1. Is there a concrete, exploitable vulnerability with a clear attack path?
2. Is this a real security risk vs. theoretical best practice?
3. Are there specific code locations and reproduction steps?
4. Would a security team find this actionable?
**Confidence score (1–10):**
- 1–3: Low — likely false positive or noise.
- 4–6: Medium — needs investigation.
- 7–10: High — likely true vulnerability.
## Output format
Output your findings in markdown only. Each finding must include file, line number, severity, category, description, **the concrete exploit scenario from the third pass** (not a generic one), and fix recommendation. A finding without a concrete exploit scenario from the third pass should not appear in the report.
Example:
```markdown
# Vuln 1: XSS — `foo.py:42`
* Severity: High
* Category: xss
* Description: User input from the `username` parameter is directly interpolated into HTML without escaping, allowing reflected XSS.
* Exploit Scenario: An attacker crafts a URL like `/bar?q=<script>alert(document.cookie)</script>` to execute JavaScript in the victim's browser, enabling session hijacking.
* Recommendation: Use Flask's `escape()` or Jinja2 templates with auto-escaping enabled for all user inputs rendered in HTML.
```
**Severity guidelines:**
- **HIGH** — Directly exploitable: RCE, data breach, auth bypass.
- **MEDIUM** — Requires specific conditions but with significant impact.
- **LOW** — Defense-in-depth or lower-impact issues. Generally do not report unless concrete.
## Final reminder
Better to miss some theoretical issues than flood the report with false positives. Each finding should be something a security engineer would confidently raise in a PR review. Your final reply must contain the markdown report and nothing else.
+156
View File
@@ -0,0 +1,156 @@
---
name: skill-creator
description: Create new skills (SKILL.md files), modify and improve existing skills, and design skill descriptions for accurate triggering. Use when the user wants to create a new skill from scratch, edit an existing skill, optimize a skill's description, or convert a workflow they just demonstrated into a reusable skill.
license: MIT (adapted from anthropics/skills/skills/skill-creator)
---
# Skill Creator
A skill for creating new skills and iteratively improving them.
At a high level, the process of creating a skill goes like this:
- Decide what the skill should do and roughly how it should do it
- Write a draft of the skill (`SKILL.md`)
- Try the skill on a few realistic test prompts
- Evaluate the results, both qualitatively (does the output look right?) and, where possible, with simple verifiable assertions
- Refine the skill based on what you observed
- Repeat until satisfied
- Optimize the description for accurate triggering
Your job when using this skill is to figure out where the user is in this process and help them progress through the stages. If they say "I want to make a skill for X", help narrow down what they mean, write a draft, try a few realistic prompts, and iterate. If they already have a draft, jump straight to testing and iterating.
If the user just says "vibe with me, no formal evals", do that.
## Communicating with the user
Skill-creator is liable to be used by people across a wide range of familiarity with coding jargon. Pay attention to context cues:
- "evaluation" / "benchmark" — borderline OK
- "JSON" / "assertion" — explain unless the user shows familiarity
It is fine to briefly clarify a term when in doubt.
## Capture intent
Start by understanding what the user wants. The current conversation may already contain the workflow to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first — the tools used, the sequence of steps, corrections made, the input/output formats observed. The user can fill the gaps and confirm.
Ask:
1. What should this skill enable the model to do?
2. When should this skill trigger? (what user phrases / contexts)
3. What is the expected output format?
4. Should we set up test cases to verify the skill works? Skills with objectively verifiable outputs (file transforms, data extraction, code generation, fixed workflow steps) benefit from test cases. Skills with subjective outputs (writing style, art) often do not. Suggest the appropriate default but let the user decide.
## Interview and research
Proactively ask about edge cases, input/output formats, example files, success criteria, and dependencies. Wait to write test prompts until this is ironed out.
If the platform supports parallel sub-tasks, research in parallel (search docs, find similar skills, check best practices).
## Writing the SKILL.md
Based on the interview, fill in:
- **`name`** — the skill identifier (must match the directory name; lowercase alphanumeric with single hyphens, regex `^[a-z0-9]+(-[a-z0-9]+)*$`).
- **`description`** — when to trigger and what the skill does. **This is the primary triggering mechanism**. Include both what the skill does AND specific contexts for when to use it. All "when to use" info goes here, not in the body. Skills tend to under-trigger, so make descriptions slightly "pushy" — e.g. instead of *"Build a fast dashboard"*, write *"Build a fast dashboard. Make sure to use this skill whenever the user mentions dashboards, data visualization, internal metrics, or wants to display any kind of company data, even if they do not explicitly ask for a 'dashboard.'"*
- **`license`** (optional) — the license under which the skill is distributed.
Then write the body.
## Anatomy of a skill
```
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description required)
│ └── Markdown instructions
└── Bundled resources (optional)
├── scripts/ — Executable code for deterministic / repetitive tasks
├── references/ — Docs loaded into context as needed
└── assets/ — Files used in output (templates, icons, fonts)
```
## Progressive disclosure
Skills use a three-level loading system:
1. **Metadata** (name + description) — always in context, ~100 words.
2. **`SKILL.md` body** — in context whenever the skill triggers; aim for under 500 lines.
3. **Bundled resources** — loaded as needed; unlimited size; scripts can execute without loading.
**Key patterns:**
- Keep `SKILL.md` under 500 lines. If approaching the limit, add a layer of hierarchy with clear pointers to follow-up files.
- Reference files clearly from `SKILL.md` with guidance on when to read them.
- For large reference files (>300 lines), include a table of contents.
**Domain organization:** when a skill supports multiple domains/frameworks, organize by variant:
```
cloud-deploy/
├── SKILL.md (workflow + selection)
└── references/
├── aws.md
├── gcp.md
└── azure.md
```
The model reads only the relevant reference file.
## Principle of lack of surprise
Skills must not contain malware, exploit code, or any content that could compromise system security. A skill's contents should not surprise the user given its description. Do not create misleading skills or skills designed to facilitate unauthorized access, data exfiltration, or other malicious activities. Roleplay-style skills are fine.
## Writing style
- Use **imperative form** in instructions ("Do X", "Run Y").
- **Explain the why** behind instructions. Today's models are smart and follow reasoning better than rigid rules. If you find yourself writing ALL-CAPS MUSTs and NEVERs, that is a yellow flag. Reframe and explain the reasoning instead.
- Keep instructions general and reusable, not narrowly tied to specific test examples.
**Defining output formats** — use a clear template:
```markdown
## Report structure
ALWAYS use this exact template:
# [Title]
## Executive summary
## Key findings
## Recommendations
```
**Examples pattern** — small, concrete examples help:
```markdown
## Commit message format
**Example 1:**
Input: Added user authentication with JWT tokens
Output: feat(auth): implement JWT-based authentication
```
## Test cases
After drafting, come up with 2–3 realistic test prompts — the kind of thing a real user would actually say. Share them with the user: *"Here are a few test cases I'd like to try. Do these look right, or do you want to add more?"*
Try the skill on each prompt. Read the transcripts (not just the final outputs) to see whether the skill is causing the model to waste effort on unhelpful steps.
## Iterating
- **Generalize from feedback.** Skills will be used many times across many prompts. Avoid overfitting to test cases. If something is stubborn, try a different metaphor or pattern rather than adding more rigid MUSTs.
- **Keep the prompt lean.** Remove instructions that do not pull their weight.
- **Explain the why.** Models follow reasoning better than rote rules.
- **Look for repeated work across test cases.** If multiple runs each independently wrote the same helper script, that is a signal to bundle it under `scripts/` and tell the skill to use it.
After improving the skill, re-run the test prompts and check that the issues are resolved without breaking earlier behavior.
## Description optimization (advanced)
The `description` field is the primary mechanism that determines whether the model invokes a skill. To optimize it:
1. Generate ~20 trigger-eval queries — a mix of should-trigger and should-not-trigger. The should-not-trigger ones should be near-misses, not obvious negatives.
2. Have the user review the eval set.
3. Iterate on the description, testing each version against both train and held-out test queries. Pick the description that performs best on the held-out set, not on train, to avoid overfitting.
## Notes
This is an adapted port of `anthropics/skills/skills/skill-creator`. The upstream version ships bundled scripts and an HTML eval viewer (`scripts/aggregate_benchmark.py`, `eval-viewer/generate_review.py`, etc.) that are not included here. For automated benchmarking infrastructure, see <https://github.com/anthropics/skills/tree/main/skills/skill-creator>.