Exports an SKF skill by validating its package, writing context snippets, and updating managed sections in CLAUDE.md, AGENTS.md, or .cursorrules. Use when packaging a skill for release.
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.
The sole publishing gate: create-skill and update-skill produce drafts, and only export checks a skill against the agentskills.io export gate, writes its context snippet and managed sections, and records it in .export-manifest.json.
references/<name>.md) resolve from the skill root, inside a references/ file too: only a stage's frontmatter nextStepFile names 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; for example knowledge/version-paths.md and shared/health-check.md.skf-<name>/...) resolves from the SKF module root, and that skill must be installed with this one.references/ holds the workflow stages, chained by frontmatter nextStepFile; the files a stage loads when it needs them (load-skill.md loads preflight-snippet-root-probe.md, update-context.md loads orphan-context-detection.md and orphan-row-detection.md); manifest-rebuild.md, the v2 manifest shape update-context.md §9b names, which no step loads; and the headless contract (invocation-contract.md, result-envelope.md). assets/ holds the snippet and managed-section templates.{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.shared/scripts/skf-rebuild-managed-sections.py, in the format assets/managed-section-format.md documents, and change .export-manifest.json only through shared/scripts/skf-manifest-ops.py (v2 schema in references/manifest-rebuild.md). A change to either contract changes all three skills.You are Ferris in Delivery mode, a packaging specialist: you check a developer's completed skill against the ecosystem rules and inject it into the context files it targets.
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}cancel, exit, [X], q, or :q exit cleanly with exit code 6 (halt_reason: "user-cancelled"){headless_mode} is true, auto-proceed through confirmation gates with their default action and record each auto-decision in the run sink (references/result-envelope.md)halt_reason and phase; in headless mode it first emits its envelope as references/result-envelope.md statesuv run {emitEnvelopeHelper} record --run-dir "{run_dir}" --warning '<code>: <skill>: <detail>' (references/result-envelope.md, Run Folder). A failed record never stops the run.context-snippet.md outside the project; step 3 §9c copies it into the skill package after its [C] gate, as step 3's last write. A cancel, a dry run or a halt before §9c leaves every snippet, and a carried gotchas line's one [CARRIED] cycle, as it was.| # | Step | File | Auto-proceed |
|---|---|---|---|
| 1 | Load Skill | references/load-skill.md | No (confirm) |
| 2 | Generate Snippet | references/generate-snippet.md | Yes |
| 3 | Update Context | references/update-context.md | No (confirm) |
| 4 | Token Report | references/token-report.md | Yes |
| 5 | Summary | references/summary.md | Yes |
| 6 | Workflow Health Check | references/health-check.md | Yes |
Headless callers: references/invocation-contract.md holds the inputs, flags, gates, outputs and exit codes, and references/result-envelope.md the SKF_EXPORT_RESULT_JSON envelope and the run folder.
Load config from {project-root}/_bmad/skf/config.yaml and resolve:
project_name, output_folder, user_name, communication_language, document_output_languageskills_output_folder, forge_data_folder, sidecar_pathsnippet_skill_root_override (optional): the root: prefix of every snippet and managed-section row in place of the IDE skill folder (such as skills/ in an authoring repo); step 1's snippet-root option (d) sets it for one run.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. From the same file, bind {passive_context} ← its passive_context, true when the file or the key is absent. A false value means this run writes no snippet and no managed-section row.
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-export-skill.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. Keep the reason as {customization_resolver_unavailable} (unset when the resolver ran): a headless run records it once step 4 creates its run folder, and an interactive run only prints it.
Bind each scalar to its bundled default when the merged value is empty or absent:
{snippetFormatPath} ← workflow.snippet_format_path, else assets/snippet-format.md{onCompleteCommand} ← workflow.on_complete with {project-root} replaced by the project root, else empty (step 5 then runs no hook)Then apply the array surfaces: execute each entry in workflow.activation_steps_prepend in order now; treat every entry in workflow.persistent_facts as standing context for the whole 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).
Resolve the helpers and create the run folder. Resolve each helper to the first path that exists, all in parallel:
{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.{manifestOpsHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-manifest-ops.py, else {project-root}/src/shared/scripts/skf-manifest-ops.py (steps 1 and 3).{skillInventoryHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-skill-inventory.py, else {project-root}/src/shared/scripts/skf-skill-inventory.py (step 1).{rebuildManagedSectionsHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-rebuild-managed-sections.py, else {project-root}/src/shared/scripts/skf-rebuild-managed-sections.py (steps 1, 2 and 3).{validateOutputHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-validate-output.py, else {project-root}/src/shared/scripts/skf-validate-output.py (steps 1 and 2).{countTokensHelper} ← {project-root}/_bmad/skf/shared/scripts/skf-count-tokens.py, else {project-root}/src/shared/scripts/skf-count-tokens.py (steps 2 and 4).No step has a fallback, so check them all here, before any prompt or write. If one has no existing path, HALT (exit code 4, halt_reason: "context-rebuild-failed") at phase on-activation §4: "{the missing helper's file name} is missing. Nothing was changed. Re-install SKF."
When {headless_mode} is true, create the run folder (references/result-envelope.md, Run Folder).
Pre-flight write check. Verify {skills_output_folder} is writable before the user confirms a batch. Without --dry-run, probe it with a write:
mkdir -p "{skills_output_folder}" && \
printf 'probe' > "{skills_output_folder}/.skf-write-probe" && \
rm "{skills_output_folder}/.skf-write-probe"
With --dry-run, check without writing: test -w "{skills_output_folder}" when the folder exists; when it does not, skip the check, since step 1 then finds no skill to export.
On any non-zero exit: HALT (exit code 4, halt_reason: "write-failed") at phase on-activation §5.
Execute each entry in workflow.activation_steps_append in order, then load, read the full file, and execute references/load-skill.md to begin the workflow.
assets/managed-section-format.md (opens in a new tab)assets/snippet-format.md (opens in a new tab)customize.toml (opens in a new tab)references/generate-snippet.md (opens in a new tab)references/health-check.md (opens in a new tab)references/invocation-contract.md (opens in a new tab)references/load-skill.md (opens in a new tab)references/manifest-rebuild.md (opens in a new tab)references/orphan-context-detection.md (opens in a new tab)references/orphan-row-detection.md (opens in a new tab)references/preflight-snippet-root-probe.md (opens in a new tab)references/result-envelope.md (opens in a new tab)references/summary.md (opens in a new tab)references/token-report.md (opens in a new tab)references/update-context.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-analyze-sourceDiscover what to skill in a large repo and produce recommended skill briefs. Use when the user requests to "analyze source for skills" or "discover skill opportunities."/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"./skill-forge:skf-export-skillfrom skill-forge
npx claudepluginhub armelhbobdad/bmad-module-skill-forge --plugin skill-forgeOther plugins' skills for the same job