Skill Tracer
Skills › Superpowers › writing-skills

writing-skills

skill · 399 lines · MIT · skills/writing-skills/SKILL.md

The facts

Its description

Use when creating new skills, editing existing skills, or verifying skills work before deployment

The description the agent reads to decide when to use it.

From its settingsline 3

When it starts

The agent picks this skill when the person wants to author or revise a skill itself — creating a new skill, editing an existing one, or checking that a skill works before it is deployed. The description is entirely about skill authoring and pre-deployment verification, so any request to write or fix a SKILL.md triggers it.

Things a person might say (the model's guesses)

  • “Help me write a new skill for handling database migrations.”
  • “Can you fix the description in my existing skill so agents actually find it?”
  • “I just wrote a skill — how do I test that it works before I ship it?”

A model's summary of when it is used.

A model's reading

Starts other agents

6 lines mention starting other agents (first 5 linked)

Lines in the file that mention starting another agent. Found by matching words, so treat them as pointers.

Found by matching wordsline 14 line 34 line 259 line 278 line 299

Runs scripts

bash scripts/tool.sh, scripts/tool.js, scripts/tool.sh

Scripts the text names. Found by matching words, so treat them as pointers.

Found by matching wordsline 161

Files it mentions

references/discovery.md, references/flowcharts.md, references/bulletproofing.md, references/testing-skills-with-subagents.md

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 101 line 108 line 268 line 307

What it leads to

Other skills this one hands off to, calls, requires or offers instead, as a model read them.

A model's reading

Names skills outside this collection

Skills the text names that are not in this collection, as a model read them.

A model's reading

Licence

MIT, from LICENSE

The terms its author shares it under, which let it be shown here.

From the repositorylicence text
Other files in this skill (8) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: writing-skills
3description: Use when creating new skills, editing existing skills, or verifying skills work before deployment
4---
5
6# Writing Skills
7

Writing Skills

Raw lines 1 to 7
8## Overview
9
10**Writing skills IS Test-Driven Development applied to process documentation.**
12**Personal skills live in your runtime's skills directory** (`~/.claude/skills/` on Claude Code) — see [codex-tools.md](../using-superpowers/references/codex-tools.md) or [gemini-tools.md](../using-superpowers/references/gemini-tools.md) for the path on those runtimes. Codex, Copilot CLI, and Gemini CLI all also recognize `~/.agents/skills/` as a cross-runtime alias.
14You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
16**Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
18**REQUIRED BACKGROUND:** You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
20**Official guidance:** For Anthropic's official skill authoring best practices, see references/anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.

Overview

Writing skills IS Test-Driven Development applied to process documentation.

Personal skills live in your runtime's skills directory (~/.claude/skills/ on Claude Code) — see codex-tools.md or gemini-tools.md for the path on those runtimes. Codex, Copilot CLI, and Gemini CLI all also recognize ~/.agents/skills/ as a cross-runtime alias.

You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).

Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.

REQUIRED BACKGROUND: You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.

Official guidance: For Anthropic's official skill authoring best practices, see references/anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.

Raw lines 8 to 21
Names a skill using-superpowers :12
Starts an agent subagents :14
Names a skill test-driven-development :18
22## What is a Skill?
24A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.
26**Skills are:** Reusable techniques, patterns, tools, reference guides
28**Skills are NOT:** Narratives about how you solved a problem once

What is a Skill?

A skill is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.

Skills are: Reusable techniques, patterns, tools, reference guides

Skills are NOT: Narratives about how you solved a problem once

