m3taz-ahmed/aizee / skills/bmad-toolsmith
bmad-toolsmith
VerifiedSmithy the Toolsmith builds and maintains BMad skills, agents and modules. Use when the user asks for Smithy or says "build a skill", "make an agent", "scaffold a skill", "turn my session logs into a skill", "fix this skill", "convert this prompt to a skill", "review this skill", "optimize this skill", "cut this skill down", "make this skill BMad compliant", "package a module", "validate my module" or "migrate my old module". Not for running evals (`bmad-eval`) or overriding an installed skill (`bmad-customize`).
modes/cut.md
View on GitHub# Cut
Rewrite a skill's prose into the fewest words that steer the model as far, for a skill built elsewhere or one the user wants tightened. The bar is `canon.md` and `lenses/lens-leanness.md`. A skill Smithy writes gets the same pass in `ship.md`.
The outcome: every prompt file of `{target}` rewritten or left as already lean, with every rule, convention, reference, protected passage and decision intact.
## Protected passages
Set `{target}` to the skill folder.
Protected by default: each file's frontmatter; an agent's `customize.toml`, which holds its persona; and what a shape template put there, a rendered skill's `SKILL.md` and the activation section of its `workflow.md`. `cut_check.py` reports a changed frontmatter itself; pass the rest to it as `--protect <file>` or `--protect <file>#<heading>`.
Ask once what else to protect, decisions included. When the work comes from a ticket, the `Decision:` lines in its Notes are decisions every cutter keeps.
## The Smithy execution plan
Copy `{target}` to `{reports_folder}/<YYYYMMDD-HHMMSS>-<skill>-before/`, the old version every later step reads. Count it with `uv run {skill-root}/scripts/count_tokens.py <copy>`.
The prompt files are the `.md` files outside `scripts/` and the root `customize.toml`; leave protected files and those under about 150 tokens uncut.
Show the execution plan in chat: each file with its tokens, the files not cut, the protected passages, the decisions. Then wait for the user's go.
## Examples
Before the cutters run, take each worked example (a sample artifact, a filled-in template, a transcript) through test 8 in `canon.md` with the user, settling a doubtful one with a fresh subagent given the rule alone. Make the agreed edit yourself; cutters left to it keep examples in.
## Rewrite and check
Launch one subagent per file, in parallel, with the Cutter prompt from `modes/cut-roles.md`, filled with the file, its protected passages, and the decisions.
Then run `uv run {skill-root}/scripts/cut_check.py <copy> {target} [--protect ...]` and restore, from the copy, every item it lists under a file's `lost` and every file under `missing`.
Then one subagent per rewritten file runs the Checker. Restore each loss and meaning change it lists as the shortest sentence that states it, and apply the shorter wordings you agree with.
Run the list under Checks in `ship.md` and fix until clean.
When `SKILL.md` calls `render_skill.py`, render the skill with `uv run --no-cache {project-root}/_bmad/scripts/render_skill.py --project-root {project-root} --skill {target}`, once as shipped and once per allowed value of each selector with `--set workflow.<key>=<value>`; each render finishes without error. Where that script does not exist, report the render as not run.
## Hand over
Run `cut_check.py` once more and restore anything it lists.
Run `count_tokens.py` on `{target}` and give a table in chat: file, tokens before (from the copy), after, percent, and the total. Under it list the Cutters' doubts and any loss you chose not to restore, with why.
Commit nothing; the user reads `diff -ru <copy> {target}` and commits what they accept.
## Without subagents
Run each role inline, one file at a time, and say so; read the old version again before checking your own rewrite, and name your judgment on test 8 as judgment.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |