Skill Authoring Best Practices
Practical guidance for writing skills that work reliably and adapt gracefully. These patterns apply to agents, workflows, and utilities alike.
Core Principle: Informed Autonomy
Section titled âCore Principle: Informed AutonomyâGive the executing agent enough context to make good judgment calls â not just enough to follow steps. The test for every piece of content: âWould the agent make better decisions with this context?â If yes, keep it. If it is genuinely redundant, cut it.
Simple utilities need minimal context â input/output is self-explanatory. Interactive workflows need domain understanding, user perspective, and rationale for non-obvious choices. When in doubt, explain why â an agent that understands the mission improvises better than one following blind steps.
Freedom Levels
Section titled âFreedom LevelsâMatch specificity to task fragility.
| Freedom | When to Use | Example |
|---|---|---|
| High (text instructions) | Multiple valid approaches, context-dependent | âAnalyze structure, check for issues, suggest improvementsâ |
| Medium (pseudocode/templates) | Preferred pattern exists, some variation OK | def generate_report(data, format="markdown"): |
| Low (exact scripts) | Fragile operations, consistency critical | python scripts/migrate.py --verify --backup (do not modify) |
Analogy: Narrow bridge with cliffs = low freedom. Open field = high freedom.
Quality Dimensions
Section titled âQuality DimensionsâSix dimensions to keep in mind during the build phase. The quality scanners check these automatically during optimization.
| Dimension | What It Means |
|---|---|
| Informed Autonomy | Overview establishes domain framing, theory of mind, and design rationale â enough for judgment calls |
| Intelligence Placement | Scripts handle plumbing (fetch, transform, validate). Prompts handle judgment (interpret, classify, decide). If a script contains an if that decides what content means, intelligence has leaked |
| Progressive Disclosure | SKILL.md stays focused; stage instructions go in prompts/, reference data in resources/ |
| Description Format | Two parts: [5-8 word summary]. [Use when user says 'X' or 'Y'.] â default to conservative triggering |
| Path Construction | Never use {skill-root}. Only use {project-root} for _bmad paths. Config variables used directly â they already contain {project-root} |
| Token Efficiency | Remove genuine waste (repetition, defensive padding). Preserve context that enables judgment (domain framing, rationale) |
Common Patterns
Section titled âCommon PatternsâSoft Gate Elicitation
Section titled âSoft Gate ElicitationâFor guided workflows, use âanything else?â soft gates at natural transition points instead of hard menus.
Present what you've captured so far, then:"Anything else you'd like to add, or shall we move on?"Users almost always remember one more thing when given a graceful exit ramp rather than a hard stop. This consistently produces richer artifacts than rigid section-by-section questioning. Use at every natural transition in collaborative discovery workflows. Skip in autonomous/headless execution.
Intent-Before-Ingestion
Section titled âIntent-Before-IngestionâNever scan artifacts or project context until you understand WHY the user is here. Without knowing intent, you cannot judge what is relevant in a 100-page document.
1. Greet and understand intent2. Accept whatever inputs the user offers3. Ask if they have additional context4. ONLY THEN scan artifacts, scoped to relevanceCapture-Donât-Interrupt
Section titled âCapture-Donât-InterruptâWhen users provide information beyond the current scope â dropping requirements during a product brief, mentioning platforms during vision discovery â capture it silently for later use rather than redirecting them.
Users in creative flow share their best insights unprompted. Interrupting to say âweâll cover that laterâ kills momentum and may lose the insight entirely.
Dual-Output: Human Artifact + LLM Distillate
Section titled âDual-Output: Human Artifact + LLM DistillateâAny artifact-producing workflow can output two complementary documents: a polished human-facing artifact AND a token-conscious, structured distillate optimized for downstream LLM consumption.
| Output | Purpose |
|---|---|
| Primary | Human-facing document â concise, well-structured |
| Distillate | Dense, structured summary for downstream LLM workflows â captures overflow, rejected ideas (so downstream does not re-propose them), detail bullets with enough context to stand alone |
The distillate bridges the gap between what belongs in the human document and what downstream workflows need. Always offered to the user, never forced.
Three-Mode Architecture
Section titled âThree-Mode ArchitectureâInteractive workflows can offer three execution modes matching different user contexts.
| Mode | Trigger | Behavior |
|---|---|---|
| Guided | Default | Section-by-section with soft gates; drafts from what it knows, questions what it doesnât |
| YOLO | --yolo or âjust draft itâ | Ingests everything, drafts complete artifact upfront, then walks user through refinement |
| Headless (Autonomous) | --headless / -H | Headless; takes inputs, produces artifact, no interaction |
Not every workflow needs all three â but considering them during design prevents painting yourself into a single interaction model.
Parallel Review Lenses
Section titled âParallel Review LensesâBefore finalizing any significant artifact, fan out multiple reviewers with different perspectives.
| Reviewer | Focus |
|---|---|
| Skeptic | What is missing? What assumptions are untested? |
| Opportunity Spotter | What adjacent value? What angles? |
| Contextual | LLM picks the best third lens for the domain (regulatory risk for healthtech, DX critic for devtools) |
Graceful degradation: if subagents are unavailable, the main agent does a single critical self-review pass.
Graceful Degradation
Section titled âGraceful DegradationâEvery subagent-dependent feature should have a fallback path. Skills run across different platforms, models, and configurations. A skill that hard-fails without subagents is fragile. A skill that gracefully falls back to sequential processing is robust everywhere.
Verifiable Intermediate Outputs
Section titled âVerifiable Intermediate OutputsâFor complex tasks: plan, validate, execute, verify.
- Analyze inputs
- Create
changes.jsonwith planned updates - Validate with script before executing
- Execute changes
- Verify output
Catches errors early, is machine-verifiable, and makes planning reversible.
Writing Guidelines
Section titled âWriting Guidelinesâ| Do | Avoid |
|---|---|
| Consistent terminology â one term per concept | Switching between âworkflowâ and âprocessâ for the same thing |
| Third person in descriptions â âProcesses filesâ | First person â âI help process filesâ |
Descriptive file names â form_validation_rules.md | Sequence names â doc2.md |
| Forward slashes in all paths | Backslashes or platform-specific paths |
| One level deep for references â SKILL.md â resource.md | Nested references â SKILL.md â A.md â B.md |
| Table of contents for files over 100 lines | Long files without navigation |
Anti-Patterns
Section titled âAnti-Patternsâ| Anti-Pattern | Fix |
|---|---|
| Too many options upfront | One default with escape hatch for edge cases |
| Deep reference nesting (AâBâC) | Keep references one level from SKILL.md |
| Inconsistent terminology | Choose one term per concept |
| Vague file names | Name by content, not sequence |
| Scripts that classify meaning via regex | Intelligence belongs in prompts, not scripts |
| Over-optimization that flattens personality | Preserve phrasing that captures the intended voice |
| Hard-failing when subagents are unavailable | Always include a sequential fallback path |