Raw lines 22 to 29
30## TDD Mapping for Skills
32| TDD Concept | Skill Creation |
33|-------------|----------------|
34| **Test case** | Pressure scenario with subagent |
35| **Production code** | Skill document (SKILL.md) |
36| **Test fails (RED)** | Agent violates rule without skill (baseline) |
37| **Test passes (GREEN)** | Agent complies with skill present |
38| **Refactor** | Close loopholes while maintaining compliance |
39| **Write test first** | Run baseline scenario BEFORE writing skill |
40| **Watch it fail** | Document exact rationalizations agent uses |
41| **Minimal code** | Write skill addressing those specific violations |
42| **Watch it pass** | Verify agent now complies |
43| **Refactor cycle** | Find new rationalizations → plug → re-verify |
45The entire skill creation process follows RED-GREEN-REFACTOR.

TDD Mapping for Skills

TDD ConceptSkill Creation
Test casePressure scenario with subagent
Production codeSkill document (SKILL.md)
Test fails (RED)Agent violates rule without skill (baseline)
Test passes (GREEN)Agent complies with skill present
RefactorClose loopholes while maintaining compliance
Write test firstRun baseline scenario BEFORE writing skill
Watch it failDocument exact rationalizations agent uses
Minimal codeWrite skill addressing those specific violations
Watch it passVerify agent now complies
Refactor cycleFind new rationalizations → plug → re-verify

The entire skill creation process follows RED-GREEN-REFACTOR.

Raw lines 30 to 46
Starts an agent subagent :34
47## When to Create a Skill
49**Create when:**
50- Technique wasn't intuitively obvious to you
51- You'd reference this again across projects
52- Pattern applies broadly (not project-specific)
53- Others would benefit
55**Don't create for:**
56- One-off solutions
57- Standard practices well-documented elsewhere
58- Project-specific conventions (put in your instructions file)
59- Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)

When to Create a Skill

Create when:

  • Technique wasn't intuitively obvious to you
  • You'd reference this again across projects
  • Pattern applies broadly (not project-specific)
  • Others would benefit

Don't create for:

  • One-off solutions
  • Standard practices well-documented elsewhere
  • Project-specific conventions (put in your instructions file)
  • Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
Raw lines 47 to 60
61## Skill Types
63### Technique
64Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)

Technique

Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)

Raw lines 63 to 65
66### Pattern
67Way of thinking about problems (flatten-with-flags, test-invariants)

Pattern

Way of thinking about problems (flatten-with-flags, test-invariants)

Raw lines 66 to 68
69### Reference
70API docs, syntax guides, tool documentation (office docs)

Reference

API docs, syntax guides, tool documentation (office docs)

Raw lines 69 to 71
72## Directory Structure
75```
76skills/
77 skill-name/
78 SKILL.md # Main reference (required)
79 supporting-file.* # Only if needed
80```
82**Flat namespace** - all skills in one searchable namespace
84**Separate files for:**
851. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
862. **Reusable tools** - Scripts, utilities, templates
88**Keep inline:**
89- Principles and concepts
90- Code patterns (< 50 lines)
91- Everything else

Directory Structure

skills/
  skill-name/
    SKILL.md              # Main reference (required)
    supporting-file.*     # Only if needed

Flat namespace - all skills in one searchable namespace

Separate files for:

  1. Heavy reference (100+ lines) - API docs, comprehensive syntax
  2. Reusable tools - Scripts, utilities, templates

Keep inline:

  • Principles and concepts
  • Code patterns (< 50 lines)
  • Everything else
Raw lines 72 to 92
93## Writing SKILL.md
95A skill's `description` says only when to use it: triggering conditions and
96symptoms, starting with "Use when...". It never summarizes the skill's
97workflow, because an agent that reads a workflow summary follows it instead
98of reading the skill.
100When you write or change a skill's frontmatter, name or description, or
101need to cut its size, read [references/discovery.md](references/discovery.md):
102the SKILL.md template, description and keyword guidance, naming, token
103budgets, and cross-referencing other skills.

Writing SKILL.md

A skill's description says only when to use it: triggering conditions and symptoms, starting with "Use when...". It never summarizes the skill's workflow, because an agent that reads a workflow summary follows it instead of reading the skill.

