@loneexile/omp-superpowers 7.0.0-omp.3 → 7.0.1-omp.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/README.md +9 -6
- package/agents/sdd-escalation-implementer.md +3 -2
- package/agents/sdd-implementer.md +1 -1
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +96 -34
- package/skills/diagnosing-superpowers/SKILL.md +1 -1
- package/skills/diagnosing-superpowers/references/github-issues.md +3 -3
- package/skills/diagnosing-superpowers/templates/issue.md +23 -4
- package/skills/executing-plans/SKILL.md +22 -57
- package/skills/finishing-a-development-branch/SKILL.md +5 -1
- package/skills/subagent-driven-development/SKILL.md +145 -50
- package/skills/subagent-driven-development/implementer-prompt.md +12 -4
- package/skills/subagent-driven-development/re-review-prompt.md +4 -2
- package/skills/subagent-driven-development/task-reviewer-prompt.md +3 -1
- package/skills/using-superpowers/references/pi-tools.md +1 -1
- package/skills/writing-plans/SKILL.md +8 -5
- package/skills/writing-skills/SKILL.md +21 -303
- package/skills/writing-skills/references/bulletproofing.md +80 -0
- package/skills/writing-skills/references/discovery.md +201 -0
- package/skills/writing-skills/references/flowcharts.md +37 -0
- package/skills/writing-skills/{testing-skills-with-subagents.md → references/testing-skills-with-subagents.md} +2 -2
- /package/skills/writing-skills/{examples → references}/CLAUDE_MD_TESTING.md +0 -0
- /package/skills/writing-skills/{anthropic-best-practices.md → references/anthropic-best-practices.md} +0 -0
- /package/skills/writing-skills/{graphviz-conventions.dot → references/graphviz-conventions.dot} +0 -0
- /package/skills/writing-skills/{persuasion-principles.md → references/persuasion-principles.md} +0 -0
|
@@ -17,7 +17,7 @@ You write test cases (pressure scenarios with subagents), watch them fail (basel
|
|
|
17
17
|
|
|
18
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
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.
|
|
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.
|
|
21
21
|
|
|
22
22
|
## What is a Skill?
|
|
23
23
|
|
|
@@ -90,236 +90,23 @@ skills/
|
|
|
90
90
|
- Code patterns (< 50 lines)
|
|
91
91
|
- Everything else
|
|
92
92
|
|
|
93
|
-
## SKILL.md
|
|
93
|
+
## Writing SKILL.md
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
95
|
+
A skill's `description` says only when to use it: triggering conditions and
|
|
96
|
+
symptoms, starting with "Use when...". It never summarizes the skill's
|
|
97
|
+
workflow, because an agent that reads a workflow summary follows it instead
|
|
98
|
+
of reading the skill.
|
|
104
99
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
# Skill Name
|
|
112
|
-
|
|
113
|
-
## Overview
|
|
114
|
-
What is this? Core principle in 1-2 sentences.
|
|
115
|
-
|
|
116
|
-
## When to Use
|
|
117
|
-
[Small inline flowchart IF decision non-obvious]
|
|
118
|
-
|
|
119
|
-
Bullet list with SYMPTOMS and use cases
|
|
120
|
-
When NOT to use
|
|
121
|
-
|
|
122
|
-
## Core Pattern (for techniques/patterns)
|
|
123
|
-
Before/after code comparison
|
|
124
|
-
|
|
125
|
-
## Quick Reference
|
|
126
|
-
Table or bullets for scanning common operations
|
|
127
|
-
|
|
128
|
-
## Implementation
|
|
129
|
-
Inline code for simple patterns
|
|
130
|
-
Link to file for heavy reference or reusable tools
|
|
131
|
-
|
|
132
|
-
## Common Mistakes
|
|
133
|
-
What goes wrong + fixes
|
|
134
|
-
|
|
135
|
-
## Real-World Impact (optional)
|
|
136
|
-
Concrete 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
|
-
|
|
152
|
-
The 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
|
-
|
|
156
|
-
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.
|
|
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
|
|
162
|
-
description: Use when executing plans - dispatches subagent per task with code review between tasks
|
|
163
|
-
|
|
164
|
-
# ❌ BAD: Too much process detail
|
|
165
|
-
description: Use for TDD - write test first, watch it fail, write minimal code, refactor
|
|
166
|
-
|
|
167
|
-
# ✅ GOOD: Just triggering conditions, no workflow summary
|
|
168
|
-
description: Use when executing implementation plans with independent tasks in the current session
|
|
169
|
-
|
|
170
|
-
# ✅ GOOD: Triggering conditions only
|
|
171
|
-
description: 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
|
|
184
|
-
description: For async testing
|
|
185
|
-
|
|
186
|
-
# ❌ BAD: First person
|
|
187
|
-
description: I can help you with async tests when they're flaky
|
|
188
|
-
|
|
189
|
-
# ❌ BAD: Mentions technology but skill isn't specific to it
|
|
190
|
-
description: Use when tests use setTimeout/sleep and are flaky
|
|
191
|
-
|
|
192
|
-
# ✅ GOOD: Starts with "Use when", describes problem, no workflow
|
|
193
|
-
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
|
|
194
|
-
|
|
195
|
-
# ✅ GOOD: Technology-specific skill with explicit trigger
|
|
196
|
-
description: Use when using React Router and handling authentication redirects
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 2. Keyword Coverage
|
|
200
|
-
|
|
201
|
-
Use 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
|
|
227
|
-
search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
|
|
228
|
-
|
|
229
|
-
# ✅ GOOD: Reference --help
|
|
230
|
-
search-conversations supports multiple modes and filters. Run --help for details.
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Use cross-references:**
|
|
234
|
-
```markdown
|
|
235
|
-
# ❌ BAD: Repeat workflow details
|
|
236
|
-
When searching, dispatch subagent with template...
|
|
237
|
-
[20 lines of repeated instructions]
|
|
238
|
-
|
|
239
|
-
# ✅ GOOD: Reference other skill
|
|
240
|
-
Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
|
|
241
|
-
```
|
|
100
|
+
When you write or change a skill's frontmatter, name or description, or
|
|
101
|
+
need to cut its size, read [references/discovery.md](references/discovery.md):
|
|
102
|
+
the SKILL.md template, description and keyword guidance, naming, token
|
|
103
|
+
budgets, and cross-referencing other skills.
|
|
242
104
|
|
|
243
|
-
|
|
244
|
-
```markdown
|
|
245
|
-
# ❌ BAD: Verbose example (42 words)
|
|
246
|
-
your human partner: "How did we handle authentication errors in React Router before?"
|
|
247
|
-
You: 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)
|
|
251
|
-
Partner: "How did we handle auth errors in React Router?"
|
|
252
|
-
You: 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
|
|
263
|
-
wc -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
|
|
105
|
+
## Flowcharts
|
|
279
106
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
|
293
|
-
digraph 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
|
-
|
|
316
|
-
See `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
|
-
node ./render-graphs.js ../some-skill # Each diagram separately
|
|
321
|
-
node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
|
|
322
|
-
```
|
|
107
|
+
When you add or change a flowchart in a skill, read
|
|
108
|
+
[references/flowcharts.md](references/flowcharts.md) first: when a flowchart
|
|
109
|
+
earns its place, the graphviz conventions, and how to render one.
|
|
323
110
|
|
|
324
111
|
## Code Examples
|
|
325
112
|
|
|
@@ -464,7 +251,7 @@ Before writing guidance, classify the baseline failure. The form that bulletproo
|
|
|
464
251
|
|
|
465
252
|
| Baseline failure | Right form | Wrong form |
|
|
466
253
|
|---|---|---|
|
|
467
|
-
| Skips/violates a rule under pressure (knows better, does it anyway) | Prohibition + rationalization table + red flags (see
|
|
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...") |
|
|
468
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") |
|
|
469
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 |
|
|
470
257
|
| Behavior should depend on a condition | Conditional keyed to an observable predicate ("if the brief exists, reference it") | Unconditional rule + exemption clauses |
|
|
@@ -475,81 +262,12 @@ Before writing guidance, classify the baseline failure. The form that bulletproo
|
|
|
475
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.
|
|
476
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.
|
|
477
264
|
|
|
478
|
-
## Bulletproofing
|
|
479
|
-
|
|
480
|
-
Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
|
|
481
|
-
|
|
482
|
-
**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.
|
|
483
|
-
|
|
484
|
-
**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.
|
|
485
|
-
|
|
486
|
-
### Close Every Loophole Explicitly
|
|
487
|
-
|
|
488
|
-
Don't just state the rule - forbid specific workarounds:
|
|
489
|
-
|
|
490
|
-
<Bad>
|
|
491
|
-
```markdown
|
|
492
|
-
Write code before test? Delete it.
|
|
493
|
-
```
|
|
494
|
-
</Bad>
|
|
495
|
-
|
|
496
|
-
<Good>
|
|
497
|
-
```markdown
|
|
498
|
-
Write code before test? Delete it. Start over.
|
|
499
|
-
|
|
500
|
-
**No exceptions:**
|
|
501
|
-
- Don't keep it as "reference"
|
|
502
|
-
- Don't "adapt" it while writing tests
|
|
503
|
-
- Don't look at it
|
|
504
|
-
- Delete means delete
|
|
505
|
-
```
|
|
506
|
-
</Good>
|
|
507
|
-
|
|
508
|
-
### Address "Spirit vs Letter" Arguments
|
|
509
|
-
|
|
510
|
-
Add foundational principle early:
|
|
265
|
+
## Bulletproofing Against Rationalization
|
|
511
266
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
This cuts off entire class of "I'm following the spirit" rationalizations.
|
|
517
|
-
|
|
518
|
-
### Build Rationalization Table
|
|
519
|
-
|
|
520
|
-
Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
|
|
521
|
-
|
|
522
|
-
```markdown
|
|
523
|
-
| Excuse | Reality |
|
|
524
|
-
|--------|---------|
|
|
525
|
-
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
526
|
-
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
527
|
-
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### Create Red Flags List
|
|
531
|
-
|
|
532
|
-
Make it easy for agents to self-check when rationalizing:
|
|
533
|
-
|
|
534
|
-
```markdown
|
|
535
|
-
## Red Flags - STOP and Start Over
|
|
536
|
-
|
|
537
|
-
- Code before test
|
|
538
|
-
- "I already manually tested it"
|
|
539
|
-
- "Tests after achieve the same purpose"
|
|
540
|
-
- "It's about spirit not ritual"
|
|
541
|
-
- "This is different because..."
|
|
542
|
-
|
|
543
|
-
**All of these mean: Delete code. Start over with TDD.**
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
### Update SDO for Violation Symptoms
|
|
547
|
-
|
|
548
|
-
Add to description: symptoms of when you're ABOUT to violate the rule:
|
|
549
|
-
|
|
550
|
-
```yaml
|
|
551
|
-
description: use when implementing any feature or bugfix, before writing implementation code
|
|
552
|
-
```
|
|
267
|
+
When the baseline failure is a discipline failure, read
|
|
268
|
+
[references/bulletproofing.md](references/bulletproofing.md) before you write
|
|
269
|
+
the guidance: closing loopholes, the spirit-vs-letter line, the
|
|
270
|
+
rationalization table, and the red-flags list.
|
|
553
271
|
|
|
554
272
|
## RED-GREEN-REFACTOR for Skills
|
|
555
273
|
|
|
@@ -586,7 +304,7 @@ Full pressure-scenario runs are the final gate, but they are slow and expensive
|
|
|
586
304
|
|
|
587
305
|
Micro-tests verify wording; they do not replace pressure scenarios for discipline skills.
|
|
588
306
|
|
|
589
|
-
**Testing methodology:** See [testing-skills-with-subagents.md](testing-skills-with-subagents.md) for the complete testing methodology:
|
|
307
|
+
**Testing methodology:** See [references/testing-skills-with-subagents.md](references/testing-skills-with-subagents.md) for the complete testing methodology:
|
|
590
308
|
- How to write pressure scenarios
|
|
591
309
|
- Pressure types (time, sunk cost, authority, exhaustion)
|
|
592
310
|
- Plugging holes systematically
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Bulletproofing Skills Against Rationalization
|
|
2
|
+
|
|
3
|
+
Part of superpowers:writing-skills. Use it when the baseline failure is a
|
|
4
|
+
discipline failure: the agent knows the rule and skips it under pressure.
|
|
5
|
+
|
|
6
|
+
## Bulletproofing Skills Against Rationalization
|
|
7
|
+
|
|
8
|
+
Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.
|
|
9
|
+
|
|
10
|
+
**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.
|
|
11
|
+
|
|
12
|
+
**Psychology note:** Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md in this directory for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.
|
|
13
|
+
|
|
14
|
+
### Close Every Loophole Explicitly
|
|
15
|
+
|
|
16
|
+
Don't just state the rule - forbid specific workarounds:
|
|
17
|
+
|
|
18
|
+
<Bad>
|
|
19
|
+
```markdown
|
|
20
|
+
Write code before test? Delete it.
|
|
21
|
+
```
|
|
22
|
+
</Bad>
|
|
23
|
+
|
|
24
|
+
<Good>
|
|
25
|
+
```markdown
|
|
26
|
+
Write code before test? Delete it. Start over.
|
|
27
|
+
|
|
28
|
+
**No exceptions:**
|
|
29
|
+
- Don't keep it as "reference"
|
|
30
|
+
- Don't "adapt" it while writing tests
|
|
31
|
+
- Don't look at it
|
|
32
|
+
- Delete means delete
|
|
33
|
+
```
|
|
34
|
+
</Good>
|
|
35
|
+
|
|
36
|
+
### Address "Spirit vs Letter" Arguments
|
|
37
|
+
|
|
38
|
+
Add foundational principle early:
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This cuts off entire class of "I'm following the spirit" rationalizations.
|
|
45
|
+
|
|
46
|
+
### Build Rationalization Table
|
|
47
|
+
|
|
48
|
+
Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
| Excuse | Reality |
|
|
52
|
+
|--------|---------|
|
|
53
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
54
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
55
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Create Red Flags List
|
|
59
|
+
|
|
60
|
+
Make it easy for agents to self-check when rationalizing:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## Red Flags - STOP and Start Over
|
|
64
|
+
|
|
65
|
+
- Code before test
|
|
66
|
+
- "I already manually tested it"
|
|
67
|
+
- "Tests after achieve the same purpose"
|
|
68
|
+
- "It's about spirit not ritual"
|
|
69
|
+
- "This is different because..."
|
|
70
|
+
|
|
71
|
+
**All of these mean: Delete code. Start over with TDD.**
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Update SDO for Violation Symptoms
|
|
75
|
+
|
|
76
|
+
Add to description: symptoms of when you're ABOUT to violate the rule:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
description: use when implementing any feature or bugfix, before writing implementation code
|
|
80
|
+
```
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Writing SKILL.md for Discovery
|
|
2
|
+
|
|
3
|
+
Part of superpowers:writing-skills: the SKILL.md template and how to name,
|
|
4
|
+
describe and size a skill so agents find it and read it.
|
|
5
|
+
|
|
6
|
+
## SKILL.md Structure
|
|
7
|
+
|
|
8
|
+
**Frontmatter (YAML):**
|
|
9
|
+
- Two required fields: `name` and `description` (see [agentskills.io/specification](https://agentskills.io/specification) for all supported fields)
|
|
10
|
+
- Max 1024 characters total
|
|
11
|
+
- `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
|
|
12
|
+
- `description`: Third-person, describes ONLY when to use (NOT what it does)
|
|
13
|
+
- Start with "Use when..." to focus on triggering conditions
|
|
14
|
+
- Include specific symptoms, situations, and contexts
|
|
15
|
+
- **NEVER summarize the skill's process or workflow** (see Skill Discovery Optimization below for why)
|
|
16
|
+
- Keep under 500 characters if possible
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
---
|
|
20
|
+
name: Skill-Name-With-Hyphens
|
|
21
|
+
description: Use when [specific triggering conditions and symptoms]
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Skill Name
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
What is this? Core principle in 1-2 sentences.
|
|
28
|
+
|
|
29
|
+
## When to Use
|
|
30
|
+
[Small inline flowchart IF decision non-obvious]
|
|
31
|
+
|
|
32
|
+
Bullet list with SYMPTOMS and use cases
|
|
33
|
+
When NOT to use
|
|
34
|
+
|
|
35
|
+
## Core Pattern (for techniques/patterns)
|
|
36
|
+
Before/after code comparison
|
|
37
|
+
|
|
38
|
+
## Quick Reference
|
|
39
|
+
Table or bullets for scanning common operations
|
|
40
|
+
|
|
41
|
+
## Implementation
|
|
42
|
+
Inline code for simple patterns
|
|
43
|
+
Link to file for heavy reference or reusable tools
|
|
44
|
+
|
|
45
|
+
## Common Mistakes
|
|
46
|
+
What goes wrong + fixes
|
|
47
|
+
|
|
48
|
+
## Real-World Impact (optional)
|
|
49
|
+
Concrete results
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Skill Discovery Optimization (SDO)
|
|
54
|
+
|
|
55
|
+
**Critical for discovery:** Future agents need to FIND your skill
|
|
56
|
+
|
|
57
|
+
### 1. Rich Description Field
|
|
58
|
+
|
|
59
|
+
**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?"
|
|
60
|
+
|
|
61
|
+
**Format:** Start with "Use when..." to focus on triggering conditions
|
|
62
|
+
|
|
63
|
+
**CRITICAL: Description = When to Use, NOT What the Skill Does**
|
|
64
|
+
|
|
65
|
+
The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
|
|
66
|
+
|
|
67
|
+
**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).
|
|
68
|
+
|
|
69
|
+
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.
|
|
70
|
+
|
|
71
|
+
**The trap:** Descriptions that summarize workflow create a shortcut agents will take. The skill body becomes documentation agents skip.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
# ❌ BAD: Summarizes workflow - agents may follow this instead of reading skill
|
|
75
|
+
description: Use when executing plans - dispatches subagent per task with code review between tasks
|
|
76
|
+
|
|
77
|
+
# ❌ BAD: Too much process detail
|
|
78
|
+
description: Use for TDD - write test first, watch it fail, write minimal code, refactor
|
|
79
|
+
|
|
80
|
+
# ✅ GOOD: Just triggering conditions, no workflow summary
|
|
81
|
+
description: Use when executing implementation plans with independent tasks in the current session
|
|
82
|
+
|
|
83
|
+
# ✅ GOOD: Triggering conditions only
|
|
84
|
+
description: Use when implementing any feature or bugfix, before writing implementation code
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Content:**
|
|
88
|
+
- Use concrete triggers, symptoms, and situations that signal this skill applies
|
|
89
|
+
- Describe the *problem* (race conditions, inconsistent behavior) not *language-specific symptoms* (setTimeout, sleep)
|
|
90
|
+
- Keep triggers technology-agnostic unless the skill itself is technology-specific
|
|
91
|
+
- If skill is technology-specific, make that explicit in the trigger
|
|
92
|
+
- Write in third person (injected into system prompt)
|
|
93
|
+
- **NEVER summarize the skill's process or workflow**
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
# ❌ BAD: Too abstract, vague, doesn't include when to use
|
|
97
|
+
description: For async testing
|
|
98
|
+
|
|
99
|
+
# ❌ BAD: First person
|
|
100
|
+
description: I can help you with async tests when they're flaky
|
|
101
|
+
|
|
102
|
+
# ❌ BAD: Mentions technology but skill isn't specific to it
|
|
103
|
+
description: Use when tests use setTimeout/sleep and are flaky
|
|
104
|
+
|
|
105
|
+
# ✅ GOOD: Starts with "Use when", describes problem, no workflow
|
|
106
|
+
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
|
|
107
|
+
|
|
108
|
+
# ✅ GOOD: Technology-specific skill with explicit trigger
|
|
109
|
+
description: Use when using React Router and handling authentication redirects
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 2. Keyword Coverage
|
|
113
|
+
|
|
114
|
+
Use words an agent would search for:
|
|
115
|
+
- Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
|
|
116
|
+
- Symptoms: "flaky", "hanging", "zombie", "pollution"
|
|
117
|
+
- Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
|
|
118
|
+
- Tools: Actual commands, library names, file types
|
|
119
|
+
|
|
120
|
+
### 3. Descriptive Naming
|
|
121
|
+
|
|
122
|
+
**Use active voice, verb-first:**
|
|
123
|
+
- ✅ `creating-skills` not `skill-creation`
|
|
124
|
+
- ✅ `condition-based-waiting` not `async-test-helpers`
|
|
125
|
+
|
|
126
|
+
### 4. Token Efficiency (Critical)
|
|
127
|
+
|
|
128
|
+
**Problem:** getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.
|
|
129
|
+
|
|
130
|
+
**Target word counts:**
|
|
131
|
+
- getting-started workflows: <150 words each
|
|
132
|
+
- Frequently-loaded skills: <200 words total
|
|
133
|
+
- Other skills: <500 words (still be concise)
|
|
134
|
+
|
|
135
|
+
**Techniques:**
|
|
136
|
+
|
|
137
|
+
**Move details to tool help:**
|
|
138
|
+
```bash
|
|
139
|
+
# ❌ BAD: Document all flags in SKILL.md
|
|
140
|
+
search-conversations supports --text, --both, --after DATE, --before DATE, --limit N
|
|
141
|
+
|
|
142
|
+
# ✅ GOOD: Reference --help
|
|
143
|
+
search-conversations supports multiple modes and filters. Run --help for details.
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Use cross-references:**
|
|
147
|
+
```markdown
|
|
148
|
+
# ❌ BAD: Repeat workflow details
|
|
149
|
+
When searching, dispatch subagent with template...
|
|
150
|
+
[20 lines of repeated instructions]
|
|
151
|
+
|
|
152
|
+
# ✅ GOOD: Reference other skill
|
|
153
|
+
Always use subagents (50-100x context savings). REQUIRED: Use [other-skill-name] for workflow.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Compress examples:**
|
|
157
|
+
```markdown
|
|
158
|
+
# ❌ BAD: Verbose example (42 words)
|
|
159
|
+
your human partner: "How did we handle authentication errors in React Router before?"
|
|
160
|
+
You: I'll search past conversations for React Router authentication patterns.
|
|
161
|
+
[Dispatch subagent with search query: "React Router authentication error handling 401"]
|
|
162
|
+
|
|
163
|
+
# ✅ GOOD: Minimal example (20 words)
|
|
164
|
+
Partner: "How did we handle auth errors in React Router?"
|
|
165
|
+
You: Searching...
|
|
166
|
+
[Dispatch subagent → synthesis]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Eliminate redundancy:**
|
|
170
|
+
- Don't repeat what's in cross-referenced skills
|
|
171
|
+
- Don't explain what's obvious from command
|
|
172
|
+
- Don't include multiple examples of same pattern
|
|
173
|
+
|
|
174
|
+
**Verification:**
|
|
175
|
+
```bash
|
|
176
|
+
wc -w skills/path/SKILL.md
|
|
177
|
+
# getting-started workflows: aim for <150 each
|
|
178
|
+
# Other frequently-loaded: aim for <200 total
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Name by what you DO or core insight:**
|
|
182
|
+
- ✅ `condition-based-waiting` > `async-test-helpers`
|
|
183
|
+
- ✅ `using-skills` not `skill-usage`
|
|
184
|
+
- ✅ `flatten-with-flags` > `data-structure-refactoring`
|
|
185
|
+
- ✅ `root-cause-tracing` > `debugging-techniques`
|
|
186
|
+
|
|
187
|
+
**Gerunds (-ing) work well for processes:**
|
|
188
|
+
- `creating-skills`, `testing-skills`, `debugging-with-logs`
|
|
189
|
+
- Active, describes the action you're taking
|
|
190
|
+
|
|
191
|
+
### 5. Cross-Referencing Other Skills
|
|
192
|
+
|
|
193
|
+
**When writing documentation that references other skills:**
|
|
194
|
+
|
|
195
|
+
Use skill name only, with explicit requirement markers:
|
|
196
|
+
- ✅ Good: `**REQUIRED SUB-SKILL:** Use superpowers:test-driven-development`
|
|
197
|
+
- ✅ Good: `**REQUIRED BACKGROUND:** You MUST understand superpowers:systematic-debugging`
|
|
198
|
+
- ❌ Bad: `See skills/testing/test-driven-development` (unclear if required)
|
|
199
|
+
- ❌ Bad: `@skills/testing/test-driven-development/SKILL.md` (force-loads, burns context)
|
|
200
|
+
|
|
201
|
+
**Why no @ links:** `@` syntax force-loads files immediately, consuming 200k+ context before you need them.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Flowcharts in Skills
|
|
2
|
+
|
|
3
|
+
Part of superpowers:writing-skills.
|
|
4
|
+
|
|
5
|
+
## Flowchart Usage
|
|
6
|
+
|
|
7
|
+
```dot
|
|
8
|
+
digraph when_flowchart {
|
|
9
|
+
"Need to show information?" [shape=diamond];
|
|
10
|
+
"Decision where I might go wrong?" [shape=diamond];
|
|
11
|
+
"Use markdown" [shape=box];
|
|
12
|
+
"Small inline flowchart" [shape=box];
|
|
13
|
+
|
|
14
|
+
"Need to show information?" -> "Decision where I might go wrong?" [label="yes"];
|
|
15
|
+
"Decision where I might go wrong?" -> "Small inline flowchart" [label="yes"];
|
|
16
|
+
"Decision where I might go wrong?" -> "Use markdown" [label="no"];
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Use flowcharts ONLY for:**
|
|
21
|
+
- Non-obvious decision points
|
|
22
|
+
- Process loops where you might stop too early
|
|
23
|
+
- "When to use A vs B" decisions
|
|
24
|
+
|
|
25
|
+
**Never use flowcharts for:**
|
|
26
|
+
- Reference material → Tables, lists
|
|
27
|
+
- Code examples → Markdown blocks
|
|
28
|
+
- Linear instructions → Numbered lists
|
|
29
|
+
- Labels without semantic meaning (step1, helper2)
|
|
30
|
+
|
|
31
|
+
See `graphviz-conventions.dot` in this directory for graphviz style rules.
|
|
32
|
+
|
|
33
|
+
**Visualizing for your human partner:** Use `render-graphs.js` in the writing-skills directory to render a skill's flowcharts to SVG, run from there:
|
|
34
|
+
```bash
|
|
35
|
+
node ./render-graphs.js ../some-skill # Each diagram separately
|
|
36
|
+
node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG
|
|
37
|
+
```
|