@complexthings/superpowers-agent 8.4.0 → 9.0.0

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 (46) 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 +123 -141
  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 +2 -4
  43. package/skills/meta/create-agents-md/SKILL.md +182 -0
  44. package/skills/meta/create-agents-md/skill.json +9 -0
  45. package/skills/meta/writing-prompts/SKILL.md +64 -287
  46. package/skills/meta/writing-prompts/references/platforms.md +114 -0
@@ -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.
@@ -0,0 +1,114 @@
1
+ # Platform formats
2
+
3
+ Exact locations, file formats, frontmatter, and argument syntax for reusable commands on each platform. Read the section for your target platform when saving the file.
4
+
5
+ ## Contents
6
+ - The convergence on SKILL.md
7
+ - Claude Code (skills + legacy commands)
8
+ - GitHub Copilot (prompt files + custom instructions)
9
+ - Cursor (commands + rules + skills)
10
+ - Quick pick
11
+
12
+ ## The convergence on SKILL.md
13
+
14
+ All three platforms are moving the same direction: a reusable command is becoming a skill — a directory containing a `SKILL.md` file with YAML frontmatter. Claude Code states custom commands "have been merged into skills"; Cursor 2.4 promotes Skills as the successor to commands and ships a `/migrate-to-skills` flow; GitHub Copilot reads `AGENTS.md` and a skills-style layout. Legacy formats still work everywhere, but prefer skills for new work where the platform supports them.
15
+
16
+ A minimal skill, identical in shape across platforms:
17
+
18
+ ```
19
+ my-command/
20
+ └── SKILL.md
21
+ ```
22
+
23
+ ```markdown
24
+ ---
25
+ name: my-command
26
+ description: What it does and when to use it.
27
+ ---
28
+
29
+ # My Command
30
+
31
+ <the prompt body>
32
+ ```
33
+
34
+ ## Claude Code
35
+
36
+ **Skills (recommended).**
37
+ - Project: `.claude/skills/<name>/SKILL.md` (commit to git to share)
38
+ - Personal: `~/.claude/skills/<name>/SKILL.md` (all your projects)
39
+ - The command name comes from the **directory name** → `/my-command`. Frontmatter `name` only sets the display label.
40
+ - Precedence: enterprise > personal > project. If a skill and a legacy command share a name, the skill wins.
41
+
42
+ **Legacy commands (still supported).**
43
+ - `.claude/commands/<name>.md` or `~/.claude/commands/<name>.md` → `/name` (from the file name).
44
+ - Support the same frontmatter as skills.
45
+
46
+ **Frontmatter (all optional; `description` is the one that matters for triggering):**
47
+ `name`, `description`, `when_to_use`, `argument-hint` (e.g. `[issue-number]`), `arguments` (named positional args), `disable-model-invocation` (default `false` — set `true` to make it manual-only, i.e. a pure slash command the model won't auto-run), `user-invocable` (default `true`), `allowed-tools` / `disallowed-tools`, `model` (or `inherit`), `effort` (`low`/`medium`/`high`/`xhigh`/`max`), `context` (`fork`), `agent`, `hooks`, `paths` (glob auto-activation), `shell` (`bash`/`powershell`).
48
+
49
+ **Arguments (0-based — note this differs from the old `$1`-is-first convention):**
50
+ - `$ARGUMENTS` — all arguments as one string. If the file contains none, the args are appended as `ARGUMENTS: <value>`.
51
+ - `$ARGUMENTS[0]` — first argument; `$ARGUMENTS[1]` second, etc.
52
+ - `$0`, `$1` — shorthand; **`$0` is the first argument.**
53
+ - `$name` — a named argument declared in `arguments:` frontmatter, bound by position.
54
+ - Also available: `${CLAUDE_SESSION_ID}`, `${CLAUDE_EFFORT}`, `${CLAUDE_SKILL_DIR}`.
55
+
56
+ **Bash injection in the body:**
57
+ - Inline: `` !`<command>` `` (only at line start or after whitespace).
58
+ - Block: a fenced ` ```! ` code block.
59
+ - Runs as preprocessing before the model sees the body; requires a matching `allowed-tools` grant such as `Bash(gh *)`.
60
+
61
+ **Skill vs command vs subagent:**
62
+ - Reference-style content (knowledge the model pulls in when relevant) → a normal skill.
63
+ - Action you invoke explicitly → a skill with `disable-model-invocation: true`, or a legacy command.
64
+ - Delegated, isolated-context work → a subagent in `.claude/agents/<name>.md` (frontmatter `name`, `description`, `tools`, `model`), or a skill run with `context: fork` + `agent:`.
65
+
66
+ ## GitHub Copilot
67
+
68
+ **Prompt files** (VS Code, Visual Studio, JetBrains):
69
+ - Location: `.github/prompts/`
70
+ - Naming: `<name>.prompt.md` (e.g. `explain-code.prompt.md`)
71
+ - Frontmatter documented by GitHub: `agent:` (value `'agent'`) and `description:`. (`model` and `tools` exist in VS Code's own prompt-file format but are **not** part of GitHub's documented spec — don't rely on them for portability.)
72
+ - Invoke: type `/<name>` (no extension) in Copilot Chat → `/explain-code`.
73
+
74
+ ```markdown
75
+ ---
76
+ agent: 'agent'
77
+ description: 'Generate a clear code explanation with examples'
78
+ ---
79
+
80
+ Explain the selected code. Cover what it does, the non-obvious parts, and one example call.
81
+ ```
82
+
83
+ **Repository custom instructions** (always-on context, not invoked):
84
+ - Repo-wide: `.github/copilot-instructions.md` — plain Markdown, no frontmatter.
85
+ - Path-specific: `.github/instructions/<name>.instructions.md` — frontmatter `applyTo:` (glob, e.g. `applyTo: "app/models/**/*.rb"` or `applyTo: "**"`) and optional `excludeAgent:` (`"code-review"` / `"cloud-agent"`).
86
+ - Copilot code review reads only the first 4,000 characters of an instruction file (other features are unaffected). Keep them tight.
87
+ - `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` are also recognized.
88
+
89
+ **Variables documented by GitHub:** input variables only — `${input:name}` and `${input:name:placeholder}` (e.g. `${input:code:Paste your code here}`). The `${selection}`, `${file}`, and `${workspaceFolder}` tokens come from VS Code's editor, not GitHub's spec — fine in VS Code, not portable.
90
+
91
+ ## Cursor
92
+
93
+ **Commands** (lightly documented; Cursor now steers users toward Skills):
94
+ - Location: `.cursor/commands/<name>.md` (project). A user-level form exists but Cursor doesn't publish the exact global path — don't quote one.
95
+ - No documented frontmatter; commands are described simply as reusable prompts.
96
+ - No documented argument/parameter passing.
97
+ - Invoke: type `/` in the Agent input and pick the command.
98
+
99
+ **Skills (preferred going forward):** `SKILL.md`-based, same shape as the convergence example above. Cursor ships `/migrate-to-skills` to convert commands.
100
+
101
+ **Rules** (passive context, auto-injected — not invoked like commands):
102
+ - Location: `.cursor/rules/` as `.md` or `.mdc`. Use `.mdc` for frontmatter.
103
+ - Frontmatter: `description` (string), `globs` (file pattern), `alwaysApply` (boolean).
104
+ - Types: **Always** (`alwaysApply: true`), **Agent Requested** (description, no globs — pulled in when relevant), **Auto Attached** (matches `globs`), **Manual** (only via `@`-mention).
105
+
106
+ ## Quick pick
107
+
108
+ | You want… | Claude Code | GitHub Copilot | Cursor |
109
+ |---|---|---|---|
110
+ | Invoke a saved prompt by name | `.claude/skills/<name>/SKILL.md` → `/name` | `.github/prompts/<name>.prompt.md` → `/name` | `.cursor/commands/<name>.md` → `/name` |
111
+ | Always-on project context | `.claude/skills/` (auto-invoked) or `CLAUDE.md` | `.github/copilot-instructions.md` | `.cursor/rules/*.mdc` |
112
+ | Path-scoped context | `paths:` frontmatter | `.github/instructions/*.instructions.md` (`applyTo`) | `.cursor/rules/*.mdc` (`globs`) |
113
+
114
+ When in doubt, write a `SKILL.md` — it's the format all three are converging on.