Writing skills: build your own Claude skill the test-first way

by obra · MIT license · ★ 289,792 on GitHub · updated Sep 20

Writing skills cover

Writing skills is a free Claude skill by obra, part of the Superpowers collection, for creating your own skills. It treats a skill like code: run a pressure scenario and watch an agent fail without it, write the SKILL.md, check the agent now complies, then close loopholes. It shows good and bad description lines side by side.

---
name: writing-skills
description: Use when creating new skills, editing existing skills, or verifying skills work before deployment
---

# Writing Skills

## 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](../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.

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.

Overview

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

The SKILL.md below is the copy AgentAlley read and checked. The repo has changed it since; the other files are from commit 5bf4e78.

Manual install (npx, ZIP)
Claude Codenpx skills add obra/superpowers --skill writing-skills -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/obra/superpowers/tar.gz/5bf4e7801107 \ | tar -xz -C ~/.claude/skills --strip-components=2 superpowers-5bf4e7801107/skills/writing-skills
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/93b11ad82779baf474fe/writing-skills.zip" -OutFile "$env:TEMP\writing-skills.zip"; Expand-Archive "$env:TEMP\writing-skills.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md26.0 KB
  • anthropic-best-practices.md45.1 KB
  • graphviz-conventions.dot5.8 KB
  • persuasion-principles.md5.8 KB
  • render-graphs.js4.9 KB
  • testing-skills-with-subagents.md12.3 KB
  • examples/1 file · 5.3 KB
Read the files here
obra/5bf4e787 files
Shared references2SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text680 lines

Writing Skills

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 anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.

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

TDD Mapping for Skills

TDD Concept Skill Creation
Test case Pressure scenario with subagent
Production code Skill document (SKILL.md)
Test fails (RED) Agent violates rule without skill (baseline)
Test passes (GREEN) Agent complies with skill present
Refactor Close loopholes while maintaining compliance
Write test first Run baseline scenario BEFORE writing skill
Watch it fail Document exact rationalizations agent uses
Minimal code Write skill addressing those specific violations
Watch it pass Verify agent now complies
Refactor cycle Find new rationalizations → plug → re-verify

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

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)

Skill Types

Technique

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

Pattern

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

Reference

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

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

SKILL.md Structure

Frontmatter (YAML):

  • Two required fields: name and description (see agentskills.io/specification for all supported fields)
  • Max 1024 characters total
  • name: Use letters, numbers, and hyphens only (no parentheses, special chars)
  • description: Third-person, describes ONLY when to use (NOT what it does)
    • Start with "Use when..." to focus on triggering conditions
    • Include specific symptoms, situations, and contexts
    • NEVER summarize the skill's process or workflow (see SDO section for why)
    • Keep under 500 characters if possible
---
name: Skill-Name-With-Hyphens
description: Use when [specific triggering conditions and symptoms]
---

# Skill Name

## Overview
What is this? Core principle in 1-2 sentences.

## When to Use
[Small inline flowchart IF decision non-obvious]

Bullet list with SYMPTOMS and use cases
When NOT to use

## Core Pattern (for techniques/patterns)
Before/after code comparison

## Quick Reference
Table or bullets for scanning common operations

## Implementation
Inline code for simple patterns
Link to file for heavy reference or reusable tools

## Common Mistakes
What goes wrong + fixes

## Real-World Impact (optional)
Concrete results

Skill Discovery Optimization (SDO)

Critical for discovery: Future agents need to FIND your skill

1. Rich Description Field

Purpose: Your agent reads the description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"

Format: Start with "Use when..." to focus on triggering conditions

CRITICAL: Description = When to Use, NOT What the Skill Does

The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.

Why this matters: Testing revealed that when a description summarizes the skill's workflow, an agent may follow the description instead of reading the full skill content. A description saying "code review between tasks" caused an agent to do ONE review, even though the skill's flowchart clearly showed TWO reviews (spec compliance then code quality).

When the description was changed to just "Use when executing implementation plans with independent tasks" (no workflow summary), the agent correctly read the flowchart and followed the two-stage review process.

The trap: Descriptions that summarize workflow create a shortcut agents will take. The skill body becomes documentation agents skip.

# ❌ BAD: Summarizes workflow - agents may follow this instead of reading skill
description: Use when executing plans - dispatches subagent per task with code review between tasks