When you write or change a skill's frontmatter, name or description, or need to cut its size, read references/discovery.md: the SKILL.md template, description and keyword guidance, naming, token budgets, and cross-referencing other skills.

Raw lines 93 to 104
Reads a file references/discovery.md :101
105## Flowcharts
107When you add or change a flowchart in a skill, read
108[references/flowcharts.md](references/flowcharts.md) first: when a flowchart
109earns its place, the graphviz conventions, and how to render one.

Flowcharts

When you add or change a flowchart in a skill, read references/flowcharts.md first: when a flowchart earns its place, the graphviz conventions, and how to render one.

Raw lines 105 to 110
Reads a file references/flowcharts.md :108
111## Code Examples
113**One excellent example beats many mediocre ones**
115Choose most relevant language:
116- Testing techniques → TypeScript/JavaScript
117- System debugging → Shell/Python
118- Data processing → Python
120**Good example:**
121- Complete and runnable
122- Well-commented explaining WHY
123- From real scenario
124- Shows pattern clearly
125- Ready to adapt (not generic template)
127**Don't:**
128- Implement in 5+ languages
129- Create fill-in-the-blank templates
130- Write contrived examples
132You're good at porting - one great example is enough.

Code Examples

One excellent example beats many mediocre ones

Choose most relevant language:

  • Testing techniques → TypeScript/JavaScript
  • System debugging → Shell/Python
  • Data processing → Python

Good example:

  • Complete and runnable
  • Well-commented explaining WHY
  • From real scenario
  • Shows pattern clearly
  • Ready to adapt (not generic template)

Don't:

  • Implement in 5+ languages
  • Create fill-in-the-blank templates
  • Write contrived examples

You're good at porting - one great example is enough.

Raw lines 111 to 133
134## File Organization

File Organization

Raw lines 134 to 135
136### Self-Contained Skill
137```
138defense-in-depth/
139 SKILL.md # Everything inline
140```
141When: All content fits, no heavy reference needed

Self-Contained Skill

defense-in-depth/
  SKILL.md    # Everything inline

When: All content fits, no heavy reference needed

Raw lines 136 to 142
143### Skill with Reusable Tool
144```
145condition-based-waiting/
146 SKILL.md # Overview + patterns
147 example.ts # Working helpers to adapt
148```
149When: Tool is reusable code, not just narrative

Skill with Reusable Tool

condition-based-waiting/
  SKILL.md    # Overview + patterns
  example.ts  # Working helpers to adapt

When: Tool is reusable code, not just narrative

Raw lines 143 to 150
151### Skill with Heavy Reference
152```
153pptx/
154 SKILL.md # Overview + workflows
155 pptxgenjs.md # 600 lines API reference
156 ooxml.md # 500 lines XML structure
157 scripts/ # Executable tools
158```
159When: Reference material too large for inline
161Invoke bundled scripts through their interpreter in the prose (`bash scripts/tool.sh`, `node scripts/tool.js`), never by bare path: some harness plugin packagers strip executable bits, and a bare `scripts/tool.sh` fails there with `Permission denied`.

Skill with Heavy Reference

pptx/
  SKILL.md       # Overview + workflows
  pptxgenjs.md   # 600 lines API reference
  ooxml.md       # 500 lines XML structure
  scripts/       # Executable tools

When: Reference material too large for inline

Invoke bundled scripts through their interpreter in the prose (bash scripts/tool.sh, node scripts/tool.js), never by bare path: some harness plugin packagers strip executable bits, and a bare scripts/tool.sh fails there with Permission denied.

Raw lines 151 to 162
Runs code bash scripts/tool.sh :161
Runs code scripts/tool.js :161
Runs code scripts/tool.sh :161
163## The Iron Law (Same as TDD)
165```
166NO SKILL WITHOUT A FAILING TEST FIRST
167```
169This applies to NEW skills AND EDITS to existing skills.
171Write skill before testing? Delete it. Start over.
172Edit skill without testing? Same violation.
174**No exceptions:**
175- Not for "simple additions"
176- Not for "just adding a section"
177- Not for "documentation updates"
178- Don't keep untested changes as "reference"
179- Don't "adapt" while running tests
180- Delete means delete
182**REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.

