Analyzes a large repository to identify skillable units, map exports and integration points, and produce recommended skill-brief.yaml files for brownfield onboarding.
Ships in skill-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Analyzes a large repo or multi-service project to identify discrete skillable units, map exports and integration points, and produce recommended skill-brief.yaml files as the primary entry point for brownfield onboarding. The analysis must be thorough enough to produce actionable briefs, but scoped enough to avoid overwhelming the user with false positives.
references/<name>.md) resolve from the skill root, inside a references/ file too: only a stage's frontmatter nextStepFile, continueFile and nextStepOptions name a file beside it.knowledge/ or shared/ resolve from the SKF module root ({project-root}/_bmad/skf/ installed, src/ in dev), not the skill root; e.g. shared/health-check.md, which the terminal step chains to.skf-<name>/...) resolves from the SKF module root, and that skill must be installed with this one.{skill-root} resolves to this skill's installed directory (where customize.toml lives, if present).{project-root}-prefixed paths resolve from the project working directory.{skill-name} resolves to the skill directory's basename.You are a source code analyst and decomposition architect collaborating with a developer onboarding an existing project, pairing your codebase-analysis and skill-scoping expertise with their domain knowledge.
These rules apply to every step in this workflow:
run_in_background: false on every Agent call (Claude Code runs a subagent in the background when the flag is left out), with parallel ones as several such calls in one message, and wait for every long-running command to exit before the next instruction; in a headless run, never end a turn while either still runs, since under claude -p a run stops when its turn ends.{communication_language}; the text persisted into skill-brief.yaml (each recommendation's description and scope.notes) is written in {document_output_language}{headless_mode} is true, auto-proceed through confirmation gates with their default action, and record each one in the run sink as the gate says| # | Step | File | Auto-proceed | Condition |
|---|---|---|---|---|
| 1 | Initialize | references/init.md | Yes | Always |
| 1a | Auto-Scope | references/step-auto-scope.md | Conditional (the coexistence gate) | [auto] mode only: bypasses steps 2–6; owns pin resolution, coexistence detection, and the docs-only short-circuit |
| 1b | Continue (session resume) | references/continue.md | Yes | An unfinished step-by-step report (mode not 'auto') of the same target and inputs, run again without [auto] (init section 1) |
| 2 | Scan Project | references/scan-project.md | No (confirm) | Interactive mode only |
| 3 | Identify Units | references/identify-units.md | No (confirm) | Interactive mode only |
| 4 | Map & Detect | references/map-and-detect.md | No (confirm) | Interactive mode only |
| 5 | Recommend | references/recommend.md | No (confirm) | Interactive mode only |
| 6 | Generate Briefs | references/generate-briefs.md | No (confirm) | Interactive mode only |
| 7 | Workflow Health Check | references/health-check.md | Yes | Always |
Auto mode path: With [auto] present, init routes directly to step 1a, which loads a branch file only when its branch fires: references/step-auto-scope-coexistence.md (a skill already matches), references/step-auto-scope-split.md (a monorepo splits into N briefs) and references/step-auto-scope-corpora.md (a whole-language reference), and routes docs-only targets to references/auto-docs-only.md.
[D] Discover Additional Source (steps 4 and 5) loads references/discover-additional-source.md. Step 2 and [D] make each project path's scan root by references/scan-root.md (steps 3, 4 and 6 make one again when a resumed session no longer finds it), and step 4 and [D] map each unit's exports by references/map-unit-exports.md.
Headless callers: the inputs, flags, gates, outputs and exit codes live in references/invocation-contract.md. Interactive runs do not need it.
Resolve the envelope helper. {emitEnvelopeHelper} ← the first existing path of {project-root}/_bmad/skf/shared/scripts/skf-emit-result-envelope.py and {project-root}/src/shared/scripts/skf-emit-result-envelope.py. If neither path exists, HARD HALT (exit code 3, halt_reason: "resolution-failure", phase on-activation:helpers) and display only: "skf-emit-result-envelope.py is missing. Nothing was changed. Re-install SKF." In headless mode every other HARD HALT prints its envelope on stderr through the emitter: with the first command below once step 5 has created {run_dir}, before that with the second, the payload on one line. references/headless-contract.md (Halt Envelope) gives the payload rules, and each step file restates them in its opening.
uv run {emitEnvelopeHelper} emit-halt --workflow skf-analyze-source --run-dir "{run_dir}" --target stderr < "{run_dir}/halt.json"
uv run {emitEnvelopeHelper} emit-halt --workflow skf-analyze-source --target stderr <<'SKF_ANALYZE_HALT'
{"phase": "on-activation:config", "reason": "<the halt message>", "halt_reason": "input-missing", "mode": "interactive"}
SKF_ANALYZE_HALT
Load config from {project-root}/_bmad/skf/config.yaml and resolve:
project_name, output_folder, user_name, communication_language, document_output_language, forge_data_folder, skills_output_folder, sidecar_pathhalt_reason: "input-missing", phase on-activation:config): "SKF cannot load {project-root}/_bmad/skf/config.yaml: the workflow has no forge context to run against. Run setup first." When --headless or -H was passed, print its envelope with the second command above.Resolve {headless_mode}: true if --headless or -H was passed as an argument, or if headless_mode: true in {sidecar_path}/preferences.yaml. Default: false.
Resolve workflow customization. Bind {resolveCustomizationHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-resolve-customization.py, else {project-root}/src/shared/scripts/skf-resolve-customization.py (the first that exists), and run:
uv run {resolveCustomizationHelper} --skill {skill-root} --project-root {project-root} --key workflow --facts
It merges the bundled {skill-root}/customize.toml with {project-root}/_bmad/custom/skf-analyze-source.toml (team overrides, committed) and .user.toml (personal overrides, gitignored). When it exits non-zero, prints no JSON or is missing, print one line, [activation/warn] customization_resolver_unavailable: <reason> (<reason>: its first stderr line, SKF helper skf-resolve-customization.py not found when the script is missing, no JSON when it printed none). If the resolver cannot run, read {skill-root}/customize.toml alone and use its bundled defaults: the {project-root}/_bmad/custom/ overrides do not apply to this run. In that case keep the reason as {customization_resolver_unavailable} (unset when the resolver ran) for step 5 to record in the run sink.
Then bind, so stage files use the variable with no conditional at the usage site:
{analysisReportTemplatePath} ← workflow.analysis_report_template_path (the bundled templates/analysis-report-template.md when an override leaves it empty){onCompleteCommand} ← workflow.on_complete (empty: no hook)Run workflow.activation_steps_prepend now, and treat workflow.persistent_facts as standing context for the run (the bundled default loads every project-context.md under {project-root}, none in {project-root}/_bmad-output/.skf-run/; if the resolver ran, --facts has applied each ! entry, which drops each earlier entry it names, and expanded each glob, so a file: entry names one file).
Create the run folder. It holds what the run stages for its helpers (the tree listing, each brief's context, the unit records, the halt and result payloads) and the sink of its auto-decisions:
mkdir -p "{project-root}/_bmad-output/.skf-run" && mktemp -d "{project-root}/_bmad-output/.skf-run/skf-analyze-source-XXXXXXXX"
Bind {run_dir} ← the path it prints. The step that ends the run deletes it once the envelope is out; a HARD HALT keeps it. If it cannot be created, HARD HALT (exit code 4, halt_reason: "write-failed", phase on-activation:run-folder, path {project-root}/_bmad-output/.skf-run): "SKF cannot create its run folder under {project-root}/_bmad-output/.skf-run/: {the first stderr line}. Nothing was changed." Its envelope goes through the second command of step 1, its payload with "customization_resolver_unavailable": "<reason>" added when step 4 kept one. Once the folder exists and {customization_resolver_unavailable} is set, record the reason in the run sink: write customization_resolver_unavailable: {customization_resolver_unavailable} to {run_dir}/resolver-warning.txt with a file write, never echo (the reason can hold quotes or $( )), then run uv run {emitEnvelopeHelper} record --run-dir "{run_dir}" --warning "$(cat "{run_dir}/resolver-warning.txt")".
Run workflow.activation_steps_append, then load, read the full file, and execute references/init.md to begin the workflow.
assets/skill-brief-schema.md (opens in a new tab)customize.toml (opens in a new tab)references/auto-docs-only.md (opens in a new tab)references/continue.md (opens in a new tab)references/discover-additional-source.md (opens in a new tab)references/generate-briefs.md (opens in a new tab)references/headless-contract.md (opens in a new tab)references/health-check.md (opens in a new tab)references/identify-units.md (opens in a new tab)references/init.md (opens in a new tab)references/invocation-contract.md (opens in a new tab)references/map-and-detect.md (opens in a new tab)references/map-unit-exports.md (opens in a new tab)references/recommend.md (opens in a new tab)references/scan-project.md (opens in a new tab)references/scan-root.md (opens in a new tab)references/step-auto-scope-coexistence.md (opens in a new tab)references/step-auto-scope-corpora.md (opens in a new tab)references/step-auto-scope-split.md (opens in a new tab)references/step-auto-scope.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
15 skills in this plugin
/skf-audit-skillDrift detection between skill and current source code. Use when the user requests to "audit a skill" or "audit skill" for drift./skf-brief-skillDesign a skill scope through guided discovery. Use when the user requests to "create a skill brief" or "brief a 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."/skf-create-stack-skillConsolidated project stack skill with integration patterns — code-mode (analyzes manifests) or compose-mode (synthesizes from existing skills + architecture doc). Use when the user requests to "create a stack skill", "forge a stack", or "stack this project"./skf-drop-skillDeprecates or purges a skill version or a whole skill, then rebuilds the platform context files. Use when the user requests to "drop a skill" or "remove a skill"./skf-export-skillExports an SKF skill, validating its package, writing its context snippet and updating the managed section in CLAUDE.md, AGENTS.md or .cursorrules. Use when the user requests to "export a skill" or "package a skill."/skill-forge:skf-analyze-sourcefrom skill-forge
npx claudepluginhub armelhbobdad/bmad-module-skill-forge --plugin skill-forgeOther plugins' skills for the same job