# ❌ BAD: Too much process detail
description: Use for TDD - write test first, watch it fail, write minimal code, refactor

# ✅ GOOD: Just triggering conditions, no workflow summary
description: Use when executing implementation plans with independent tasks in the current session

# ✅ GOOD: Triggering conditions only
description: Use when implementing any feature or bugfix, before writing implementation code

Content:

  • Use concrete triggers, symptoms, and situations that signal this skill applies
  • Describe the problem (race conditions, inconsistent behavior) not language-specific symptoms (setTimeout, sleep)
  • Keep triggers technology-agnostic unless the skill itself is technology-specific
  • If skill is technology-specific, make that explicit in the trigger
  • Write in third person (injected into system prompt)
  • NEVER summarize the skill's process or workflow
# ❌ BAD: Too abstract, vague, doesn't include when to use
description: For async testing

# ❌ BAD: First person
description: I can help you with async tests when they're flaky

# ❌ BAD: Mentions technology but skill isn't specific to it
description: Use when tests use setTimeout/sleep and are flaky

# ✅ GOOD: Starts with "Use when", describes problem, no workflow
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently

# ✅ GOOD: Technology-specific skill with explicit trigger
description: Use when using React Router and handling authentication redirects
2. Keyword Coverage

Use words an agent would search for:

  • Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
  • Symptoms: "flaky", "hanging", "zombie", "pollution"
  • Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
  • Tools: Actual commands, library names, file types
3. Descriptive Naming

Use active voice, verb-first:

  • ✅ creating-skills not skill-creation
  • ✅ condition-based-waiting not async-test-helpers
4. Token Efficiency (Critical)

Problem: getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.

Target word counts:

  • getting-started workflows: <150 words each
  • Frequently-loaded skills: <200 words total
  • Other skills: <500 words (still be concise)

Techniques:

Move details to tool help:

# ❌ BAD: Document all flags in SKILL.md
search-conversations supports --text, --both, --after DATE, --before DATE, --limit N

# ✅ GOOD: Reference --help
search-conversations supports multiple modes and filters. Run --help for details.

Use cross-references:

# ❌ BAD: Repeat workflow details
When searching, dispatch subagent with template...
[20 lines of repeated instructions]

# ✅ GOOD: Reference other skill
Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.

Compress examples:

# ❌ BAD: Verbose example (42 words)
your human partner: "How did we handle authentication errors in React Router before?"
You: I'll search past conversations for React Router authentication patterns.
[Dispatch subagent with search query: "React Router authentication error handling 401"]

# ✅ GOOD: Minimal example (20 words)
Partner: "How did we handle auth errors in React Router?"
You: Searching...
[Dispatch subagent → synthesis]

Eliminate redundancy:

  • Don't repeat what's in cross-referenced skills
  • Don't explain what's obvious from command
  • Don't include multiple examples of same pattern

Verification:

wc -w skills/path/SKILL.md
# getting-started workflows: aim for <150 each
# Other frequently-loaded: aim for <200 total

Name by what you DO or core insight:

  • ✅ condition-based-waiting > async-test-helpers
  • ✅ using-skills not skill-usage
  • ✅ flatten-with-flags > data-structure-refactoring
  • ✅ root-cause-tracing > debugging-techniques

Gerunds (-ing) work well for processes:

  • creating-skills, testing-skills, debugging-with-logs
  • Active, describes the action you're taking
5. Cross-Referencing Other Skills

When writing documentation that references other skills:

Use skill name only, with explicit requirement markers:

  • ✅ Good: **REQUIRED SUB-SKILL:** Use superpowers:test-driven-development
  • ✅ Good: **REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging
  • ❌ Bad: See skills/testing/test-driven-development (unclear if required)
  • ❌ Bad: @skills/testing/test-driven-development/SKILL.md (force-loads, burns context)

Why no @ links: @ syntax force-loads files immediately, consuming 200k+ context before you need them.

Flowchart Usage

digraph when_flowchart {
    "Need to show information?" [shape=diamond];
    "Decision where I might go wrong?" [shape=diamond];
    "Use markdown" [shape=box];
    "Small inline flowchart" [shape=box];

    "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
    "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
    "Decision where I might go wrong?" -> "Use markdown" [label="no"];
}

