BMad-specific knowledge for skills the builder produces. Loaded at build time so the author works to the bar from the start, and at analysis time so the lenses verify against the same bar. The universal bar — the destination shape, the tests, the two-version comparison, the reader, the habit — lives in references/prompt-quality-canon.md; load it alongside this file, apply it, and never restate it. What follows is only what the bare model would not know: BMad conventions, wiring, and the patterns and failure shapes BMad has paid for.
{module-code}-{name} (e.g. bmm-create-prd, cis-brainstorm){name}bmad- prefix is reserved for official BMad creationsTwo parts: [5-8 word summary]. [Use when user says 'specific phrase' or 'specific phrase'.]
Quote the trigger phrases. Default to conservative (explicit) triggering, since most BMad skills are explicitly invoked. Organic triggering is reserved for skills that should activate on context (e.g. "Trigger when code imports the anthropic SDK").
Bad: Helps with PRDs and product requirements. It is too vague and will hijack unrelated conversations.
All file references in a skill use bare paths from the skill root. The canonical Resolution rules block, stamped into any SKILL.md that references multiple internal files:
## Resolution rules
- Bare paths and `{skill-root}` (e.g. `references/press-release.md`) resolve from this skill's installed directory.
- `{project-root}` → the project working directory.
- `{skill-name}` → the skill directory's basename.
Additional rules:
{project-root} in their resolved values; never double-prefix.references/ is for prompt content carved out of SKILL.md. assets/ is for templates and other static content the workflow loads. scripts/ is for deterministic code. Never put workflow content directly at skill root.customize.toml is the only customization mechanism — no installer questions, no module.yaml authoring, no boolean-toggle config, no settings concept inside a built skill. The full spec (the ask, universal defaults, offered-when-relevant points, three-layer merge rules, forbidden mechanisms) lives in references/customize-toml-guide.md. The wiring rule worth carrying everywhere: SKILL.md must read declared values as {workflow.<name>} — a hardcoded path beside a declared scalar silently no-ops the override.
Scripts handle plumbing (fetch, parse, validate, count, transform); prompts handle judgment (interpret, classify, decide). Crossing the boundary in either direction is a defect: a script using regex to decide what content means leaks intelligence into the script, and a prompt counting items or validating structure leaks determinism into the LLM. The determinism test, the signal-verb scan, and the pre-pass JSON pattern live in references/script-opportunities-reference.md.
Default: write the entire workflow as named sections in SKILL.md (## Discovery, ## Constraints, ## Finalize, and so on). A multi-stage coaching workflow can live in one SKILL.md. Carving follows the canon's test: carve what only some branches need or what pushes SKILL.md past its token tier, keep a routing map in SKILL.md, and leave inline what is too small to repay the indirection. When you carve:
references/press-release.md, references/customer-faq.md, never 01-press-release.md; the carve-out is a section, not a "step," and SKILL.md routes by name.{communication_language} (and {document_output_language} if it produces a doc).## On Exit sections, because they would never run.When a skill supports headless invocation, the memlog absorbs every assumption made without the user: intent inference, proposed names, customization defaults, conflict resolutions, lint-fix calls, anything the user would have weighed in on interactively. Append these as typed assumption and decision entries through {project-root}/_bmad/scripts/memlog.py as they happen. The JSON return is the smallest set of paths the caller needs (typically skill plus the memlog path, plus the report path for analysis flows); the memlog carries the reasoning. status is complete or blocked; on blocked, include a one-line reason and still return the memlog path so the caller can read the detail. Without this discipline, headless silently buries its calls and the audit trail breaks on the next session.
Length is measured in tiktoken tokens through scripts/count_tokens.py (cl100k_base, with a chars/4 fallback when tiktoken is unavailable). There is no line-count gate anywhere. The canon's tests still apply to every line; budgets are a guardrail, not the goal.
SKILL.md is tiered against two org-configurable thresholds, {workflow.skill_md_token_desired} (default 2000) and {workflow.skill_md_token_budget} (default 3000). The hard tier sits deliberately under the Agent Skills spec's 5,000-token recommendation, and the budget is a drift guardrail, not the leanness bar — the canon's tests still cut a ceremonial line in a 900-token file:
references/ or assets/ and leave a one-line pointer, rather than compressing prose into something the model has to decode. Repeat until under {workflow.skill_md_token_budget}.| File kind | Token budget |
|---|---|
| SKILL.md | {workflow.skill_md_token_desired} aim / {workflow.skill_md_token_budget} hard |
| Multi-branch reference | ~4500 |
| Single-purpose reference | ~9000 |
When any reference file runs past its budget, lift a section the same way.
Institutional names for patterns the LLM won't generate by default:
references/working-state-patterns.md.form-validation-rules.md, not doc2.md).{workflow.<name>}.[workflow] → The workflow wants to be an agent. Fix: point the author at agent-builder and remove it from the workflow surface.references/working-state-patterns.md).## Workspace section pays the pattern's cost without its value. Fix: thread it through the intents at the points that matter; bmad-product-brief is the model.