Authors and updates customization overrides for installed BMad skills. Use when the user says 'customize bmad', 'override a skill', 'change agent behavior', or
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-bmad-customize-362e9d225604 ,按照其中的说明把「bmad-customize」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Translate the user's intent into a correctly-placed TOML override file under {project-root}/_bmad/custom/ for a customizable agent or workflow skill. Discover, route, author, write, verify.
Scope v1: per-skill [agent] overrides (bmad-agent-<role>.toml / .user.toml) and per-skill [workflow] overrides (bmad-<workflow>.toml / .user.toml). Central config ({project-root}/_bmad/custom/config.toml) is out of scope — point users at the How to Customize BMad guide.
When the target's customize.toml doesn't expose what the user wants, say so plainly. Don't invent fields.
{project-root}/_bmad/ → BMad is not set up here. Offer to run the bmad skill's setup, installing bmad first if you do not have it (npx skills add bmad-code-org/BMAD-METHOD --skill bmad). Stop if the user declines.{project-root}/_bmad/scripts/resolve_customization.py missing → continue, but Step 6 verify falls back to manual merge.Greet the user. If the user's invocation already names a target skill AND a specific change, jump to Step 3.
uv run {skill-root}/scripts/list_customizable_skills.py --project-root {project-root}
Use --extra-root <path> (repeatable) if the user has skills installed in additional locations.
Group the returned agents and workflows for the user; for each show name, description, whether has_team_override or has_user_override is true. Surface any errors[]. For audit/iterate intents, lead with already-overridden entries.
Empty list: show scanned_roots, ask whether skills live elsewhere (offer --extra-root); otherwise stop.
Read the target's customize.toml. Top-level [agent] or [workflow] block defines the surface.
If a team or user override already exists, read it first and summarize what's already overridden before composing.
Cross-cutting intent — walk both surfaces with the user:
bmad-agent-pm.toml with persistent_facts, principles).bmad-prd.toml with activation_steps_prepend).Single-surface heuristic:
*_template, on_complete). Surgical, reliable.When ambiguous, present both with tradeoff, recommend one, let the user decide.
Intent outside the exposed surface (step logic, ordering, anything not in customize.toml): say so; offer activation_steps_prepend/append or persistent_facts as approximations, or recommend bmad-builder to create a custom skill.
Translate plain-English into TOML against the target's customize.toml fields. If an existing override was read, frame the change as additive.
Merge semantics:
icon, role, *_template, on_complete) — override wins.persistent_facts, activation_steps_prepend/append, principles) — team/user entries append in order.code or id) — matching keys replace, new keys append.Overrides are sparse: only the fields being changed. Never copy the whole customize.toml.
Template swap (*_template scalar): offer to copy the default template to {project-root}/_bmad/custom/{skill-name}-{purpose}-template.md, point the override at the new path, offer to help edit it.
Under {project-root}/_bmad/custom/:
{skill-name}.toml — team, committed. Policies, org conventions, compliance.{skill-name}.user.toml — user, gitignored. Personal tone, private facts, shortcuts.Default by character (policy → team, personal → user), confirm before writing.
Show the full TOML. If the file exists, show a diff. Never silently overwrite.
Wait for explicit yes.
Write. Create {project-root}/_bmad/custom/ if needed.
Verify:
uv run {project-root}/_bmad/scripts/resolve_customization.py --skill <install-path> --project-root {project-root} --key <agent-or-workflow>
Show the merged output, point out the changed fields.
Resolver missing or fails: read whichever layers exist — <install-path>/customize.toml (base), {project-root}/_bmad/custom/{skill-name}.toml (team), {project-root}/_bmad/custom/{skill-name}.user.toml (user) — apply base → team → user with the same merge rules (scalars override, tables deep-merge, code/id-keyed arrays merge by key, all other arrays append), describe how the changed fields resolve.
Verify shows override didn't land (field unchanged, merge conflict, file not picked up): re-enter Step 4 with the verify output as context. Usually wrong field name, wrong merge mode (scalar vs array), or wrong scope.
Summarize what changed, where the file lives, how to iterate. Remind the user to commit team overrides.
Otherwise the skill isn't done — finish or tell the user they're exiting incomplete.
{project-root}/_bmad/custom/config.toml) — see the How to Customize BMad guide.customize.toml — open a feature request, or use bmad-builder to create a custom skill. Offer to help with either.customize.toml — not customizable.