skills/writing-skills/SKILL.md
Use when creating a new skill, editing an existing skill, or helping a user author a skill for this system. Covers structure, discoverability, quality, and discipline hardening.
npx skillsauth add maestria-co/ai-playbook writing-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill authorship mirrors test-driven development for process artifacts. Spot failure modes (agent missteps absent guidance), craft skills targeting those precise failures, then confirm agent conformance.
Foundation: Without observing agent failure absent the skill, required skill content remains unknown.
Create when:
Defer creation for:
.context/standards/)| Type | Characterization | Instances |
|----------|------------------|-----------|
| Technique | Structured methodology with explicit steps | systematic-debugging, initialize-repo |
| Discipline | Constraints preventing documented failure modes | testing-discipline, verification-checklist |
| Process | Workflow embedding decision junctures | task-retrospective, design-first |
| Format | Schema templates with organizational guidance | jira-story, asana-story |
skills/
skill-name/
SKILL.md # Core reference (required)
supporting-file.* # Conditional inclusion (heavyweight reference, reusable utilities)
Inline preservation: Principles, concepts, code snippets under 50 lines, examples. File extraction: Heavyweight reference (100+ lines), reusable scripts/templates.
---
name: skill-name-with-hyphens
description: Use when [exact triggering circumstances and indicators]
---
name: Letters, numerals, hyphens exclusively. Verb-initial gerunds excel (writing-skills, executing-plans).description: Third-person voice. Opens with "Use when..." Captures EXCLUSIVELY triggering circumstances — NEVER skill accomplishments or workflow.Rationale for excluding workflow from descriptions: Descriptions articulating "dispatches subagent per task with code review between tasks" risk agents executing that synopsis rather than reading complete skill. Workflow-encapsulating descriptions generate shortcuts circumventing genuine process. Articulate the PROBLEM or TRIGGER, never the SOLUTION.
# ❌ BAD: Workflow encapsulation — agent might execute this bypassing skill reading
description: Use for TDD - write test first, watch it fail, write minimal code, refactor
# ✅ GOOD: Triggering circumstances exclusively — agent must read skill for workflow
description: Use when writing tests, reviewing test quality, or deciding what to mock
# Skill Name
## Overview
Foundational principle in 1-2 sentences. What is this and why does it matter?
## When to Use
Bulleted enumeration of indicators and scenarios.
When NOT to use.
## The Process (or Core Pattern)
Actual technique, steps, or constraints.
Before/after juxtapositions for techniques.
## Common Mistakes
What fails and remediation approach.
## Rationalization Prevention (for discipline skills)
Matrix of agent excuses and counterarguments.
Not every skill demands every section. Calibrate to complexity — elementary technique skills might occupy 40 lines; discipline skills might occupy 150.
Step and Phase heading conventions — When skills articulate numbered workflows, prefix every step or phase heading with skill identifier:
## skill-name: Step 1: Accomplish Something ← appropriate
## skill-name: Phase 2: Confirm ← appropriate
## Step 1: Accomplish Something ← inappropriate — agent cannot identify owning skill
When skills incorporate nested workflows (stages encapsulating steps), embed both stage and step identifiers in every heading:
## skill-name: Stage 1: Preparation
### skill-name: Stage 1: Step 1: Accomplish X ← appropriate — complete path maintained
### skill-name: Stage 1: Step 2: Accomplish Y ← appropriate
## skill-name: Stage 2: Implementation
### skill-name: Stage 2: Step 1: Accomplish Z ← appropriate
### Stage 1: Step 1: Accomplish X ← inappropriate — skill identifier absent
### skill-name: Step 1: Accomplish X ← inappropriate — stage ambiguous
Complete path (skill-name: Stage N: Step N) guarantees agents encountering isolated headings can always ascertain which skill, which stage, and which step — without backward scrolling for context.
Prospective agents locate your skill via description matching. Enhance for discovery:
1. Description field richness — Embed indicators, error signatures, and triggering contexts.
2. Keyword density — Deploy words agents pursue: error messages, indicators ("flaky", "timeout", "race condition"), tool identifiers, synonyms.
3. Naming clarity — Verb-initial, active construction:
commit-discipline not git-commit-guidelinesdesign-first not pre-implementation-reviewcontext-maintenance not context-directory-updates4. Registration protocol — Post-creation, append to routing matrix in skills/GUIDE.md and skill catalog in README.md. For multi-skill sequence contributors, append to common workflow matrix in skills/using-skills/SKILL.md.
Skills activate on-demand into context. Every word imposes token expense.
Targets:
Optimization techniques:
Discipline skills (constraints preventing failure modes) require supplementary hardening because agents rationalize away constraints under duress.
Articulate the constraint and prohibit particular workarounds:
# ❌ Bad
Write code before test? Delete it.
# ✅ Fortified
Write code before test? Delete it. Restart.
**Zero exceptions:**
- Don't preserve it as "reference"
- Don't "modify" it while executing tests
- Delete means delete
Capture agent justifications and refute each:
| Red Flag | Action |
|----------|--------|
| "Too elementary to test" | Elementary code fails. Testing requires 30 seconds. |
| "I already tested it works" | Show the proof. |
| "I'll test next" | Next-tests prove nothing regarding intent. |
Self-audit catalog for detecting imminent constraint violations:
## Red Flags — HALT
- "This differs because..."
- "I'll return to this next"
- "It concerns the spirit, not the letter"
All these indicate: execute the workflow.
Single exemplary specimen dominates multiple mediocre ones. Choose the most germane language for the technique. Bypass implementing in 5 languages.
Quality specimens exhibit:
Bypass:
Before declaring skill complete:
skills/GUIDE.md routing matrixREADME.md skill catalogusing-skills common workflow matrix when skill contributes to multi-skill sequences| Antipattern | Avoidance Rationale | |-------------|---------------------| | Narrative exposition ("In session X, we discovered...") | Excessive specificity, non-reusable. Articulate the technique. | | Multi-language specimens | Mediocre quality, maintenance burden. Single exemplary specimen. | | Abstract labels (step1, helper2) | Labels should convey semantic content. | | Duplicating companion skill content | Cross-reference instead. Preserve tokens. | | "Obviously clear" without testing | Clear to you ≠ clear to agents. Test. |
development
Writes and runs a test suite for a piece of code, covering happy path, edge cases, error cases, and security cases. Use when: implementation is complete and needs test coverage, a bug needs a reproduction test and fix validation, or code needs coverage before a refactor. Do not use when: the code under test is not yet implemented, or the spec is still unclear.
development
Evidence-based verification process to run before marking any task complete. Use this skill every time you're about to report that work is done — for features, bug fixes, refactoring, or any code change. This catches the most common failure mode: declaring "done" without proof. If you're finishing up and about to tell the user the task is complete, run this checklist first.
development
Teaches agents how to discover, select, and invoke skills from the skill library. Use this skill whenever you're uncertain which skill applies to a task, when composing multiple skills for complex work, or when you need to understand what skills are available. This is your go-to when facing an ambiguous task and need to figure out the right approach before diving into implementation.
development
Safely upgrade a language version, framework, or major dependency. Use when someone says "upgrade Node to v22", "migrate to React 19", "we need to get off this old version", "update our framework", or "how do we upgrade X?". Also triggers when a security advisory requires a version bump. Scope is infrastructure only: manifests, lock files, build configuration, and source changes required by the new version. Content drift discovered during an upgrade (outdated docs, stale patterns) is out of scope — delegate those to `context-maintenance`. Prevents the most common upgrade pitfalls: skipping migration guides, multi-major jumps, and losing rollback options.