$npx -y skills add armelhbobdad/bmad-module-skill-forge --skill skf-create-skillCompile a skill from a brief. Supports --batch for multiple briefs. Use when the user requests to "create a skill" or "compile a skill.
| 1 | # Create Skill |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Compiles a verified agent skill from a skill-brief.yaml and source code, producing an agentskills.io-compliant SKILL.md with provenance map, evidence report, and progressive disclosure references. The workflow is mostly autonomous with three interaction points — after ecosystem check (if match found), after source extraction (to confirm findings), and after content quality review (when tessl produces suggestions). Steps adapt behavior based on forge tier (Quick/Forge/Forge+/Deep). Zero hallucination tolerance: every instruction in the output must trace to source code with a confidence tier citation. A single run is not resumable — if it is interrupted mid-compile, re-run from the brief (only `--batch` checkpoints progress across briefs). |
| 6 | |
| 7 | ## Conventions |
| 8 | |
| 9 | - Bare paths (e.g. `references/<name>.md`) resolve from the skill root. |
| 10 | - `references/` holds prompt content carved out of SKILL.md (workflow stages chained via frontmatter `nextStepFile`, plus static reference docs); `scripts/` and `assets/` hold deterministic helpers and templates. |
| 11 | - `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives, if present). |
| 12 | - `{project-root}`-prefixed paths resolve from the project working directory. |
| 13 | - `{skill-name}` resolves to the skill directory's basename. |
| 14 | |
| 15 | ## Role |
| 16 | |
| 17 | You are operating in Ferris Architect mode — a skill compilation engine performing structural extraction and assembly. Apply zero hallucination tolerance: uncitable content is excluded, not guessed. |
| 18 | |
| 19 | ## Workflow Rules |
| 20 | |
| 21 | These rules apply to every step in this workflow: |
| 22 | |
| 23 | - Never include content in SKILL.md that cannot be cited to source code |
| 24 | - Only load one step file at a time — never preload future steps |
| 25 | - Always communicate in `{communication_language}` |
| 26 | - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action, logging each auto-decision to the in-context `headless_decisions[]` buffer AND appending it as a JSON line to the on-disk auto-decision sink (established at step 1 §3) the moment it lands, so the audit trail survives context compaction before step 5 first writes the evidence report |
| 27 | |
| 28 | ## Stages |
| 29 | |
| 30 | | # | Step | File | Auto-proceed | |
| 31 | |---|------|------|--------------| |
| 32 | | 1 | Load Brief | references/load-brief.md | Yes | |
| 33 | | 2 | Ecosystem Check | references/ecosystem-check.md | Conditional | |
| 34 | | 2b | CCC Discover | references/sub/ccc-discover.md | Yes | |
| 35 | | 3 | Extract | references/extract.md | No (confirm) | |
| 36 | | 3b | Fetch Temporal | references/sub/fetch-temporal.md | Yes | |
| 37 | | 3c | Fetch Docs | references/sub/fetch-docs.md | Yes | |
| 38 | | 3d | Component Extraction | references/component-extraction.md | Conditional | |
| 39 | | 4 | Enrich | references/enrich.md | Yes | |
| 40 | | 5 | Compile | references/compile.md | Yes | |
| 41 | | 5a | Doc Sources | references/step-doc-sources.md | Yes | |
| 42 | | 5b | Auto-Shard | references/step-auto-shard.md | Yes | |
| 43 | | 5c | Doc-Rot | references/step-doc-rot.md | Yes | |
| 44 | | 6 | Validate | references/validate.md | Conditional | |
| 45 | | 7 | Generate Artifacts | references/generate-artifacts.md | Yes | |
| 46 | | 8 | Report | references/report.md | Yes | |
| 47 | | 9 | Workflow Health Check | references/health-check.md | Yes | |
| 48 | |
| 49 | *Sub-steps under `references/sub/` are conditional branches (CCC discovery, temporal/doc enrichment) kept out of the top-level step count so main-line steps 1–9 drive the workflow. Step 3d (Component Extraction) stays top-level as an alternative main step that replaces the standard extraction path when `scope.type: "component-library"`.* |
| 50 | |
| 51 | ## Invocation Contract |
| 52 | |
| 53 | | Aspect | Detail | |
| 54 | |--------|--------| |
| 55 | | **Inputs** | brief_path (path to skill-brief.yaml) [required], --batch [optional] | |
| 56 | | **Gates** | step 2: Choice Gate [P] (if match) | step 3: Review Gate [C] | step 6: Content-Quality Gate [C] (if novel tessl suggestions) | |
| 57 | | **Outputs** | SKILL.md, context-snippet.md, metadata.json, provenance-map.json, evidence-report.md, references/ | |
| 58 | | **Headless** | All gates auto-resolve with default action when `{headless_mode}` is true | |
| 59 | |
| 60 | ## On Activation |
| 61 | |
| 62 | 1. Load config from `{project-root}/_bmad/skf/config.yaml` and resolve: |
| 63 | - `output_folder`, `user_name`, `communication_language`, `document_output_language`, `sidecar_path`, `skills_output_folder`, `forge_data_folder` |
| 64 | |
| 65 | 2. **Resolve `{headless_mode}`**: true if `--headless` or `-H` was passed as an argument, or if `headless_mode: true` in preferences.yaml. Default: false. |
| 66 | |
| 67 | 3. **Resolve workflow customization.** Run: |
| 68 | |
| 69 | ```bash |
| 70 | python3 {project-root}/_bmad/scripts/resolve_customization.py \ |
| 71 | --skill {skill-root} --key workflow |
| 72 | ``` |
| 73 | |
| 74 | The script merges the three customization layers per `bmad-customize`'s structural merge rules (scalars override, arrays append): `{skill-root}/customize.toml` (bundled defaults), `_bmad/custom/skf-create-skill.t |