diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-10-19 21:56:20 -0700 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-10-19 21:56:20 -0700 |
| commit | 6ff820e510ff3cdcc675404d301611a064e201f9 (patch) | |
| tree | b03a6c0a8503a912ac3a62106c74aab395a1c226 | |
| parent | 908c4e036568f6d7e75e9cdf6ed20e4d6b506328 (diff) | |
writing-skills: move situational guidance to references/ so SKILL.md fits under the compaction cutfix/writing-skills-references
After a compaction, Claude Code re-attaches each invoked skill truncated to
20,000 characters (#2481). writing-skills was 26,623 bytes. Guidance it only
needs at particular moments now lives in references/, behind a pointer at
the moment that needs it:
- discovery.md: the SKILL.md template and all of Skill Discovery
Optimization (description, keywords, naming, token budgets,
cross-references). Read when writing or changing frontmatter, naming,
or size. The rule agents break most, that a description names
triggering conditions and never the workflow, stays in SKILL.md too.
- bulletproofing.md: closing loopholes, spirit vs letter, the
rationalization table and red flags. Read when the baseline failure is
a discipline failure, as Match the Form to the Failure already scopes it.
- flowcharts.md: when a flowchart earns its place, conventions, rendering.
SKILL.md is now 16,738 bytes. quick-evals/writing-skills/write-a-skill.py
(superpowers-evals) has each rep write a new skill from supplied baseline
results. Opus 5.5, 3 reps per scenario, v7.0.0 vs this change: every
written skill has a 'Use when' description with no workflow summary
(124-248 chars), and every discipline skill tables all five baseline
rationalizations and has a red-flags section, on both arms. On this change
every rep read the reference its scenario calls for (6/6).
Claude-Session: https://claude.ai/code/session_01EgKgPPzKtNA2okiCmqb11F
| -rw-r--r-- | skills/writing-skills/SKILL.md | 320 | ||||
| -rw-r--r-- | skills/writing-skills/references/bulletproofing.md | 80 | ||||
| -rw-r--r-- | skills/writing-skills/references/discovery.md | 201 | ||||
| -rw-r--r-- | skills/writing-skills/references/flowcharts.md | 37 |
4 files changed, 337 insertions, 301 deletions
diff --git a/skills/writing-skills/SKILL.md b/skills/writing-skills/SKILL.md index cbc9128..09d76b7 100644 --- a/skills/writing-skills/SKILL.md +++ b/skills/writing-skills/SKILL.md @@ -90,236 +90,23 @@ skills/ - Code patterns (< 50 lines) - Everything else -## SKILL.md Structure - -**Frontmatter (YAML):** -- Two required fields: `name` and `description` (see [agentskills.io/specification](https://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 - -```markdown ---- -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. - -```yaml -# ❌ 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** - -```yaml -# ❌ 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:** -```bash -# ❌ 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:** -```markdown -# ❌ 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:** -```markdown -# ❌ 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:** -```bash -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` +## Writing SKILL.md -**Gerunds (-ing) work well for processes:** -- `creating-skills`, `testing-skills`, `debugging-with-logs` -- Active, describes the action you're taking +A skill's `description` says only when to use it: triggering conditions and +symptoms, starting with "Use when...". It never summarizes the skill's +workflow, because an agent that reads a workflow summary follows it instead +of reading the skill. -### 5. Cross-Referencing Other Skills +When you write or change a skill's frontmatter, name or description, or +need to cut its size, read [references/discovery.md](references/discovery.md): +the SKILL.md template, description and keyword guidance, naming, token +budgets, and 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 - -```dot -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"]; -} -``` +## Flowcharts -**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 `references/graphviz-conventions.dot` for graphviz style rules. - -**Visualizing for your human partner:** Use `render-graphs.js` in this directory to render a skill's flowcharts to SVG: -```bash -node ./render-graphs.js ../some-skill # Each diagram separately -node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG -``` +When you add or change a flowchart in a skill, read +[references/flowcharts.md](references/flowcharts.md) first: when a flowchart +earns its place, the graphviz conventions, and how to render one. ## Code Examples @@ -464,7 +251,7 @@ Before writing guidance, classify the baseline failure. The form that bulletproo | 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...") | +| Skips/violates a rule under pressure (knows better, does it anyway) | Prohibition + rationalization table + red flags (see references/bulletproofing.md) | Soft guidance ("prefer...", "consider...") | | Complies, but output has the wrong shape (bloated prompt, buried verdict, restated spec) | Positive recipe or contract: state what the output IS — its parts, in 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 | @@ -475,81 +262,12 @@ Before writing guidance, classify the baseline failure. The form that bulletproo - **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 references/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. +## Bulletproofing Against Rationalization -**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: - -```markdown -| 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: - -```markdown -## 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: - -```yaml -description: use when implementing any feature or bugfix, before writing implementation code -``` +When the baseline failure is a discipline failure, read +[references/bulletproofing.md](references/bulletproofing.md) before you write +the guidance: closing loopholes, the spirit-vs-letter line, the +rationalization table, and the red-flags list. ## RED-GREEN-REFACTOR for Skills diff --git a/skills/writing-skills/references/bulletproofing.md b/skills/writing-skills/references/bulletproofing.md new file mode 100644 index 0000000..38e26fb --- /dev/null +++ b/skills/writing-skills/references/bulletproofing.md @@ -0,0 +1,80 @@ +# Bulletproofing Skills Against Rationalization + +Part of superpowers:writing-skills. Use it when the baseline failure is a +discipline failure: the agent knows the rule and skips it under pressure. + +## 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 in this directory 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: + +```markdown +| 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: + +```markdown +## 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: + +```yaml +description: use when implementing any feature or bugfix, before writing implementation code +``` diff --git a/skills/writing-skills/references/discovery.md b/skills/writing-skills/references/discovery.md new file mode 100644 index 0000000..fc3009d --- /dev/null +++ b/skills/writing-skills/references/discovery.md @@ -0,0 +1,201 @@ +# Writing SKILL.md for Discovery + +Part of superpowers:writing-skills: the SKILL.md template and how to name, +describe and size a skill so agents find it and read it. + +## SKILL.md Structure + +**Frontmatter (YAML):** +- Two required fields: `name` and `description` (see [agentskills.io/specification](https://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 Skill Discovery Optimization below for why) + - Keep under 500 characters if possible + +```markdown +--- +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. + +```yaml +# ❌ 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** + +```yaml +# ❌ 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:** +```bash +# ❌ 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:** +```markdown +# ❌ 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:** +```markdown +# ❌ 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:** +```bash +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. diff --git a/skills/writing-skills/references/flowcharts.md b/skills/writing-skills/references/flowcharts.md new file mode 100644 index 0000000..63f9bfa --- /dev/null +++ b/skills/writing-skills/references/flowcharts.md @@ -0,0 +1,37 @@ +# Flowcharts in Skills + +Part of superpowers:writing-skills. + +## Flowchart Usage + +```dot +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 the writing-skills directory to render a skill's flowcharts to SVG, run from there: +```bash +node ./render-graphs.js ../some-skill # Each diagram separately +node ./render-graphs.js ../some-skill --combine # All diagrams in one SVG +``` |