Use flowcharts ONLY for:

  • Non-obvious decision points
  • Process loops where you might stop too early
  • "When to use A vs B" decisions

Never use flowcharts for:

  • Reference material → Tables, lists
  • Code examples → Markdown blocks
  • Linear instructions → Numbered lists
  • Labels without semantic meaning (step1, helper2)

See graphviz-conventions.dot in this directory for graphviz style rules.

Visualizing for your human partner: Use render-graphs.js in this directory to render a skill's flowcharts to SVG:

./render-graphs.js ../some-skill           # Each diagram separately
./render-graphs.js ../some-skill --combine # All diagrams in one SVG

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.

File Organization

Self-Contained Skill
defense-in-depth/
  SKILL.md    # Everything inline

When: All content fits, no heavy reference needed

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

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

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.

Testing All Skill Types

Different skill types need different test approaches:

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

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

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

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

Common Rationalizations for Skipping Testing

Excuse Reality
"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.

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 failure Right form Wrong form
Skips/violates a rule under pressure (knows better, does it anyway) Prohibition + rationalization table + red flags (see Bulletproofing below) 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 order Prohibition list ("don't restate", "never narrate")
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
Behavior should depend on a condition Conditional 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.

Bulletproofing Skills Against Rationalization

Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.

Scope: this toolkit is for discipline failures — an agent that knows the rule and skips it under pressure. For wrong-shaped output or omitted elements, prohibition-based bulletproofing backfires; use the forms in Match the Form to the Failure instead.

Psychology note: Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.

Close Every Loophole Explicitly

Don't just state the rule - forbid specific workarounds:

<Bad> ```markdown Write code before test? Delete it. ``` </Bad><Good> ```markdown Write code before test? Delete it. Start over.

No exceptions:

  • Don't keep it as "reference"
  • Don't "adapt" it while writing tests
  • Don't look at it
  • Delete means delete
</Good>

### Address "Spirit vs Letter" Arguments

Add foundational principle early:

```markdown
**Violating the letter of the rules is violating the spirit of the rules.**

This cuts off entire class of "I'm following the spirit" rationalizations.

Build Rationalization Table

Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:

| Excuse | Reality |
|--------|---------|
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
| "I'll test after" | Tests passing immediately prove nothing. |
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
Create Red Flags List

Make it easy for agents to self-check when rationalizing:

## Red Flags - STOP and Start Over

- Code before test
- "I already manually tested it"
- "Tests after achieve the same purpose"
- "It's about spirit not ritual"
- "This is different because..."

**All of these mean: Delete code. Start over with TDD.**
Update SDO for Violation Symptoms

Add to description: symptoms of when you're ABOUT to violate the rule:

description: use when implementing any feature or bugfix, before writing implementation code

RED-GREEN-REFACTOR for Skills

Follow the TDD cycle:

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.

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.

REFACTOR: Close Loopholes

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

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 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

Anti-Patterns

❌ Narrative Example

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

❌ Multi-Language Dilution

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

❌ Code in Flowcharts
step1 [label="import fs"];
step2 [label="read file"];

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

