用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill decompose-skill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | decompose-skill |
| description | Split overly-broad skill. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep"] |
The corpus also grows the opposite problem from what
consolidate-skills fixes: instead of two
skills drifting into a duplicate, one skill drifts into too much —
bundling a second, genuinely distinct workflow, or holding a chunk of
content that other skills need too but can only get by duplicating it. This
skill is that mirror-image action: split the bundle into a canonical skill
plus whatever it should never have carried alone.
It is the corpus-level complement to simplify/tidy (which prune a single
file's own content) and the reverse of consolidate-skills (which merges
several skills into one). Where consolidate-skills asks "should these two
become one?", this skill asks "should this one become two — or one plus a
shared fragment?"
SKILL.md whose ## Procedure covers two workflows a user
would invoke separately, or whose content keeps getting copy-pasted into
other skills instead of referencedskill-builder's Step 0 "extend before create" check finds that the
closest existing skill to extend is actually two concerns wearing one
name — hand the cleanup here instead of bolting a third concern onNot every long or detailed skill needs splitting — length alone is not the
signal. Before touching anything, classify what's actually there into
exactly one of three buckets, the same discipline consolidate-skills uses
in reverse:
SKILL.md. This is the cheap, usually-right move: a shared/
fragment carries no per-skill overhead (no new frontmatter, no new
trigger phrases to make discoverable, no new entry in skills.qmd) — it's
just a file other SKILL.mds point at.SKILL.md covers two (or more) workflows a user would
invoke separately, under different triggers, producing different
outcomes — not two steps of the same job. This is the
expensive move: each new skill carries fixed overhead (frontmatter, a
discoverable description, a skills.qmd row, cross-links to maintain),
so only pay it when the concerns are truly separable asks, not just
separable paragraphs within one ask.If you can't name a distinct trigger phrase and a distinct outcome for the
proposed second skill, it's bucket 1 or 2, not bucket 3.
Over-splitting a thorough single-purpose skill into several thin ones hurts
discoverability more than a long file ever does.
The fix-forward-references-vs-definition-crossrefs.md split (a dedicated
skill for one direction, a fragment cross-linked from several review skills
for the other) is a useful precedent: the fragment is bucket 2 and the
dedicated skill is a bucket-3 judgment call, decided on the merits of each
piece rather than reflexively splitting everything.
Either take a named skill as input, or scan for signals: a SKILL.md whose
line count is well above the corpus's norm and whose headings name more
than one distinct trigger/outcome pair; content duplicated near-verbatim
across two or more other skills (a grep hit for a distinctive phrase in more
than one SKILL.md); or a skill whose own description reads as two
run-on workflows joined by "and".
Read the full SKILL.md (not just headings) before deciding. Sort its
content into the three buckets above. Most files will be almost entirely
bucket 1 with maybe one bucket-2 or bucket-3 piece — decomposition is
usually a small, targeted extraction, not a full rewrite.
Same posture as consolidate-skills and heal-skill: present, don't apply.
shared/<topic>.md path and every SKILL.md (the origin plus any others
already duplicating it) that should cross-link it afterward.description differs
from the canonical's so the two are separately discoverable.shared/<topic>.md with the reusable content, written to stand on
its own (a skill reading it later won't have the origin skill's own
framing).SKILL.md with a short
reference (@shared/<topic>.md-style citation or a plain link, matching
how this corpus's other shared/ fragments are already cross-linked from
skill bodies — grep an existing example before inventing a new citation
style).Follow skill-builder's conventions exactly
for the new sibling: proper frontmatter, a discoverable trigger-rich
description, and (if it encodes a standing rule) a matching
preferences.md/CLAUDE.md update. Narrow the canonical skill's own
description and body to drop the split-off concern, and add a
## Relationship to other skills cross-link each direction so neither
reads as an unexplained fork of the other.
A decomposed skill's old, broader description may still be quoted or cross-linked from elsewhere:
grep -rn "<original-skill-name>" skills/*/SKILL.md memories/ CLAUDE.md 2>/dev/null \
| grep -v "skills/<original-skill-name>/SKILL.md"
Update any cross-link that named the old bundled scope to point at the right piece now — the canonical, the new fragment, or the new sibling skill, whichever the reference actually meant.
python3 scripts/validate-skills.py # frontmatter + wrapper-sync + manifest checks
python3 scripts/sync-codex-skill-wrappers.py # REQUIRED if a sibling skill was added (bucket 3)
python3 scripts/check-links.py
python3 scripts/check-vendored-drift.py
Branch + PR (not direct to main), request the repository owner as reviewer
(request-pr-review), then ARDI to clean (ardi). If a new sibling
skill was added, bump skills.qmd's "All N+ canonical skills" count to the
actual directory count (ls -d skills/*/ | wc -l), not a manual +1 — see
skill-builder's own note on why a hand-incremented count drifts.
consolidate-skills — the mirror-image merge direction; run that
when two-or-more skills should become one, this skill when one should
become two (or one plus a fragment). (find-overlap : consolidate-skills
:: this skill's own step-1 scan : this skill's steps 2–7.)skill-builder — Step 0's "extend before create" judgment call is the
narrower, upstream version of this skill's classification step, applied
at the moment a new request comes in rather than to an existing
skill's accumulated content. Once a genuine split is identified (not just
an extend-vs-create decision), hand it here; step 5 above then delegates
the actual sibling-skill scaffolding back to skill-builder's own
conventions.simplify / tidy — the code/prose-cleanup analogues that prune
or tidy a single file's own content without changing its scope; this
skill changes scope (moves content out), those don't.split-concerns — the PR-scope analogue: splits a pull request's diff
into independent PRs, rather than splitting a skill's own content.shared/
fragment (bucket 2, cheap) would do — over-splitting adds discoverability
overhead the content doesn't earn.consolidate-skills
and heal-skill.skills.qmd's count
when a bucket-3 split adds a genuinely new skill.