The Iron Law (Same as TDD)

NO SKILL WITHOUT A FAILING TEST FIRST

This applies to NEW skills AND EDITS to existing skills.

Write skill before testing? Delete it. Start over. Edit skill without testing? Same violation.

No exceptions:

  • Not for "simple additions"
  • Not for "just adding a section"
  • Not for "documentation updates"
  • Don't keep untested changes as "reference"
  • Don't "adapt" while running tests
  • Delete means delete

REQUIRED BACKGROUND: The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.

Raw lines 163 to 183
Names a skill test-driven-development :182
184## Testing All Skill Types
186Different skill types need different test approaches:

Testing All Skill Types

Different skill types need different test approaches:

Raw lines 184 to 187
188### Discipline-Enforcing Skills (rules/requirements)
190**Examples:** TDD, verification-before-completion, designing-before-coding
192**Test with:**
193- Academic questions: Do they understand the rules?
194- Pressure scenarios: Do they comply under stress?
195- Multiple pressures combined: time + sunk cost + exhaustion
196- Identify rationalizations and add explicit counters
198**Success criteria:** Agent follows rule under maximum pressure

Discipline-Enforcing Skills (rules/requirements)

Examples: TDD, verification-before-completion, designing-before-coding

Test with:

  • Academic questions: Do they understand the rules?
  • Pressure scenarios: Do they comply under stress?
  • Multiple pressures combined: time + sunk cost + exhaustion
  • Identify rationalizations and add explicit counters

Success criteria: Agent follows rule under maximum pressure

Raw lines 188 to 199
200### Technique Skills (how-to guides)
202**Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
204**Test with:**
205- Application scenarios: Can they apply the technique correctly?
206- Variation scenarios: Do they handle edge cases?
207- Missing information tests: Do instructions have gaps?
209**Success criteria:** Agent successfully applies technique to new scenario

Technique Skills (how-to guides)

Examples: condition-based-waiting, root-cause-tracing, defensive-programming

Test with:

  • Application scenarios: Can they apply the technique correctly?
  • Variation scenarios: Do they handle edge cases?
  • Missing information tests: Do instructions have gaps?

Success criteria: Agent successfully applies technique to new scenario

Raw lines 200 to 210
211### Pattern Skills (mental models)
213**Examples:** reducing-complexity, information-hiding concepts
215**Test with:**
216- Recognition scenarios: Do they recognize when pattern applies?
217- Application scenarios: Can they use the mental model?
218- Counter-examples: Do they know when NOT to apply?
220**Success criteria:** Agent correctly identifies when/how to apply pattern

Pattern Skills (mental models)

Examples: reducing-complexity, information-hiding concepts

Test with:

  • Recognition scenarios: Do they recognize when pattern applies?
  • Application scenarios: Can they use the mental model?
  • Counter-examples: Do they know when NOT to apply?

Success criteria: Agent correctly identifies when/how to apply pattern

Raw lines 211 to 221
222### Reference Skills (documentation/APIs)
224**Examples:** API documentation, command references, library guides
226**Test with:**
227- Retrieval scenarios: Can they find the right information?
228- Application scenarios: Can they use what they found correctly?
229- Gap testing: Are common use cases covered?
231**Success criteria:** Agent finds and correctly applies reference information

Reference Skills (documentation/APIs)

Examples: API documentation, command references, library guides

Test with:

  • Retrieval scenarios: Can they find the right information?
  • Application scenarios: Can they use what they found correctly?
  • Gap testing: Are common use cases covered?

Success criteria: Agent finds and correctly applies reference information