❌ Generic Labels

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

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.

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)

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.

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 
8## Overview
9 
10**Writing skills IS Test-Driven Development applied to process documentation.**
11 
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.
13 
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).
15 
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.
17 
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.
19 
20**Official guidance:** For Anthropic's official skill authoring best practices, see anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
21 
22## What is a Skill?
23 
24A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.
25 
26**Skills are:** Reusable techniques, patterns, tools, reference guides
27 
28**Skills are NOT:** Narratives about how you solved a problem once
29 
30## TDD Mapping for Skills
31 
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 |
44 
45The entire skill creation process follows RED-GREEN-REFACTOR.
46 
47## When to Create a Skill
48 
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
54 
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)
60 
61## Skill Types
62 
63### Technique
64Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
65 
66### Pattern
67Way of thinking about problems (flatten-with-flags, test-invariants)
68 
69### Reference
70API docs, syntax guides, tool documentation (office docs)
71 
72## Directory Structure
73 
74 
75```
76skills/
77 skill-name/
78 SKILL.md # Main reference (required)
79 supporting-file.* # Only if needed
80```
81 
82**Flat namespace** - all skills in one searchable namespace
83 
84**Separate files for:**
851. **Heavy reference** (100+ lines) - API docs, comprehensive syntax
862. **Reusable tools** - Scripts, utilities, templates
87 
88**Keep inline:**
89- Principles and concepts
90- Code patterns (< 50 lines)
91- Everything else
92 
93## SKILL.md Structure
94 
95**Frontmatter (YAML):**
96- Two required fields: `name` and `description` (see [agentskills.io/specification](https://agentskills.io/specification) for all supported fields)
97- Max 1024 characters total
98- `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
99- `description`: Third-person, describes ONLY when to use (NOT what it does)
100 - Start with "Use when..." to focus on triggering conditions
101 - Include specific symptoms, situations, and contexts
102 - **NEVER summarize the skill's process or workflow** (see SDO section for why)
103 - Keep under 500 characters if possible
104 
105```markdown
106---
107name: Skill-Name-With-Hyphens
108description: Use when [specific triggering conditions and symptoms]
109---
110 
111# Skill Name
112 
113## Overview
114What is this? Core principle in 1-2 sentences.
115 
116## When to Use
117[Small inline flowchart IF decision non-obvious]
118 
119Bullet list with SYMPTOMS and use cases
120When NOT to use
121 
122## Core Pattern (for techniques/patterns)
123Before/after code comparison
124 
125## Quick Reference
126Table or bullets for scanning common operations
127 
128## Implementation
129Inline code for simple patterns
130Link to file for heavy reference or reusable tools
131 
132## Common Mistakes
133What goes wrong + fixes
134 
135## Real-World Impact (optional)
136Concrete results
137```
138 
139 
140## Skill Discovery Optimization (SDO)
141 
142**Critical for discovery:** Future agents need to FIND your skill
143 
144### 1. Rich Description Field
145 
146**Purpose:** Your agent reads the description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"
147 
148**Format:** Start with "Use when..." to focus on triggering conditions
149 
150**CRITICAL: Description = When to Use, NOT What the Skill Does**
151 
152The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
153 
154**Why this matters:** Testing revealed that when a description summarizes the skill's workflow, an agent may follow the description instead of reading the full skill content. A description saying "code review between tasks" caused an agent to do ONE review, even though the skill's flowchart clearly showed TWO reviews (spec compliance then code quality).
155 
156When the description was changed to just "Use when executing implementation plans with independent tasks" (no workflow summary), the agent correctly read the flowchart and followed the two-stage review process.
157 
158**The trap:** Descriptions that summarize workflow create a shortcut agents will take. The skill body becomes documentation agents skip.
159 
160```yaml
161# ❌ BAD: Summarizes workflow - agents may follow this instead of reading skill
162description: Use when executing plans - dispatches subagent per task with code review between tasks
163 
164# ❌ BAD: Too much process detail
165description: Use for TDD - write test first, watch it fail, write minimal code, refactor
166 
167# ✅ GOOD: Just triggering conditions, no workflow summary
168description: Use when executing implementation plans with independent tasks in the current session
169 
170# ✅ GOOD: Triggering conditions only
171description: Use when implementing any feature or bugfix, before writing implementation code
172```
173 
174**Content:**
175- Use concrete triggers, symptoms, and situations that signal this skill applies
176- Describe the *problem* (race conditions, inconsistent behavior) not *language-specific symptoms* (setTimeout, sleep)
177- Keep triggers technology-agnostic unless the skill itself is technology-specific
178- If skill is technology-specific, make that explicit in the trigger
179- Write in third person (injected into system prompt)
180- **NEVER summarize the skill's process or workflow**
181 
182```yaml
183# ❌ BAD: Too abstract, vague, doesn't include when to use
184description: For async testing
185 
186# ❌ BAD: First person
187description: I can help you with async tests when they're flaky
188 
189# ❌ BAD: Mentions technology but skill isn't specific to it
190description: Use when tests use setTimeout/sleep and are flaky
191 
192# ✅ GOOD: Starts with "Use when", describes problem, no workflow
193description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
194 
195# ✅ GOOD: Technology-specific skill with explicit trigger
196description: Use when using React Router and handling authentication redirects
197```
198 
199### 2. Keyword Coverage
200 
201Use words an agent would search for:
202- Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
203- Symptoms: "flaky", "hanging", "zombie", "pollution"
204- Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
205- Tools: Actual commands, library names, file types
206 
207### 3. Descriptive Naming
208 
209**Use active voice, verb-first:**
210- ✅ `creating-skills` not `skill-creation`
211- ✅ `condition-based-waiting` not `async-test-helpers`
212 
213### 4. Token Efficiency (Critical)
214 
215**Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
216 
217**Target word counts:**
218- getting-started workflows: <150 words each
219- Frequently-loaded skills: <200 words total
220- Other skills: <500 words (still be concise)
221 
222**Techniques:**
223 
224**Move details to tool help:**
225```bash
226# ❌ BAD: Document all flags in SKILL.md
227search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
228 
229# ✅ GOOD: Reference --help
230search-conversations supports multiple modes and filters. Run --help for details.
231```
232 
233**Use cross-references:**
234```markdown
235# ❌ BAD: Repeat workflow details
236When searching, dispatch subagent with template...
237[20 lines of repeated instructions]
238 
239# ✅ GOOD: Reference other skill
240Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
241```
242 
243**Compress examples:**
244```markdown
245# ❌ BAD: Verbose example (42 words)
246your human partner: "How did we handle authentication errors in React Router before?"
247You: I'll search past conversations for React Router authentication patterns.
248[Dispatch subagent with search query: "React Router authentication error handling 401"]
249 
250# ✅ GOOD: Minimal example (20 words)
251Partner: "How did we handle auth errors in React Router?"
252You: Searching...
253[Dispatch subagent → synthesis]
254```
255 
256**Eliminate redundancy:**
257- Don't repeat what's in cross-referenced skills
258- Don't explain what's obvious from command
259- Don't include multiple examples of same pattern
260 
261**Verification:**
262```bash
263wc -w skills/path/SKILL.md
264# getting-started workflows: aim for <150 each
265# Other frequently-loaded: aim for <200 total
266```
267 
268**Name by what you DO or core insight:**
269- ✅ `condition-based-waiting` > `async-test-helpers`
270- ✅ `using-skills` not `skill-usage`
271- ✅ `flatten-with-flags` > `data-structure-refactoring`
272- ✅ `root-cause-tracing` > `debugging-techniques`
273 
274**Gerunds (-ing) work well for processes:**
275- `creating-skills`, `testing-skills`, `debugging-with-logs`
276- Active, describes the action you're taking
277 
278### 5. Cross-Referencing Other Skills
279 
280**When writing documentation that references other skills:**
281 
282Use skill name only, with explicit requirement markers:
283- ✅ Good: `**REQUIRED SUB-SKILL:** Use superpowers:test-driven-development`
284- ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging`
285- ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
286- ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
287 
288**Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
289 
290## Flowchart Usage
291 
292```dot
293digraph when_flowchart {
294 "Need to show information?" [shape=diamond];
295 "Decision where I might go wrong?" [shape=diamond];
296 "Use markdown" [shape=box];
297 "Small inline flowchart" [shape=box];
298 
299 "Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
300 "Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
301 "Decision where I might go wrong?" -> "Use markdown" [label="no"];
302}
303```
304 
305**Use flowcharts ONLY for:**
306- Non-obvious decision points
307- Process loops where you might stop too early
308- "When to use A vs B" decisions
309 
310**Never use flowcharts for:**
311- Reference material → Tables, lists
312- Code examples → Markdown blocks
313- Linear instructions → Numbered lists
314- Labels without semantic meaning (step1, helper2)
315 
316See `graphviz-conventions.dot` in this directory for graphviz style rules.
317 
318**Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG:
319```bash
320./render-graphs.js ../some-skill # Each diagram separately
321./render-graphs.js ../some-skill --combine # All diagrams in one SVG
322```
323 
324## Code Examples
325 
326**One excellent example beats many mediocre ones**
327 
328Choose most relevant language:
329- Testing techniques → TypeScript/JavaScript
330- System debugging → Shell/Python
331- Data processing → Python
332 
333**Good example:**
334- Complete and runnable
335- Well-commented explaining WHY
336- From real scenario
337- Shows pattern clearly
338- Ready to adapt (not generic template)
339 
340**Don't:**
341- Implement in 5+ languages
342- Create fill-in-the-blank templates
343- Write contrived examples
344 
345You're good at porting - one great example is enough.
346 
347## File Organization
348 
349### Self-Contained Skill
350```
351defense-in-depth/
352 SKILL.md # Everything inline
353```
354When: All content fits, no heavy reference needed
355 
356### Skill with Reusable Tool
357```
358condition-based-waiting/
359 SKILL.md # Overview + patterns
360 example.ts # Working helpers to adapt
361```
362When: Tool is reusable code, not just narrative
363 
364### Skill with Heavy Reference
365```
366pptx/
367 SKILL.md # Overview + workflows
368 pptxgenjs.md # 600 lines API reference
369 ooxml.md # 500 lines XML structure
370 scripts/ # Executable tools
371```
372When: Reference material too large for inline
373 
374## The Iron Law (Same as TDD)
375 
376```
377NO SKILL WITHOUT A FAILING TEST FIRST
378```
379 
380This applies to NEW skills AND EDITS to existing skills.
381 
382Write skill before testing? Delete it. Start over.
383Edit skill without testing? Same violation.
384 
385**No exceptions:**
386- Not for "simple additions"
387- Not for "just adding a section"
388- Not for "documentation updates"
389- Don't keep untested changes as "reference"
390- Don't "adapt" while running tests
391- Delete means delete
392 
393**REQUIRED BACKGROUND:** The superpowers:test-driven-development skill explains why this matters. Same principles apply to documentation.
394 
395## Testing All Skill Types
396 
397Different skill types need different test approaches:
398 
399### Discipline-Enforcing Skills (rules/requirements)
400 
401**Examples:** TDD, verification-before-completion, designing-before-coding
402 
403**Test with:**
404- Academic questions: Do they understand the rules?
405- Pressure scenarios: Do they comply under stress?
406- Multiple pressures combined: time + sunk cost + exhaustion
407- Identify rationalizations and add explicit counters
408 
409**Success criteria:** Agent follows rule under maximum pressure
410 
411### Technique Skills (how-to guides)
412 
413**Examples:** condition-based-waiting, root-cause-tracing, defensive-programming
414 
415**Test with:**
416- Application scenarios: Can they apply the technique correctly?
417- Variation scenarios: Do they handle edge cases?
418- Missing information tests: Do instructions have gaps?
419 
420**Success criteria:** Agent successfully applies technique to new scenario
421 
422### Pattern Skills (mental models)
423 
424**Examples:** reducing-complexity, information-hiding concepts
425 
426**Test with:**
427- Recognition scenarios: Do they recognize when pattern applies?
428- Application scenarios: Can they use the mental model?
429- Counter-examples: Do they know when NOT to apply?
430 
431**Success criteria:** Agent correctly identifies when/how to apply pattern
432 
433### Reference Skills (documentation/APIs)
434 
435**Examples:** API documentation, command references, library guides
436 
437**Test with:**
438- Retrieval scenarios: Can they find the right information?
439- Application scenarios: Can they use what they found correctly?
440- Gap testing: Are common use cases covered?
441 
442**Success criteria:** Agent finds and correctly applies reference information
443 
444## Common Rationalizations for Skipping Testing
445 
446| Excuse | Reality |
447|--------|---------|
448| "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
449| "It's just a reference" | References can have gaps, unclear sections. Test retrieval. |
450| "Testing is overkill" | Untested skills have issues. Always. 15 min testing saves hours. |
451| "I'll test if problems emerge" | Problems = agents can't use skill. Test BEFORE deploying. |
452| "Too tedious to test" | Testing is less tedious than debugging bad skill in production. |
453| "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
454| "Academic review is enough" | Reading ≠ using. Test application scenarios. |
455| "No time to test" | Deploying untested skill wastes more time fixing it later. |
456 
457**All of these mean: Test before deploying. No exceptions.**
458 
459## Match the Form to the Failure
460 
461Before writing guidance, classify the baseline failure. The form that bulletproofs one failure type measurably backfires on another.
462 
463| Baseline failure | Right form | Wrong form |
464|---|---|---|
465| Skips/violates a rule under pressure (knows better, does it anyway) | Prohibition + rationalization table + red flags (see Bulletproofing below) | Soft guidance ("prefer...", "consider...") |
466| 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") |
467| 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 |
468| Behavior should depend on a condition | Conditional keyed to an observable predicate ("if the brief exists, reference it") | Unconditional rule + exemption clauses |
469 
470**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.
471 
472**Rules for whichever form you pick:**
473- **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.
474- **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.
475 
476## Bulletproofing Skills Against Rationalization
477 
478Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
479 
480**Scope:** this toolkit is for discipline failures — an agent that knows the rule and skips it under pressure. For wrong-shaped output or omitted elements, prohibition-based bulletproofing backfires; use the forms in Match the Form to the Failure instead.
481 
482**Psychology note:** Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.
483 
484### Close Every Loophole Explicitly
485 
486Don't just state the rule - forbid specific workarounds:
487 
488<Bad>
489```markdown
490Write code before test? Delete it.
491```
492</Bad>
493 
494<Good>
495```markdown
496Write code before test? Delete it. Start over.
497 
498**No exceptions:**
499- Don't keep it as "reference"
500- Don't "adapt" it while writing tests
501- Don't look at it
502- Delete means delete
503```
504</Good>
505 
506### Address "Spirit vs Letter" Arguments
507 
508Add foundational principle early:
509 
510```markdown
511**Violating the letter of the rules is violating the spirit of the rules.**
512```
513 
514This cuts off entire class of "I'm following the spirit" rationalizations.
515 
516### Build Rationalization Table
517 
518Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
519 
520```markdown
521| Excuse | Reality |
522|--------|---------|
523| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
524| "I'll test after" | Tests passing immediately prove nothing. |
525| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
526```
527 
528### Create Red Flags List
529 
530Make it easy for agents to self-check when rationalizing:
531 
532```markdown
533## Red Flags - STOP and Start Over
534 
535- Code before test
536- "I already manually tested it"
537- "Tests after achieve the same purpose"
538- "It's about spirit not ritual"
539- "This is different because..."
540 
541**All of these mean: Delete code. Start over with TDD.**
542```
543 
544### Update SDO for Violation Symptoms
545 
546Add to description: symptoms of when you're ABOUT to violate the rule:
547 
548```yaml
549description: use when implementing any feature or bugfix, before writing implementation code
550```
551 
552## RED-GREEN-REFACTOR for Skills
553 
554Follow the TDD cycle:
555 
556### RED: Write Failing Test (Baseline)
557 
558Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
559- What choices did they make?
560- What rationalizations did they use (verbatim)?
561- Which pressures triggered violations?
562 
563This is "watch the test fail" - you must see what agents naturally do before writing the skill.
564 
565### GREEN: Write Minimal Skill
566 
567Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
568 
569Run same scenarios WITH skill. Agent should now comply.
570 
571### REFACTOR: Close Loopholes
572 
573Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
574 
575### Micro-Test Wording Before Full Scenarios
576 
577Full pressure-scenario runs are the final gate, but they are slow and expensive per iteration. Verify the wording itself first with micro-tests:
578 
5791. **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.
5802. **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.
5813. **5+ reps per variant.** Single samples lie.
5824. **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.
5835. **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.
584 
585Micro-tests verify wording; they do not replace pressure scenarios for discipline skills.
586 
587**Testing methodology:** See [testing-skills-with-subagents.md](testing-skills-with-subagents.md) for the complete testing methodology:
588- How to write pressure scenarios
589- Pressure types (time, sunk cost, authority, exhaustion)
590- Plugging holes systematically
591- Meta-testing techniques
592 
593## Anti-Patterns
594 
595### ❌ Narrative Example
596"In session 2025-10-03, we found empty projectDir caused..."
597**Why bad:** Too specific, not reusable
598 
599### ❌ Multi-Language Dilution
600example-js.js, example-py.py, example-go.go
601**Why bad:** Mediocre quality, maintenance burden
602 
603### ❌ Code in Flowcharts
604```dot
605step1 [label="import fs"];
606step2 [label="read file"];
607```
608**Why bad:** Can't copy-paste, hard to read
609 
610### ❌ Generic Labels
611helper1, helper2, step3, pattern4
612**Why bad:** Labels should have semantic meaning
613 
614## STOP: Before Moving to Next Skill
615 
616**After writing ANY skill, you MUST STOP and complete the deployment process.**
617 
618**Do NOT:**
619- Create multiple skills in batch without testing each
620- Move to next skill before current one is verified
621- Skip testing because "batching is more efficient"
622 
623**The deployment checklist below is MANDATORY for EACH skill.**
624 
625Deploying untested skills = deploying untested code. It's a violation of quality standards.
626 
627## Skill Creation Checklist (TDD Adapted)
628 
629**IMPORTANT: Create a todo for EACH checklist item below.**
630 
631**RED Phase - Write Failing Test:**
632- [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
633- [ ] Run scenarios WITHOUT skill - document baseline behavior verbatim
634- [ ] Identify patterns in rationalizations/failures
635 
636**GREEN Phase - Write Minimal Skill:**
637- [ ] Name uses only letters, numbers, hyphens (no parentheses/special chars)
638- [ ] YAML frontmatter with required `name` and `description` fields (max 1024 chars; see [spec](https://agentskills.io/specification))
639- [ ] Description starts with "Use when..." and includes specific triggers/symptoms
640- [ ] Description written in third person
641- [ ] Keywords throughout for search (errors, symptoms, tools)
642- [ ] Clear overview with core principle
643- [ ] Address specific baseline failures identified in RED
644- [ ] Guidance form matches the failure type (see Match the Form to the Failure)
645- [ ] 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
646- [ ] Code inline OR link to separate file
647- [ ] One excellent example (not multi-language)
648- [ ] Run scenarios WITH skill - verify agents now comply
649 
650**REFACTOR Phase - Close Loopholes:**
651- [ ] Identify NEW rationalizations from testing
652- [ ] Add explicit counters (if discipline skill)
653- [ ] Build rationalization table from all test iterations
654- [ ] Create red flags list
655- [ ] Re-test until bulletproof
656 
657**Quality Checks:**
658- [ ] Small flowchart only if decision non-obvious
659- [ ] Quick reference table
660- [ ] Common mistakes section
661- [ ] No narrative storytelling
662- [ ] Supporting files only for tools or heavy reference
663 
664**Deployment:**
665- [ ] Commit skill to git and push to your fork (if configured)
666- [ ] Consider contributing back via PR (if broadly useful)
667 
668## Discovery Workflow
669 
670How future agents find your skill:
671 
6721. **Encounters problem** ("tests are flaky")
6732. **Searches skills** (greps descriptions, browses categories)
6743. **Finds SKILL** (description matches)
6754. **Scans overview** (is this relevant?)
6765. **Reads patterns** (quick reference table)
6776. **Loads example** (only when implementing)
678 
679**Optimize for this flow** - put searchable terms early and often.
680 
View all files on GitHub →

Files this skill points to that are not in its repo

Its SKILL.md tells the agent to read 2 files. We looked through the whole repo at commit 5bf4e78 and found none of them. The skill will not work as written.

Show the 2 missing files
  • scripts/tool.js
  • scripts/tool.sh

Details

Updated
Sep 20, 2026
License
MIT
Stars on the repo
★ 289,792
Checked
Source
obra/superpowers ↗
Creator
obra · 14 listings
View creator

Similar skills

See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtoolsaddyosmani/agent-skills · by addyosmaniTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.★ 98.7k GitHub starsMCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPA Model Context Protocol server that provides web contentFetch MCP Servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsSkillAbout libraries, frameworks, API referencesContext7 MCPupstash/context7 · by upstashThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.★ 62.3k GitHub starsSkillUses Chrome DevTools via MCP for efficient debuggingChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsUses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).★ 52.4k GitHub stars

More from obra

SkillBrainstorms ideas into designs before any creative workBrainstorming Ideas Into Designsobra/superpowers · by obraYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.★ 290k GitHub starsSkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillDispatches parallel agentsDispatching parallel agentsobra/superpowers · by obraUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies★ 290k GitHub starsSkillExecutes plans with review checkpointsExecuting plansobra/superpowers · by obraUse when you have a written implementation plan to execute in a separate session with review checkpoints★ 290k GitHub starsSkillFinishes a development branchFinishing a development branchobra/superpowers · by obraUse when implementation is complete, all tests pass, and you need to decide how to integrate the work★ 290k GitHub starsSkillRequests code review before mergingRequesting code reviewobra/superpowers · by obraUse when completing tasks, implementing major features, or before merging to verify work meets requirements★ 290k GitHub stars