Triggers: description as activation contract
The description is the only part of your SKILL.md the agent reads on every turn. It is the activation contract. If the description does not name a trigger, the skill never fires for that trigger. This page covers the discipline of writing a description that triggers correctly, contrasts the two dominant description shapes in the wild, and gives you a pressure-test loop to validate your own descriptions.The Layer 2 rule (superpowers convention)
Source:LANDSCAPE 1.2; obra/superpowers writing-skills/SKILL.md lines 140-198.
Verbatim from writing-skills/SKILL.md:152:
Description should ONLY describe triggering conditions. Do NOT summarize the skill’s process or workflow in the description. Testing revealed that when a description summarizes the skill’s workflow, Claude may follow the description instead of reading the full skill content.The reasoning is empirical. Superpowers measured cases where descriptions summarized the body and the agent then followed the (summarized) description, skipping the body’s full discipline. A description that says “executes plan with code review between tasks” caused the agent to do ONE review even though the body’s flowchart specified TWO. The summary leaked the wrong contract. The superpowers-canonical shape:
Use when [trigger 1]; or when [trigger 2]; or when [trigger 3]. SKIP when [anti-trigger 1]; [anti-trigger 2]. Do NOT skip based on [forbidden rationalization].This is the “use when…” enumerative format. It is convention, not specification (per
REVIEWER B3); the spec only requires that the description “describes what the skill does and when to use it.” The convention is a strong default but not the only valid shape.
The contrasting shape: Anthropic’s PDF skill
Source:REVIEWER “Failed-URL re-fetches”; https://raw.githubusercontent.com/anthropics/skills/main/skills/pdf/SKILL.md.
Anthropic’s skills/pdf (NOT document-skills/pdf; that path does not exist; the analyzer’s earlier reports had it wrong, the reviewer corrected to skills/pdf) is the canonical “long enumerative trigger inventory” shape. Its description is approximately:
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs.This is a comma-separated trigger inventory. No “Use when…” enumeration; no SKIP list; no anti-rationalization clause. The description IS the trigger map, expressed as natural prose. Both shapes work. Both are spec-compliant. The choice is convention. This repo presents both shapes without mandating one (per
LANDSCAPE B3 / REVIEWER B3).
The trade-off:
- Superpowers “Use when…” shape. More explicit; easier to scan; SKIP and anti-rationalization clauses help the agent NOT trigger when it should not. Cost: longer; harder to fit under the 1,024-char spec cap when triggers are many.
- Anthropic enumerative shape. More compact; flows as natural prose; easier for non-spec-aware authors to write. Cost: no anti-trigger clauses; the agent may over-fire when an adjacent topic comes up.
Karpathy-wiki’s description
Karpathy-wiki uses the superpowers shape. Lines 3-12 ofkarpathy-wiki/skills/karpathy-wiki/SKILL.md:
- Eight event-shaped triggers (research agent returns a file, new factual info, etc.).
- Three question-shaped triggers (“what do we know about X”).
- Five SKIP conditions.
- Anti-rationalization clause naming three specific forbidden rationalizations.
- ~750 characters total, under the 1,024 spec cap and the 1,536 Claude Code listing cap.
The description-pressure-test loop
Source:REVIEWER M2.
Writing a description without testing it is shipping un-validated code. The loop:
- Open a fresh Claude session (no prior context).
- Type the kind of thing your skill should fire on. Observe whether it activates.
- Open a fresh Claude session.
- Type something close-but-irrelevant. Observe whether the skill over-fires.
- Iterate the description. Add specific user-phrase keywords if step 2 misses; tighten triggers if step 4 over-fires.
paths: glob patterns, additionally test that the skill does NOT fire outside the path scope. A skill with paths: ["**/*.md"] should not load when the agent is editing .py files; verify in a fresh session.
Common description failure modes
- Workflow summary instead of triggers. “Use when executing plans; performs code review between tasks.” The agent may follow the description and skip the body. Replace with triggers: “Use when you have a written implementation plan to execute.”
- Single-keyword trigger. “Use when working with files.” Matches every conversation; over-fires constantly. Replace with specific keywords.
- Triggers in the wrong column. Action verbs (“performs,” “executes,” “creates”) are workflow words, not trigger words. Trigger words are observation words (“the user types X,” “Y just happened,” “Z was just observed”).
- No SKIP clause when the domain is ambiguous. A skill that triggers on “what do we know about X” should explicitly NOT trigger on “what does X mean in general” (the second is a definition request, not a wiki query).
- Over-broad anti-trigger. “DO NOT trigger on routine file edits” is fine; “DO NOT trigger if the user is busy” is meaningless. Anti-triggers must be specific.
docs/10-anti-patterns.md for the catalog of failure modes; docs/06-testing/unit-tests.md for the harness-side validation.
Sources
LANDSCAPE1.2 (superpowers CSO; the description-as-trigger discipline, writing-skills lines 140-198).LANDSCAPE3.3 (description format conventions across the ecosystem).REVIEWERM1 (skill discoverability mechanics).REVIEWERM2 (the description-pressure-test loop).REVIEWER“Failed-URL re-fetches” (the path correction:skills/pdfnotdocument-skills/pdf; the PDF skill’s enumerative trigger inventory shape).REVIEWERB3 (Claude Code-specific patterns claimed as harness-neutral; the “use when…” format is convention, not spec rule).
docs/02-mental-model.md (when a skill is the right primitive at all), docs/06-testing/unit-tests.md (harness-side validation including pressure scenarios).