Raw lines 222 to 232
233## Common Rationalizations for Skipping Testing
235| Excuse | Reality |
236|--------|---------|
237| "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
238| "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
239| "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
240| "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
241| "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
242| "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
243| "Academic review is enough" | Reading ≠ using. Test application scenarios. |
244| "No time to test" | Deploying untested skill wastes more time fixing it later. |
246**All of these mean: Test before deploying. No exceptions.**

Common Rationalizations for Skipping Testing

ExcuseReality
"Skill is obviously clear"Clear to you ≠ clear to other agents. Test it.
"It's just a reference"References can have gaps, unclear sections. Test retrieval.
"Testing is overkill"Untested skills have issues. Always. 15 min testing saves hours.
"I'll test if problems emerge"Problems = agents can't use skill. Test BEFORE deploying.
"Too tedious to test"Testing is less tedious than debugging bad skill in production.
"I'm confident it's good"Overconfidence guarantees issues. Test anyway.
"Academic review is enough"Reading ≠ using. Test application scenarios.
"No time to test"Deploying untested skill wastes more time fixing it later.

All of these mean: Test before deploying. No exceptions.

Raw lines 233 to 247
248## Match the Form to the Failure
250Before writing guidance, classify the baseline failure. The form that bulletproofs one failure type measurably backfires on another.
252| Baseline failure | Right form | Wrong form |
253|---|---|---|
254| Skips/violates a rule under pressure (knows better, does it anyway) | Prohibition + rationalization table + red flags (see references/bulletproofing.md) | Soft guidance ("prefer...", "consider...") |
255| Complies, but output has the wrong shape (bloated prompt, buried verdict, restated spec) | Positive recipe or contract: state what the output IS — its parts, in order | Prohibition list ("don't restate", "never narrate") |
256| Omits a required element from something they already produce | Structural: REQUIRED field or slot in the template they fill in | Prose reminders near the template |
257| Behavior should depend on a condition | Conditional keyed to an observable predicate ("if the brief exists, reference it") | Unconditional rule + exemption clauses |
259**Why prohibitions backfire on shaping problems:** under a competing incentive ("make the prompt self-contained"), agents negotiate with "don't X". In head-to-head wording tests on dispatch-prompt guidance, the prohibition arm produced clearly more of the unwanted content than the recipe arm (fully separated distributions), and trended worse than even the no-guidance control — micro-test your own case rather than assuming, but never reach for the prohibition by default. A recipe leaves nothing to negotiate: the output matches the stated shape or it doesn't.
261**Rules for whichever form you pick:**
262- **No nuance clauses.** "Don't X unless it matters" reopens the negotiation — appending a single nuance clause to a winning recipe degraded it from consistent to noisy in the same wording tests. Express a real exception as its own conditional on an observable predicate.
263- **Exemption clauses don't scope.** "This limit doesn't apply to code blocks" still suppresses code blocks. If part of the output must be exempt, restructure so the rule can't reach it.

Match the Form to the Failure

Before writing guidance, classify the baseline failure. The form that bulletproofs one failure type measurably backfires on another.

Baseline failureRight formWrong form
Skips/violates a rule under pressure (knows better, does it anyway)Prohibition + rationalization table + red flags (see references/bulletproofing.md)Soft guidance ("prefer...", "consider...")
Complies, but output has the wrong shape (bloated prompt, buried verdict, restated spec)Positive recipe or contract: state what the output IS — its parts, in orderProhibition list ("don't restate", "never narrate")
Omits a required element from something they already produceStructural: REQUIRED field or slot in the template they fill inProse reminders near the template
Behavior should depend on a conditionConditional keyed to an observable predicate ("if the brief exists, reference it")Unconditional rule + exemption clauses

