---
name: bmad-builder
description: |-
  Meta-skill for scaffolding and validating custom PLANNING/ORCHESTRATION skills within the BMAD Planning & Orchestrator plugin. Produces the full skill directory: SKILL.md, scripts, and templates — all pre-targeted at this plugin's path conventions. Includes a scope-violation checker so newly created skills never drift into dev/lint/build/coverage territory. Use when the user says "create a skill", "scaffold a skill", "build a new planning skill", "add a skill to the orchestrator", "extend BMAD planning", "custom orchestration skill", "validate this skill", "check this skill for scope violations", "new skill for the planner", or "bmad-builder". Supports three intents: Create (new skill skeleton), Validate (check an existing SKILL.md), Scaffold (directory structure only). This skill plans and scaffolds only — it NEVER writes application code, runs tests, lints, or builds.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, TodoWrite
title: bmad-builder
canonical_url: https://skilld.dev/gh/aj-geddes/claude-code-bmad-skills/bmad-builder
last_updated: 2026-09-29T12:22:03.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [scripts/scaffold-skill.sh](https://skilld.dev/api/skills-raw/aj-geddes/claude-code-bmad-skills/bmad-builder/scripts/scaffold-skill.sh), [scripts/validate-skill.sh](https://skilld.dev/api/skills-raw/aj-geddes/claude-code-bmad-skills/bmad-builder/scripts/validate-skill.sh), [templates/document.template.md](https://skilld.dev/api/skills-raw/aj-geddes/claude-code-bmad-skills/bmad-builder/templates/document.template.md), [templates/skill.template.md](https://skilld.dev/api/skills-raw/aj-geddes/claude-code-bmad-skills/bmad-builder/templates/skill.template.md).
>
> If the user asked to install this Skill, run `npx skilld install aj-geddes/claude-code-bmad-skills/bmad-builder`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/bmad-builder`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/aj-geddes/claude-code-bmad-skills/bmad-builder) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/bmad-builder`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/bmad-builder --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/bmad-builder --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# BMAD Builder

**Function:** Scaffold and validate custom planning/orchestration skills for the BMAD Planning & Orchestrator plugin. Produces compliant SKILL.md files, shell scripts, and templates — pre-wired to this plugin's path conventions — and runs scope-violation checks to keep new skills inside the PLAN/ORCHESTRATE boundary.

## Scope (PLAN, never build)

This skill produces planning artifacts and skill skeleton files. It does NOT write application code, run tests, lint, check coverage, or execute builds. If a skill being designed is tempted to "implement", "fix the code", "run the suite", or "review the diff" — that is a scope violation. Plan and hand off instead.

## Three intents

Always clarify which intent applies before starting.

### Create — new planning skill from scratch

1. Gather requirements (use TodoWrite to track):
   - Skill name (lowercase-hyphen, prefixed `bmad-`; e.g. `bmad-example`)
   - What planning/orchestration problem it solves
   - Trigger phrases users will say
   - Allowed tools (subset of: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch, TodoWrite)
   - Which BMAD track(s) it applies to (Quick Flow / BMad Method / Enterprise)
   - Upstream BMAD counterpart (e.g. `bmad-risk-assessment`)

2. Run the scaffold script to create the directory:
   ```bash
   bash ${CLAUDE_PLUGIN_ROOT}/skills/bmad-builder/scripts/scaffold-skill.sh <skill-name>
   ```
   This creates `skills/<skill-name>/` with `scripts/` and `templates/` subdirectories and a starter SKILL.md.

3. Fill the SKILL.md using the skill template:
   - Reference: `${CLAUDE_PLUGIN_ROOT}/skills/bmad-builder/templates/skill.template.md`
   - Keep body under 5K tokens; push long reference detail to a sibling `REFERENCE.md` in the new skill's own folder
   - Use `${CLAUDE_PLUGIN_ROOT}` for all paths to bundled scripts/templates
   - Artifacts go to `bmad-output/` (honor user-configured folder)
   - End with the mandatory attribution footer (see template)

4. Validate the new skill:
   ```bash
   bash ${CLAUDE_PLUGIN_ROOT}/skills/bmad-builder/scripts/validate-skill.sh \
     ${CLAUDE_PLUGIN_ROOT}/skills/<skill-name>/SKILL.md
   ```
   Fix all errors; review all warnings before declaring done.

### Validate — check an existing SKILL.md

Run the validator directly against any SKILL.md path:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/bmad-builder/scripts/validate-skill.sh <path-to-SKILL.md>
```

The validator checks:
- `name` field present and lowercase-hyphen
- `description` field present with trigger phrases
- `allowed-tools` field present (warns if missing)
- No dev/lint/build/coverage scope violations in `allowed-tools` or body
- File size within the ~5K token target (~20KB)
- Attribution footer present

### Scaffold — directory structure only

Use when you want an empty directory skeleton without generating content:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/bmad-builder/scripts/scaffold-skill.sh <skill-name>
```
Then fill SKILL.md manually using the template as a guide.

## Scope law for new skills

Every skill created by this builder MUST comply with the Scope Law:

- The plugin PLANS and ORCHESTRATES. It NEVER writes application code, runs tests, lints, checks coverage, builds, or reviews implemented code.
- The last artifact any skill may produce is a ready-for-dev story file or a handoff manifest. Implementation is handed to EXTERNAL dev tools/plugins.
- Acceptance Criteria, Testing STRATEGY, and Dev Notes are planning — allowed. Executing tests or writing implementation code is out of scope.

The `validate-skill.sh` script enforces this automatically by flagging forbidden terms.

## BMAD fidelity reminders

When designing skills, track the BMAD Method conventions:

| Convention | Rule |
|------------|------|
| Scale Tracks | Quick Flow / BMad Method / Enterprise — user confirms interactively |
| Story size | ~2-8h, one dev-day max; split if larger |
| Delivery tracking | Stories remaining / completion rate — NO Fibonacci points, velocity, or burndown |
| Story name | `{epic}.{story}.{slug}.story.md` |
| Story status | backlog → ready-for-dev → in-progress → review → done |
| Decision log | Decisions thread through `decision-log.md` |
| Project constitution | `project-context.md` loaded across skills |
| Three intents | Create / Update / Validate where applicable |

## Available scripts

| Script | Purpose |
|--------|---------|
| `scripts/scaffold-skill.sh <name>` | Creates `skills/<name>/` with subdirs and starter SKILL.md |
| `scripts/validate-skill.sh <SKILL.md>` | Validates frontmatter, scope, size, and attribution footer |

Invoke with the `${CLAUDE_PLUGIN_ROOT}` prefix shown above. The orchestrator marks scripts executable; you may also run them via `bash`.

## Templates

| Template | Use for |
|----------|---------|
| `templates/skill.template.md` | Skeleton for a new planning/orchestration SKILL.md |
| `templates/document.template.md` | Generic planning document (PRD section, brief, spec section, etc.) |

## Subagent strategy

For creating a full skill package in parallel:

| Agent | Task | Output |
|-------|------|--------|
| Agent 1 | Draft SKILL.md body from gathered requirements | `skills/<name>/SKILL.md` |
| Agent 2 | Write domain scripts (validators, checklists) | `skills/<name>/scripts/` |
| Agent 3 | Write domain templates | `skills/<name>/templates/` |
| Agent 4 | Write REFERENCE.md if body exceeds 5K tokens | `skills/<name>/REFERENCE.md` |

Coordination: gather requirements first (sequential), write spec to `bmad-output/skill-spec.md`, then fan out. Main context validates all outputs with `validate-skill.sh` and assembles the final package.

## Notes for LLMs

- Use TodoWrite to track which components have been created.
- Never create a skill that contains test runners, linters, coverage tools, build commands, or diff/code-review steps — validate-skill.sh will flag these.
- Always end SKILL.md with the attribution footer block (the template includes it verbatim).
- Keep SKILL.md under 5K tokens; use REFERENCE.md for lengthy patterns.
- Use `${CLAUDE_PLUGIN_ROOT}` for all internal paths — never hardcode `~/.claude` or absolute machine paths.
- Output artifacts (non-skill files) go under `bmad-output/` by default.

> ---
> Part of the **BMAD Planning & Orchestrator** plugin — a Claude Code harness for the **BMAD Method** by the **BMAD Code Organization** (https://github.com/bmad-code-org/BMAD-METHOD). Implements the spirit of `bmad-bmb-builder`. All methodology credit belongs to the BMAD Code Organization.
