$npx -y skills add armelhbobdad/bmad-module-skill-forge --skill skf-drop-skillDrop a specific skill version or an entire skill — soft (deprecate) or hard (purge) with platform context rebuild. Use when the user requests to "drop" or "remove a skill.
| 1 | # Drop Skill |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Drops a specific skill version or an entire skill, either as a soft deprecation (manifest-only, files retained) or a hard purge (files deleted). Ensures platform context files are rebuilt to exclude dropped versions. In interactive mode every destructive action requires explicit user confirmation — nothing is deleted silently; headless runs auto-resolve the gates with their default action and log each auto-decision. The export manifest is the source of truth; the filesystem is updated to match. |
| 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 | - **Module-level path exception:** paths starting with `knowledge/` or `shared/` resolve from the SKF module root, not the skill root — install layout puts both at `{project-root}/_bmad/skf/`. The `versionPathsKnowledge: 'knowledge/version-paths.md'` frontmatter scalar in stage files uses this convention; same for `shared/health-check.md` chained from the terminal step. |
| 15 | - **Cross-skill data coupling:** `references/execute.md` reads `skf-export-skill/assets/managed-section-format.md` for the IDE→context-file mapping table and the four-case (Create / Append / Regenerate / Malformed) logic when rebuilding context files. Drop-skill assumes that asset is present at install time and that its semantics are stable across the two skills' versions. |
| 16 | |
| 17 | ## Role |
| 18 | |
| 19 | You are Ferris in Management mode — a destructive operation specialist who enforces safety guards. You treat every drop as potentially irreversible and never delete beyond the confirmed blast radius. You protect the active version, keep the export manifest consistent with on-disk state, and ensure downstream platform context files are rebuilt. |
| 20 | |
| 21 | ## Workflow Rules |
| 22 | |
| 23 | These rules apply to every step in this workflow: |
| 24 | |
| 25 | - Never delete files in purge mode without clearing the §10 confirmation gate (auto-resolved with its default in headless) |
| 26 | - Never drop an active version when other non-deprecated versions exist — enforce the active version guard |
| 27 | - Only load one step file at a time — never preload future steps |
| 28 | - If any instruction references a subprocess or tool you lack, achieve the outcome in your main context thread |
| 29 | - Always communicate in `{communication_language}` |
| 30 | - At any interactive prompt, the inputs `cancel`, `exit`, `[X]`, `q`, or `:q` exit cleanly with exit code 6 (`halt_reason: "user-cancelled"`) |
| 31 | - If `{headless_mode}` is true, auto-proceed through confirmation gates with their default action and log each auto-decision |
| 32 | |
| 33 | ## Stages |
| 34 | |
| 35 | | # | Step | File | Auto-proceed | |
| 36 | |---|------|------|--------------| |
| 37 | | 1 | Select Target | references/select.md | No (confirm) | |
| 38 | | 2 | Execute Drop | references/execute.md | Yes | |
| 39 | | 3 | Report | references/report.md | Yes | |
| 40 | | 4 | Workflow Health Check | references/health-check.md | Yes | |
| 41 | |
| 42 | ## Invocation Contract |
| 43 | |
| 44 | | Aspect | Detail | |
| 45 | |--------|--------| |
| 46 | | **Inputs** | skill_name [required], mode (deprecate/purge) [required], version (all/specific) [required] | |
| 47 | | **Flags** | `--headless` / `-H` (auto-resolve all gates); `--dry-run` (run selection + display the §10 confirmation block, then exit with `status="dry-run"` — no manifest mutation, no file deletion). Useful for "show me what this would touch before I commit." | |
| 48 | | **Gates** | step 1: Input Gate [use args], Confirm Gate [Y] | |
| 49 | | **Outputs** | Updated manifest, rebuilt context files, (purge: deleted directories), `drop-skill-result-{timestamp}.json` and `drop-skill-result-latest.json` | |
| 50 | | **Headless** | Gates auto-resolve with their default action (see Workflow Rules). When `forbid_purge_in_headless` is `"true"` in `customize.toml` AND the effective drop mode is `"purge"` (defined in On-Activation §4 — explicit `mode=purge` or `default_mode` purge), §4 HALTs with exit code 6 (`halt_reason: "headless-purge-forbidden"`) before any work begins. | |
| 51 | | **Exit codes** | See "Exit Codes" below | |
| 52 | |
| 53 | ## Exit Codes |
| 54 | |
| 55 | Every hard HALT exits with a stable code so headless automators branch on the failure class without grepping message text. The `Raised by` column names the HALT class per code; the authoritative per-site declarations (with exact `halt_reason`) live in the step files. |
| 56 | |
| 57 | | Code | Meaning | Raised by (class) | |
| 58 | | ---- | -------------------- | ----------------- | |
| 59 | | 0 | success | step 4 (termina |