Why prohibitions backfire on shaping problems: under a competing incentive ("make the prompt self-contained"), agents negotiate with "don't X". In head-to-head wording tests on dispatch-prompt guidance, the prohibition arm produced clearly more of the unwanted content than the recipe arm (fully separated distributions), and trended worse than even the no-guidance control — micro-test your own case rather than assuming, but never reach for the prohibition by default. A recipe leaves nothing to negotiate: the output matches the stated shape or it doesn't.

Rules for whichever form you pick:

  • No nuance clauses. "Don't X unless it matters" reopens the negotiation — appending a single nuance clause to a winning recipe degraded it from consistent to noisy in the same wording tests. Express a real exception as its own conditional on an observable predicate.
  • Exemption clauses don't scope. "This limit doesn't apply to code blocks" still suppresses code blocks. If part of the output must be exempt, restructure so the rule can't reach it.
Raw lines 248 to 264
Starts an agent dispatch :259
265## Bulletproofing Against Rationalization
267When the baseline failure is a discipline failure, read
268[references/bulletproofing.md](references/bulletproofing.md) before you write
269the guidance: closing loopholes, the spirit-vs-letter line, the
270rationalization table, and the red-flags list.

Bulletproofing Against Rationalization

When the baseline failure is a discipline failure, read references/bulletproofing.md before you write the guidance: closing loopholes, the spirit-vs-letter line, the rationalization table, and the red-flags list.

Raw lines 265 to 271
272## RED-GREEN-REFACTOR for Skills
274Follow the TDD cycle:

RED-GREEN-REFACTOR for Skills

Follow the TDD cycle:

Raw lines 272 to 275
276### RED: Write Failing Test (Baseline)
278Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
279- What choices did they make?
280- What rationalizations did they use (verbatim)?
281- Which pressures triggered violations?
283This is "watch the test fail" - you must see what agents naturally do before writing the skill.

RED: Write Failing Test (Baseline)

Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:

  • What choices did they make?
  • What rationalizations did they use (verbatim)?
  • Which pressures triggered violations?

This is "watch the test fail" - you must see what agents naturally do before writing the skill.

Raw lines 276 to 284
Starts an agent subagent :278
285### GREEN: Write Minimal Skill
287Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
289Run same scenarios WITH skill. Agent should now comply.

GREEN: Write Minimal Skill

Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.

Run same scenarios WITH skill. Agent should now comply.

Raw lines 285 to 290
291### REFACTOR: Close Loopholes
293Agent found new rationalization? Add explicit counter. Re-test until bulletproof.

REFACTOR: Close Loopholes

Agent found new rationalization? Add explicit counter. Re-test until bulletproof.

Raw lines 291 to 294
295### Micro-Test Wording Before Full Scenarios
297Full pressure-scenario runs are the final gate, but they are slow and expensive per iteration. Verify the wording itself first with micro-tests:
2991. **One fresh-context sample per call** — a raw API call, or a single-shot subagent if you don't have API access. System prompt = the realistic context the guidance will live in (the full skill or prompt template, not the guidance in isolation); user message = a task that tempts the failure.
3002. **Always include a no-guidance control.** If the control doesn't exhibit the failure, there is nothing to fix — stop, don't author the guidance.
3013. **5+ reps per variant.** Single samples lie.
3024. **Manually read every flagged match.** Score programmatically if you like, but template echoes and quoted counter-examples masquerade as hits; automated counts alone overstate both failure and success.
3035. **Variance is a metric.** When guidance lands, reps converge on the same shape. Five different interpretations across five reps means the wording isn't binding — tighten the form before adding words.
305Micro-tests verify wording; they do not replace pressure scenarios for discipline skills.
307**Testing methodology:** See [references/testing-skills-with-subagents.md](references/testing-skills-with-subagents.md) for the complete testing methodology:
308- How to write pressure scenarios
309- Pressure types (time, sunk cost, authority, exhaustion)
310- Plugging holes systematically
311- Meta-testing techniques

Micro-Test Wording Before Full Scenarios

