@complexthings/superpowers-agent 8.4.1 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.agents/skills/caveman/SKILL.md +49 -0
  2. package/.agents/skills/diagnose/SKILL.md +117 -0
  3. package/.agents/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  4. package/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  5. package/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +63 -0
  6. package/.agents/skills/grill-with-docs/SKILL.md +90 -0
  7. package/.agents/skills/handoff/SKILL.md +15 -0
  8. package/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  9. package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  10. package/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  11. package/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  12. package/.agents/skills/improve-codebase-architecture/SKILL.md +81 -0
  13. package/.agents/skills/karpathy-guidelines/SKILL.md +75 -0
  14. package/.agents/skills/prototype/LOGIC.md +79 -0
  15. package/.agents/skills/prototype/SKILL.md +30 -0
  16. package/.agents/skills/prototype/UI.md +112 -0
  17. package/.agents/skills/review/SKILL.md +78 -0
  18. package/.agents/skills/setup-matt-pocock-skills/SKILL.md +125 -0
  19. package/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
  20. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +22 -0
  21. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  22. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
  23. package/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  24. package/.agents/skills/tdd/SKILL.md +109 -0
  25. package/.agents/skills/tdd/deep-modules.md +33 -0
  26. package/.agents/skills/tdd/interface-design.md +31 -0
  27. package/.agents/skills/tdd/mocking.md +59 -0
  28. package/.agents/skills/tdd/refactoring.md +10 -0
  29. package/.agents/skills/tdd/tests.md +61 -0
  30. package/.agents/skills/to-issues/SKILL.md +83 -0
  31. package/.agents/skills/to-prd/SKILL.md +76 -0
  32. package/.agents/skills/triage/AGENT-BRIEF.md +168 -0
  33. package/.agents/skills/triage/OUT-OF-SCOPE.md +101 -0
  34. package/.agents/skills/triage/SKILL.md +103 -0
  35. package/.agents/skills/ubiquitous-language/SKILL.md +93 -0
  36. package/.agents/skills/zoom-out/SKILL.md +7 -0
  37. package/.agents/superpowers-agent +120 -140
  38. package/.github/copilot-instructions.md +3 -0
  39. package/.github/workflows/main.yaml +1 -1
  40. package/AGENTS.md +97 -0
  41. package/README.md +32 -94
  42. package/package.json +3 -5
  43. package/skills/collaboration/leveraging-cli-tools/SKILL.md +48 -101
  44. package/skills/meta/create-agents-md/SKILL.md +182 -0
  45. package/skills/meta/create-agents-md/skill.json +9 -0
  46. package/skills/meta/writing-prompts/SKILL.md +64 -287
  47. package/skills/meta/writing-prompts/references/platforms.md +114 -0
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: create-agents-md
3
+ description: Analyzes a codebase and creates or improves an AGENTS.md file at the repo root — the open-standard instruction file that AI coding agents (Claude Code, Codex, Cursor, Copilot, Gemini CLI, Aider, and others) read for build/test commands, code style, and conventions. Use whenever the user asks to create, generate, write, update, or improve an AGENTS.md, onboard agents to a repo, document build/test/lint commands for AI tools, or consolidate scattered agent instruction files (CLAUDE.md, .cursorrules, .cursor/rules, .github/copilot-instructions.md) into one. Use even if the user only says "make an agents file" or "document this repo for AI agents".
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Create AGENTS.md
9
+
10
+ ## Overview
11
+
12
+ `AGENTS.md` is an open, cross-tool standard (https://agents.md/): a "README for agents" placed at the repo root that gives AI coding agents the build steps, test commands, and conventions they need to work in a repository. 20+ tools read it, including Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, Aider, Jules, and Zed.
13
+
14
+ This skill produces that file by **reading the actual repository** and writing down what is true of it — never boilerplate, never invented conventions.
15
+
16
+ **Core principle: facts only.** Every command, style rule, and convention in the output must come from a file you actually read. If you can't verify it, don't write it. A short AGENTS.md that is 100% accurate beats a long one padded with plausible guesses — agents will run the commands you list, and a wrong command wastes their time.
17
+
18
+ ## When NOT to use this skill
19
+
20
+ - The user wants a human-facing project README → that's `README.md`, not AGENTS.md.
21
+ - The user wants to set up the superpowers skills system → use `setup-skills`.
22
+ - The user wants to audit/improve a subagent prompt file → use `enhance-agent-prompts`.
23
+
24
+ ## Workflow
25
+
26
+ Copy this checklist and track progress as you go:
27
+
28
+ ```
29
+ AGENTS.md Progress:
30
+ - [ ] Step 1: Detect ecosystem and locate inputs
31
+ - [ ] Step 2: Read existing instruction files (don't replace blindly)
32
+ - [ ] Step 3: Extract verifiable commands (build, lint, test, single test)
33
+ - [ ] Step 4: Infer code style and conventions from real source
34
+ - [ ] Step 5: Decide scope — single file vs. nested (monorepo)
35
+ - [ ] Step 6: Write or improve AGENTS.md
36
+ - [ ] Step 7: Self-review against the accuracy checklist
37
+ ```
38
+
39
+ Use `leveraging-cli-tools` throughout — prefer `rg`, `fd`, `bat`, `jq`, and `ast-grep` over slower alternatives. The detection commands below assume them.
40
+
41
+ ### Step 1: Detect ecosystem and locate inputs
42
+
43
+ Identify the stack before reading anything in depth. This tells you which config files matter.
44
+
45
+ ```bash
46
+ # Manifests and lockfiles reveal the package manager and language
47
+ fd -H -d 2 '^(package\.json|pnpm-lock\.yaml|yarn\.lock|package-lock\.json|bun\.lockb|Cargo\.toml|go\.mod|pyproject\.toml|requirements\.txt|Gemfile|composer\.json|pom\.xml|build\.gradle)$'
48
+ ```
49
+
50
+ The lockfile is the source of truth for the package manager: `pnpm-lock.yaml` → pnpm, `yarn.lock` → yarn, `bun.lockb` → bun, otherwise `package-lock.json` → npm. Use the right one in every command you document — telling an agent to run `npm test` in a pnpm repo is a factual error.
51
+
52
+ ### Step 2: Read existing instruction files
53
+
54
+ Read each of these if present. The goal is to **improve, not overwrite** — preserve still-accurate content and fold in scattered rules.
55
+
56
+ ```bash
57
+ fd -H -d 3 '^(AGENTS\.md|CLAUDE\.md|GEMINI\.md|\.cursorrules|copilot-instructions\.md)$'
58
+ fd -H -t f . .cursor/rules 2>/dev/null # Cursor rules live here as .mdc files
59
+ ```
60
+
61
+ - **Existing `AGENTS.md`** — treat as the base. Keep what's correct, fix what's stale, fill gaps.
62
+ - **`.cursor/rules/*.mdc`, `.cursorrules`, `.github/copilot-instructions.md`, `CLAUDE.md`, `GEMINI.md`** — extract real rules (style, conventions, do/don'ts) and incorporate them verbatim or tightly summarized. Note their source so the user can later consolidate (see [Consolidating instruction files](#consolidating-instruction-files)).
63
+
64
+ ### Step 3: Extract verifiable commands
65
+
66
+ These are the highest-value content — agents run them directly. Pull them from config, don't guess.
67
+
68
+ ```bash
69
+ # Node: the scripts block IS the command list
70
+ jq '.scripts' package.json 2>/dev/null
71
+
72
+ # Other ecosystems: read the real task definitions
73
+ bat Makefile justfile Taskfile.yml 2>/dev/null
74
+ rg -n '\[tool\.(poetry|hatch|pdm)\.|^\[project\.scripts\]' pyproject.toml 2>/dev/null
75
+ ```
76
+
77
+ Capture: **build**, **lint**, **lint:fix/format**, **typecheck**, **test**, and crucially **how to run a single test in isolation** (e.g. `vitest run path/to/file.test.ts -t "name"`, `pytest path::test_name`, `go test ./pkg -run TestName`). Single-test invocation is the one agents most often get wrong, so derive it from the actual test runner rather than assuming.
78
+
79
+ If a command isn't defined anywhere, say how the tool is normally invoked for that runner — but only if the runner is actually present in the manifest.
80
+
81
+ ### Step 4: Infer code style and conventions
82
+
83
+ Read formatter/linter config first (these are authoritative), then confirm against a representative sample of real source files.
84
+
85
+ ```bash
86
+ fd -H -d 2 '^(\.eslintrc.*|eslint\.config\.*|\.prettierrc.*|prettier\.config\.*|biome\.json|\.editorconfig|ruff\.toml|\.rubocop\.yml|rustfmt\.toml|tsconfig\.json)$'
87
+ ```
88
+
89
+ Confirm by reading several source files in the primary language — don't document a rule the config implies but the code contradicts. Cover what an agent needs to match the house style:
90
+
91
+ - **Imports** — ordering, named vs. default, file extensions, path aliases.
92
+ - **Formatting** — quotes, semicolons, indentation, line length (usually settled by the formatter config — cite it).
93
+ - **Types** — strictness, annotation expectations, `any` policy.
94
+ - **Naming** — files, functions, variables, constants, components, CSS classes.
95
+ - **Error handling** — the pattern actually used (Result types, exceptions, error-wrapping helpers) and anything the codebase clearly avoids.
96
+
97
+ For naming/error patterns, prefer `ast-grep` or `rg` over eyeballing one file, so the convention you state reflects the codebase, not a single example.
98
+
99
+ ### Step 5: Decide scope — single file vs. nested
100
+
101
+ AGENTS.md supports **nested files**: an agent reads the nearest one in the directory tree, so the closest file wins. For a monorepo, a per-package AGENTS.md often beats one bloated root file.
102
+
103
+ - **Single package** → one root `AGENTS.md`.
104
+ - **Monorepo** (workspaces in `package.json`, `pnpm-workspace.yaml`, Nx/Turbo/Lerna, multiple manifests) → write a root file with shared/global instructions, and offer to add per-package files where commands or conventions genuinely differ. Don't duplicate identical content into every package.
105
+
106
+ ### Step 6: Write or improve AGENTS.md
107
+
108
+ Write to `AGENTS.md` at the repo root (or the relevant package root for nested files). It's plain Markdown with no required schema — use clear headings. Default to the structure below, dropping any section you have no real content for.
109
+
110
+ Keep it precise and scannable, written for an agent audience, with no prose padding. **~150 lines is a ceiling, not a goal** — let the real content set the length. A small library might warrant only 30–40 lines; a large monorepo more. If you find yourself adding material to fill space, stop: a short, fully accurate file is the win, and padding directly violates the facts-only principle.
111
+
112
+ ```markdown
113
+ # AGENTS.md
114
+
115
+ Short orienting line: what this project is and the primary language/framework.
116
+
117
+ ## Setup
118
+ - Install: `<exact command for this repo's package manager>`
119
+ - Env/prereqs: `<only if real — node version from .nvmrc/engines, services, etc.>`
120
+
121
+ ## Commands
122
+ - Build: `<cmd>`
123
+ - Dev: `<cmd>`
124
+ - Lint: `<cmd>` | Fix: `<cmd>` | Typecheck: `<cmd>`
125
+ - Test (all): `<cmd>`
126
+ - Test (single): `<exact single-test invocation>`
127
+
128
+ ## Code style
129
+ - Imports: `<order, named/default, extensions, aliases>`
130
+ - Formatting: `<quotes, semicolons, indent, width — cite the formatter>`
131
+ - Types: `<strictness, annotation rules, any policy>`
132
+
133
+ ## Naming conventions
134
+ - Files / functions / variables / constants / components / CSS — only the rules that hold
135
+
136
+ ## Error handling
137
+ - The pattern this codebase uses; what to avoid
138
+
139
+ ## <Project-specific rules pulled from Cursor/Copilot/CLAUDE files>
140
+ - Folded-in rules, kept verbatim or tightly summarized
141
+
142
+ ## PR / commit guidelines
143
+ - Only if the repo evidences a convention (commitlint, CONTRIBUTING.md, PR template, git log pattern)
144
+ ```
145
+
146
+ Adapt headings to the project. Sourced rules from `.cursor/rules`, Copilot, etc. should be merged into the relevant section above rather than ghettoized — but keep a short note of provenance if it helps the user consolidate later.
147
+
148
+ ### Step 7: Self-review against the accuracy checklist
149
+
150
+ Before declaring done, re-read the file and verify every line:
151
+
152
+ ```
153
+ - [ ] Every command was copied from a real script/task/config — not assumed
154
+ - [ ] The package manager matches the lockfile in every command
155
+ - [ ] A single-test invocation is present and correct for the actual runner
156
+ - [ ] Every style/naming/error rule traces to config or observed source
157
+ - [ ] Rules from Cursor/Copilot/CLAUDE files are incorporated, not lost
158
+ - [ ] No invented conventions, no aspirational rules, no generic filler
159
+ - [ ] An existing AGENTS.md was improved, not blindly replaced
160
+ - [ ] Length is set by real content, not a quota (≤ ~150 lines); agent-audience tone; scannable
161
+ ```
162
+
163
+ If anything fails, fix it before finishing.
164
+
165
+ ## Consolidating instruction files
166
+
167
+ A common (community, not part of the official spec) convention is to make AGENTS.md the single source of truth and symlink tool-specific files to it, so every tool reads the same content:
168
+
169
+ ```bash
170
+ ln -sf AGENTS.md CLAUDE.md
171
+ ln -sf AGENTS.md GEMINI.md
172
+ ln -sf AGENTS.md .github/copilot-instructions.md
173
+ ```
174
+
175
+ Only do this if the user asks. Flag it as optional and confirm first — it's a destructive change to existing files, and some teams deliberately keep tool-specific instructions separate.
176
+
177
+ ## Edge cases
178
+
179
+ - **Empty or near-empty repo** — document only the scaffolding that exists (e.g. the manifest and its scripts). Don't pad.
180
+ - **Polyglot repo** — lead with the primary language; give each significant language its own command block.
181
+ - **Conflicting rules across instruction files** — prefer what the code and config actually do; note the conflict for the user rather than silently picking one.
182
+ - **No build/test tooling at all** — keep the file minimal and say so plainly, rather than inventing commands.
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "name": "superpowers:meta/create-agents-md",
4
+ "title": "create-agents-md",
5
+ "aliases": [
6
+ "create-agents-md",
7
+ "meta/create-agents-md"
8
+ ]
9
+ }
@@ -1,345 +1,122 @@
1
1
  ---
2
2
  name: writing-prompts
3
- description: Use when creating custom slash commands or prompt files for GitHub Copilot, Cursor, or Claude, when repeating same instructions 2+ times, when tempted to defer command creation, or when unsure about platform-specific formats - guides creation of reusable AI commands with platform-specific syntax, file locations, and best practices for effective prompt engineering
3
+ description: Use when creating a reusable AI command, slash command, prompt file, or skill for Claude Code, GitHub Copilot, or Cursor, when you catch yourself repeating the same instructions 2+ times, or when a prompt keeps producing unreliable results. Guides prompt-engineering craft — leading with the goal, defining verifiable success criteria, keeping the prompt minimal — plus current platform formats (all three platforms now converge on SKILL.md). Use even when the user just says "make this reusable," "save this as a command," or "why does this prompt keep failing."
4
4
  ---
5
5
 
6
6
  # Writing Prompts
7
7
 
8
- ## Overview
8
+ A reusable command is a prompt you've decided to keep. Its quality is the quality of the prompt inside it — so most of this skill is about writing a prompt that works, and a smaller part is about where each platform wants the file to live.
9
9
 
10
- Create reusable custom commands (slash commands) for GitHub Copilot, Cursor, or Claude. These commands standardize workflows, reduce repetition, and make AI assistance more efficient across your team.
10
+ **Core principle:** A good prompt reads like a brief to a sharp new colleague who lacks your context. State the goal, give the context they're missing, and define how they'll know they're done. If a teammate would be confused by it, the model will be too.
11
11
 
12
- **Core principle:** Well-written prompts are reusable workflows that save time and ensure consistency. They transform one-off instructions into team-wide standards.
12
+ ## When to turn a prompt into a command
13
13
 
14
- ## When to Use
14
+ Create a reusable command when you've run the same instructions 2+ times, when you want a workflow to be consistent across a team, or when a multi-step process keeps drifting. The second time you paste the same prompt is the signal — capture it then, while you still remember the edge cases, rather than "later."
15
15
 
16
- **Create a prompt when:**
17
- - You find yourself repeating the same instructions across sessions (2+ times = create it now)
18
- - You want to standardize a workflow for your team
19
- - A process involves multiple steps that benefit from templating
20
- - You need consistent formatting or structure for outputs
21
- - Someone asks you to "make this reusable" or "save this for later"
16
+ Skip it for genuine one-offs and for trivial queries that don't benefit from a saved template. A command that's too broad ("help with testing") is worse than none — it can't give the model enough to act on.
22
17
 
23
- **CRITICAL:** If you've done the same task 2+ times, create the command NOW. Don't defer - "I'll create it later" becomes "I'll never create it."
18
+ ## How to write the prompt
24
19
 
25
- **Don't create for:**
26
- - One-off tasks you'll never repeat
27
- - Simple queries that don't benefit from templating
28
- - Platform-specific features already well-documented
20
+ This is the part that determines whether the command is worth keeping. The ordering below roughly tracks impact.
29
21
 
30
- ## Platform Comparison
22
+ ### 1. Lead with the goal
31
23
 
32
- | Platform | Directory | File Format | File Extension | Notes |
33
- |----------|-----------|-------------|----------------|-------|
34
- | **GitHub Copilot** | `.github/prompts` or profile folder | Markdown with YAML frontmatter | `.md` | Supports variables like `${selection}` |
35
- | **Cursor** | `.cursor/commands` (project) or `~/.cursor/commands` (global) | Plain Markdown | `.md` | Simple markdown, no frontmatter required |
36
- | **Claude** | `.claude/commands` | Markdown | `.md` | Similar to Cursor format |
24
+ Open with one sentence stating what success looks like. The model orients everything else around it. "Generate a React component with typed props and a passing test" beats a prompt that buries the objective under setup.
37
25
 
38
- **CRITICAL:** Each platform has different format requirements. Using the wrong format will break the command. Always verify:
39
- - GitHub Copilot: Requires YAML frontmatter
40
- - Cursor: Plain Markdown only (no frontmatter)
41
- - Claude: Plain Markdown only (no frontmatter)
26
+ ### 2. Give the context the model is missing
42
27
 
43
- **Platform format errors are not fixable later** - the command simply won't work. Get it right the first time.
28
+ The model is capable but has no memory of your situation. Supply the specifics it can't infer — file paths, the framework in use, conventions, constraints — and say *why* when the reason isn't obvious. Explaining motivation ("we exclude test accounts because they skew the metrics") lets the model generalize to cases your instructions didn't anticipate, instead of following a rule blindly.
44
29
 
45
- ## GitHub Copilot Prompt Files
30
+ Reason from facts you actually have. Don't invent paths, ticket IDs, or constraints to fill a gap — name the gap instead.
46
31
 
47
- **Location:**
48
- - **Workspace:** `.github/prompts/` (project-specific)
49
- - **User profile:** Profile folder (global, synced via Settings Sync)
32
+ When the command will run repeatedly, wire in the inputs it needs rather than expecting them pasted each time — have it read the file, run the diff, or fetch the data itself (platforms.md covers the per-platform syntax for this). A command that gathers its own context is the difference between a saved note and a tool.
50
33
 
51
- **Structure:**
52
- ```markdown
53
- ---
54
- description: Brief description of what this prompt does
55
- agent: optional-agent-name
56
- tools: [tool1, tool2]
57
- ---
34
+ ### 3. Define verifiable success criteria
58
35
 
59
- # Prompt Name
36
+ This is the highest-leverage habit. Translate vague asks into outcomes the model can check itself:
60
37
 
61
- ## Overview
62
- What this prompt accomplishes.
38
+ - "Add validation" → "Write tests for the invalid inputs, then make them pass"
39
+ - "Fix the bug" → "Write a failing test that reproduces it, then make it pass"
40
+ - "Refactor X" → "Tests pass before and after; behavior unchanged"
63
41
 
64
- ## Steps
65
- 1. First step
66
- 2. Second step
42
+ For multi-step work, attach a check to each step and state an explicit stop condition, so the command can loop on its own instead of pausing for clarification:
67
43
 
68
- ## Expected Output
69
- What the output should look like.
70
44
  ```
71
-
72
- **Key Features:**
73
- - YAML frontmatter for metadata (description, agent, tools)
74
- - Supports variables: `${selection}`, `${workspaceFolder}`, `${file}`
75
- - Can reference custom agents and specify tool lists
76
- - Run via `/` prefix or Command Palette
77
-
78
- **Example:**
79
- ```markdown
80
- ---
81
- description: Create a React component with TypeScript and tests
82
- ---
83
-
84
- # Create React Component
85
-
86
- ## Overview
87
- Generate a complete React component with TypeScript types, tests, and proper structure.
88
-
89
- ## Component Details
90
- - Component name: ${1:ComponentName}
91
- - Props interface: Define based on requirements
92
- - Include: useState, useEffect hooks as needed
93
-
94
- ## Output Format
95
- 1. Component file: `components/${1:ComponentName}.tsx`
96
- 2. Test file: `components/__tests__/${1:ComponentName}.test.tsx`
97
- 3. Export from index if needed
45
+ 1. <step> → verify: <check>
46
+ 2. <step> → verify: <check>
98
47
  ```
99
48
 
100
- ## Cursor Commands
49
+ Weak criteria ("make it work") force the model to come back and ask. Strong, checkable criteria let it run to completion. Default to strong.
101
50
 
102
- **Location:**
103
- - **Project:** `.cursor/commands/` (project root)
104
- - **Global:** `~/.cursor/commands/` (home directory)
105
- - **Team:** Created in Cursor Dashboard (Team/Enterprise plans)
51
+ ### 4. Keep it minimal
106
52
 
107
- **Structure:**
108
- ```markdown
109
- # Command Name
53
+ Write the shortest prompt that gets the job done. Every extra instruction competes for attention and invites the model to overbuild. Cut speculative sections, preemptive caveats for failures that can't happen, and "flexibility" nobody asked for. If a draft is 30 lines and could be 10, rewrite it. The senior-engineer test: "Is this overcomplicated?" If yes, cut.
110
54
 
111
- ## Overview
112
- What this command does.
55
+ Trust the model with what it already knows. You don't need to explain what a PDF is or how a for-loop works — only what's specific to your task.
113
56
 
114
- ## Steps
115
- 1. First step
116
- 2. Second step
57
+ ### 5. Show an example when format matters
117
58
 
118
- ## Checklist
119
- - [ ] Item 1
120
- - [ ] Item 2
121
- ```
59
+ When output shape, tone, or structure matters, one or two concrete input→output examples steer the result more reliably than describing it in prose. Make examples relevant and varied; if you wrap them in clear delimiters the model won't mistake them for instructions to follow literally.
122
60
 
123
- **Key Features:**
124
- - Plain Markdown (no frontmatter required)
125
- - Simple, readable format
126
- - Parameters passed after command name: `/command-name additional context`
127
- - Team commands sync automatically to all members
61
+ ### 6. Structure for the model to parse
128
62
 
129
- **Example:**
130
- ```markdown
131
- # Code Review Checklist
63
+ - Put long reference material (documents, data, logs) near the **top**, and the actual instruction or question near the **bottom**. Trailing instructions measurably improve responses on long inputs.
64
+ - Separate distinct kinds of content with delimiters or tags (e.g. `<context>`, `<task>`, `<example>`) so the model can tell the brief from the data. Use the same tag names consistently.
65
+ - Reach for explicit sections (context / task / constraints / success criteria) only when the prompt is big enough to need them. On a short prompt, sections are padding — prose is fine.
132
66
 
133
- ## Overview
134
- Comprehensive checklist for conducting thorough code reviews.
67
+ ### 7. Write direct, positive instructions
135
68
 
136
- ## Review Categories
69
+ Tell the model what to do, not what to avoid: "Respond in flowing prose paragraphs" works better than "Don't use bullet points." Be explicit about scope, because current models read prompts literally and won't widen scope on their own — "apply this to every section, not just the first" leaves nothing to guess.
137
70
 
138
- ### Functionality
139
- - [ ] Code does what it's supposed to do
140
- - [ ] Edge cases are handled
141
- - [ ] Error handling is appropriate
71
+ Resist the urge to shout. Modern models over-react to `CRITICAL:` / `YOU MUST` / `NEVER` and aggressive capitals — it makes them rigid and anxious, not more careful. "Use this tool when handling PDFs" lands better than "CRITICAL: You MUST ALWAYS use this tool." Save emphasis for the rare instruction that genuinely overrides a strong default, and explain *why* it matters rather than how loudly.
142
72
 
143
- ### Code Quality
144
- - [ ] Code is readable and well-structured
145
- - [ ] Functions are small and focused
146
- - [ ] Follows project conventions
73
+ ### 8. Keep edits surgical
147
74
 
148
- ### Security
149
- - [ ] No obvious security vulnerabilities
150
- - [ ] Input validation is present
151
- - [ ] No hardcoded secrets
152
- ```
75
+ When refining an existing prompt, change only what isn't working. Don't reword lines that already do their job or reorder sections for the sake of it. Match the author's voice — if they'd phrase something differently than you would, theirs wins. Every change should trace to a concrete gain in clarity, completeness, or executability; if it doesn't, revert it.
153
76
 
154
- ## Claude Commands
77
+ ## Worked example
155
78
 
156
- **Location:**
157
- - `.claude/commands/` (project root)
79
+ A raw, repeated instruction:
158
80
 
159
- **Structure:**
160
- Similar to Cursor - plain Markdown files.
81
+ > "make me a command that reviews code for security stuff"
161
82
 
162
- **Key Features:**
163
- - Markdown format
164
- - Triggered with `/` prefix
165
- - Can include parameters after command name
83
+ Refined into a prompt worth saving:
166
84
 
167
- **Example:**
168
85
  ```markdown
169
- # Security Audit
170
-
171
- ## Overview
172
- Comprehensive security review to identify vulnerabilities.
86
+ Review the staged diff for security vulnerabilities.
173
87
 
174
- ## Steps
175
- 1. **Dependency audit**
176
- - Check for known vulnerabilities
177
- - Update outdated packages
88
+ Focus on the OWASP categories most relevant to this stack: injection,
89
+ broken access control, secrets in code, and unsafe deserialization.
178
90
 
179
- 2. **Code security review**
180
- - Check for common vulnerabilities
181
- - Review authentication/authorization
91
+ For each finding, report: file:line, the risk, and a concrete fix.
92
+ End with a one-line verdict: SAFE TO MERGE or CHANGES REQUESTED.
182
93
 
183
- ## Security Checklist
184
- - [ ] Dependencies updated and secure
185
- - [ ] No hardcoded secrets
186
- - [ ] Input validation implemented
94
+ If there are no findings, say so explicitly — don't invent issues to seem thorough.
187
95
  ```
188
96
 
189
- ## Best Practices
97
+ What changed: a single clear goal, the missing context (which risks to weight), an explicit output shape, and a stop condition that prevents the model from padding the report. No CAPS, no nagging — just a brief a colleague could act on.
190
98
 
191
- ### 1. Always Use Proper Structure
192
- Even if you already have working text, restructure it properly:
193
- - Start with Overview (what it does)
194
- - Use numbered steps for processes
195
- - Use checklists for reviews/audits
196
- - Include expected output format
99
+ ## Platform formats
197
100
 
198
- **Don't skip structure because "it already works"** - raw text isn't a reusable command. Structure enables discovery, consistency, and maintenance.
101
+ The three major platforms have converged: **a reusable command is increasingly just a `SKILL.md` file.** Claude Code merged custom commands into skills; Cursor (2.4+) promotes Skills as the successor to commands; GitHub Copilot uses prompt files alongside `AGENTS.md`. Older formats still work, but new work should prefer skills where the platform supports them.
199
102
 
200
- ### 2. Clarify Vague Requests
201
- If the request is vague (e.g., "command that helps with testing"), ask clarifying questions:
202
- - What specific type of testing? (unit, integration, e2e)
203
- - What should the command do? (generate tests, review tests, run tests)
204
- - What's the expected output format?
103
+ Pick the file location and frontmatter for your target platform from **[references/platforms.md](references/platforms.md)** it has the exact directories, extensions, frontmatter fields, and argument syntax for Claude Code, GitHub Copilot, and Cursor, with the legacy formats noted. Read it when you're ready to save the file; using the wrong directory or argument token is the one mistake the model can't reason its way out of after the fact.
205
104
 
206
- **Don't create overly broad commands** - they become useless. Specificity is essential.
105
+ ## Before you ship it
207
106
 
208
- ### 3. Be Specific
209
- - ❌ Bad: "Review the code"
210
- - ✅ Good: "Review code for security vulnerabilities, error handling, and adherence to project conventions"
107
+ Read the draft once more as if you didn't write it, through three quick lenses:
211
108
 
212
- ### 4. Use Examples
213
- Include concrete examples of expected input/output when helpful:
214
- ```markdown
215
- ## Example Usage
216
- Input: `/create-api for listing customers`
217
- Expected: Creates REST API endpoint with GET /api/customers
218
- ```
219
-
220
- ### 5. Parameter Handling
221
- - GitHub Copilot: Use `${1:default}` syntax for variables
222
- - Cursor/Claude: Document parameters in description or examples
223
- - Accept additional context after command name
109
+ - **What's sloppy?** Redundant lines, assumptions stated as fact, speculative sections.
110
+ - **What's missing?** Anything that would make it fail on the first run — an undefined success criterion, missing context, an ambiguous scope.
111
+ - **What am I hiding behind structure?** Headings and ceremony that dress up a thin prompt. Cut to the prompt that actually does the work.
224
112
 
225
- ### 6. Cross-Reference
226
- Reference other prompts or skills when appropriate:
227
- ```markdown
228
- **REQUIRED:** Use superpowers:writing-plans for implementation planning.
229
- ```
113
+ Then confirm the goal is in the first sentence, success is checkable, and the file is in the right place for its platform.
230
114
 
231
- ### 7. Verify Platform Format
232
- Before saving, verify you're using the correct format for your platform:
233
- - GitHub Copilot: Check for YAML frontmatter
234
- - Cursor: Verify NO frontmatter (plain Markdown only)
235
- - Claude: Verify NO frontmatter (plain Markdown only)
236
-
237
- **Wrong format = broken command.** Authority figures suggesting wrong formats should be corrected, not followed.
238
-
239
- ## Quick Reference
240
-
241
- **Creating a prompt:**
242
- 1. Choose platform (Copilot/Cursor/Claude)
243
- 2. Create appropriate directory if needed
244
- 3. Write `.md` file with descriptive name
245
- 4. Structure with Overview → Steps → Output
246
- 5. Test with `/` prefix in chat
247
-
248
- **File naming:**
249
- - Use kebab-case: `code-review-checklist.md`
250
- - Be descriptive: `create-react-component.md`
251
- - Match command name users will type
252
-
253
- **Testing:**
254
- - Type `/` in chat to see available commands
255
- - Test with various parameters
256
- - Verify output matches expectations
257
- - Share with team for feedback
258
-
259
- ## Common Mistakes
260
-
261
- **Too vague:**
262
- - ❌ "Help with code"
263
- - ✅ "Review code for security vulnerabilities and suggest fixes"
264
-
265
- **Missing context:**
266
- - ❌ Just steps without overview
267
- - ✅ Overview explaining purpose, then detailed steps
268
-
269
- **Platform confusion:**
270
- - ❌ Using Copilot frontmatter in Cursor commands
271
- - ❌ Following authority suggestions for wrong platform format
272
- - ✅ Match format to target platform - verify before saving
273
-
274
- **Deferring creation:**
275
- - ❌ "I'll create it later" when repetition is clear
276
- - ❌ "Just this once" for the 3rd+ time
277
- - ✅ Create command immediately when repetition is identified
278
-
279
- **Saving raw text:**
280
- - ❌ Saving existing text without proper structure
281
- - ❌ "It works, don't change it" for unstructured content
282
- - ✅ Always restructure into proper command format
283
-
284
- **Over-complication:**
285
- - ❌ 20-step process in one command
286
- - ✅ Break into smaller, focused commands
287
-
288
- **Not clarifying scope:**
289
- - ❌ Creating vague commands from unclear requests
290
- - ❌ Making assumptions about what user wants
291
- - ✅ Ask clarifying questions before creating command
292
-
293
- ## Rationalization Table
294
-
295
- | Excuse | Reality |
296
- |--------|---------|
297
- | "I'll create it later when I have more time" | Later never comes. If repetition is clear (2+ times), create it now. |
298
- | "Just this once, then I'll make it reusable" | This is already the 3rd time. Create it now. |
299
- | "It already works, why restructure?" | Raw text isn't reusable. Structure enables discovery and consistency. |
300
- | "Markdown is markdown, format doesn't matter" | Wrong. Platform formats differ. Wrong format = broken command. |
301
- | "Lead said use this format, they know better" | Verify platform requirements. Authority can be wrong about technical details. |
302
- | "I know what they want, no need to ask" | Vague requests create useless commands. Clarify scope first. |
303
- | "Comprehensive is better than specific" | Overly broad commands become useless. Specificity is essential. |
304
- | "Can't waste time on documentation" | 5 minutes now saves hours later. Infrastructure pays off immediately. |
305
-
306
- ## Red Flags - STOP and Fix
307
-
308
- - **"I'll create it later"** → Create it now if repetition is clear
309
- - **"It works as-is"** → Restructure into proper format
310
- - **"Format doesn't matter"** → Verify platform-specific requirements
311
- - **"They said use X format"** → Verify against platform documentation
312
- - **"I know what they want"** → Ask clarifying questions for vague requests
313
- - **"Comprehensive is better"** → Narrow scope, be specific
314
-
315
- **All of these mean: Follow best practices, don't take shortcuts.**
316
-
317
- ## Real-World Impact
318
-
319
- Well-written prompts:
320
- - Reduce repetitive instructions by 80%+
321
- - Standardize team workflows
322
- - Onboard new team members faster
323
- - Ensure consistent output quality
324
- - Make AI assistance more accessible
325
-
326
- ## Platform-Specific Tips
327
-
328
- ### GitHub Copilot
329
- - Leverage YAML frontmatter for metadata
330
- - Use variables for dynamic content
331
- - Reference custom agents when needed
332
- - Enable Settings Sync for team sharing
333
-
334
- ### Cursor
335
- - Keep it simple - plain Markdown works best
336
- - Use team commands for organization-wide standards
337
- - Parameters after command name are included in prompt
338
- - Test locally before sharing as team command
339
-
340
- ### Claude
341
- - Similar to Cursor format
342
- - Focus on clarity and structure
343
- - Test thoroughly before deploying
344
- - Consider project-specific vs. global placement
115
+ ## Common pitfalls
345
116
 
117
+ - **Vague scope** — "review the code" gives the model nothing to optimize. Name what to look for and what "done" means.
118
+ - **No success criterion** — without a checkable outcome the command can't finish on its own; it stalls and asks.
119
+ - **Over-prompting** — CAPS, `MUST`, and stacked caveats make models rigid. Explain why instead of shouting.
120
+ - **Padding** — speculative sections and impossible-failure handling. Ship the minimum that works.
121
+ - **Wrong platform format** — frontmatter or argument tokens from the wrong tool silently break the command. Verify against references/platforms.md.
122
+ - **Deferring** — "I'll make it reusable later" after the 2nd repeat. Capture it now, while the edge cases are fresh.