Full pressure-scenario runs are the final gate, but they are slow and expensive per iteration. Verify the wording itself first with micro-tests:

  1. One fresh-context sample per call — a raw API call, or a single-shot subagent if you don't have API access. System prompt = the realistic context the guidance will live in (the full skill or prompt template, not the guidance in isolation); user message = a task that tempts the failure.
  2. Always include a no-guidance control. If the control doesn't exhibit the failure, there is nothing to fix — stop, don't author the guidance.
  3. 5+ reps per variant. Single samples lie.
  4. Manually read every flagged match. Score programmatically if you like, but template echoes and quoted counter-examples masquerade as hits; automated counts alone overstate both failure and success.
  5. Variance is a metric. When guidance lands, reps converge on the same shape. Five different interpretations across five reps means the wording isn't binding — tighten the form before adding words.

Micro-tests verify wording; they do not replace pressure scenarios for discipline skills.

Testing methodology: See references/testing-skills-with-subagents.md for the complete testing methodology:

  • How to write pressure scenarios
  • Pressure types (time, sunk cost, authority, exhaustion)
  • Plugging holes systematically
  • Meta-testing techniques
Raw lines 295 to 312
Starts an agent subagent :299
Starts an agent subagents :307
313## Anti-Patterns
315### ❌ Narrative Example
316"In session 2025-10-03, we found empty projectDir caused..."
317**Why bad:** Too specific, not reusable

❌ Narrative Example

"In session 2025-10-03, we found empty projectDir caused..." Why bad: Too specific, not reusable

Raw lines 315 to 318
319### ❌ Multi-Language Dilution
320example-js.js, example-py.py, example-go.go
321**Why bad:** Mediocre quality, maintenance burden

❌ Multi-Language Dilution

example-js.js, example-py.py, example-go.go Why bad: Mediocre quality, maintenance burden

Raw lines 319 to 322
323### ❌ Code in Flowcharts
324```dot
325step1 [label="import fs"];
326step2 [label="read file"];
327```
328**Why bad:** Can't copy-paste, hard to read

❌ Code in Flowcharts

step1 [label="import fs"];
step2 [label="read file"];

Why bad: Can't copy-paste, hard to read

Raw lines 323 to 329
330### ❌ Generic Labels
331helper1, helper2, step3, pattern4
332**Why bad:** Labels should have semantic meaning

❌ Generic Labels

helper1, helper2, step3, pattern4 Why bad: Labels should have semantic meaning

Raw lines 330 to 333
334## STOP: Before Moving to Next Skill
336**After writing ANY skill, you MUST STOP and complete the deployment process.**
338**Do NOT:**
339- Create multiple skills in batch without testing each
340- Move to next skill before current one is verified
341- Skip testing because "batching is more efficient"
343**The deployment checklist below is MANDATORY for EACH skill.**
345Deploying untested skills = deploying untested code. It's a violation of quality standards.

STOP: Before Moving to Next Skill

After writing ANY skill, you MUST STOP and complete the deployment process.

Do NOT:

  • Create multiple skills in batch without testing each
  • Move to next skill before current one is verified
  • Skip testing because "batching is more efficient"

The deployment checklist below is MANDATORY for EACH skill.

Deploying untested skills = deploying untested code. It's a violation of quality standards.

Raw lines 334 to 346
347## Skill Creation Checklist (TDD Adapted)
349**IMPORTANT: Create a todo for EACH checklist item below.**
351**RED Phase - Write Failing Test:**
352- [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
353- [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
354- [ ] Identify patterns in rationalizations/failures
356**GREEN Phase - Write Minimal Skill:**
357- [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
358- [ ] YAML frontmatter with required `name` and `description` fields (max 1024 chars; see [spec](https://agentskills.io/specification))
359- [ ] Description starts with "Use when..." and includes specific triggers/symptoms
360- [ ] Description written in third person
361- [ ] Keywords throughout for search (errors, symptoms, tools)
362- [ ] Clear overview with core principle
363- [ ] Address specific baseline failures identified in RED
364- [ ] Guidance form matches the failure type (see Match the Form to the Failure)
365- [ ] For behavior-shaping guidance: wording micro-tested against a no-guidance control (5+ reps, every flagged match read manually) — N/A for pure reference skills
366- [ ] Code inline OR link to separate file
367- [ ] One excellent example (not multi-language)
368- [ ] Run scenarios WITH skill - verify agents now comply
370**REFACTOR Phase - Close Loopholes:**
371- [ ] Identify NEW rationalizations from testing
372- [ ] Add explicit counters (if discipline skill)
373- [ ] Build rationalization table from all test iterations
374- [ ] Create red flags list
375- [ ] Re-test until bulletproof
377**Quality Checks:**
378- [ ] Small flowchart only if decision non-obvious
379- [ ] Quick reference table
380- [ ] Common mistakes section
381- [ ] No narrative storytelling
382- [ ] Supporting files only for tools or heavy reference
384**Deployment:**
385- [ ] Commit skill to git and push to your fork (if configured)
386- [ ] Consider contributing back via PR (if broadly useful)

Skill Creation Checklist (TDD Adapted)

IMPORTANT: Create a todo for EACH checklist item below.

RED Phase - Write Failing Test:

  • [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
  • [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
  • [ ] Identify patterns in rationalizations/failures

GREEN Phase - Write Minimal Skill:

  • [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
  • [ ] YAML frontmatter with required name and description fields (max 1024 chars; see spec)
  • [ ] Description starts with "Use when..." and includes specific triggers/symptoms
  • [ ] Description written in third person
  • [ ] Keywords throughout for search (errors, symptoms, tools)
  • [ ] Clear overview with core principle
  • [ ] Address specific baseline failures identified in RED
  • [ ] Guidance form matches the failure type (see Match the Form to the Failure)
  • [ ] For behavior-shaping guidance: wording micro-tested against a no-guidance control (5+ reps, every flagged match read manually) — N/A for pure reference skills
  • [ ] Code inline OR link to separate file
  • [ ] One excellent example (not multi-language)
  • [ ] Run scenarios WITH skill - verify agents now comply

REFACTOR Phase - Close Loopholes:

  • [ ] Identify NEW rationalizations from testing
  • [ ] Add explicit counters (if discipline skill)
  • [ ] Build rationalization table from all test iterations
  • [ ] Create red flags list
  • [ ] Re-test until bulletproof

Quality Checks:

  • [ ] Small flowchart only if decision non-obvious
  • [ ] Quick reference table
  • [ ] Common mistakes section
  • [ ] No narrative storytelling
  • [ ] Supporting files only for tools or heavy reference

Deployment:

  • [ ] Commit skill to git and push to your fork (if configured)
  • [ ] Consider contributing back via PR (if broadly useful)
Raw lines 347 to 387
388## Discovery Workflow
390How future agents find your skill:
3921. **Encounters problem** ("tests are flaky")
3932. **Searches skills** (greps descriptions, browses categories)
3943. **Finds SKILL** (description matches)
3954. **Scans overview** (is this relevant?)
3965. **Reads patterns** (quick reference table)
3976. **Loads example** (only when implementing)
399**Optimize for this flow** - put searchable terms early and often.

Discovery Workflow

How future agents find your skill:

  1. Encounters problem ("tests are flaky")
  2. Searches skills (greps descriptions, browses categories)
  3. Finds SKILL (description matches)
  4. Scans overview (is this relevant?)
  5. Reads patterns (quick reference table)
  6. Loads example (only when implementing)

Optimize for this flow - put searchable terms early and often.

Raw lines 388 to 399

From obra/superpowers at 2ce8aa1, 2026-10-21. Skills read by DeepSeek V4.1 Flash on 2026-11-04. Summary and techniques by Claude Opus 5.5 on 2026-11-06.