用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill consolidate-skills命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | consolidate-skills |
| description | Merge overlapping skills. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Write","Edit","Glob","Grep"] |
The corpus accretes near-duplicates: two sessions each author a skill for the same workflow, or a skill drifts until it overlaps a neighbor. This skill collapses a genuine-duplicate cluster into one canonical skill and turns the absorbed ones into thin alias stubs — so the corpus shrinks but no invocation name, slash command, or muscle-memory breaks.
It is the corpus-level complement to the single-skill tools: skill-builder
creates (extend-first), heal-skill repairs one misfiring skill, and this
merges a redundant set into one. The detection half — finding and classifying
the overlap — is delegated to find-overlap; this skill adds the merge action on
top.
/consolidate-skills.skill-builder run discovers an existing skill it should have extended —
hand the cleanup here.Most "overlap" is not a duplicate. Before merging anything, classify each cluster into exactly one of three buckets:
ard/adr/address-rebut-defer, cb/prune/clean-branches,
sync-pr-branch/merge-main/resync-branch). This is the target state,
not a problem. Tell: the others' bodies are ~5 lines ending in
→ **[<canonical>](../<canonical>/SKILL.md)**.tidy audits for refactors vs simplify
prunes dead code; split-concerns splits a PR vs defer-issue files a
follow-up). Merging these loses capability. If they should reference each
other, hand off to link-skills — don't consolidate.If you can't articulate what capability would be lost by keeping both, it's a duplicate. If you can, it isn't.
find-overlapDon't re-implement the audit; run find-overlap over the skills corpus. It
gathers every skills/<name>/SKILL.md, clusters by shared triggers / outcome,
reads the bodies, and returns each cluster already sorted into the three buckets
above (with a recommended disposition). Work from its report.
In a worktree,
find-overlap'srev-parse --show-toplevelresolves to the main checkout (see issue #76 / theskill-builderwarning) — that's correct: skills live in the main checkout, edit them there.
If find-overlap is somehow unavailable, fall back to its inline pass — list
skills/*/ with name + description + line count (a stub is ≈ <15 lines, a
real body more), cluster, then read the full SKILL.md of every member of each
candidate cluster before classifying.
From find-overlap's report, act only on bucket 3 (genuine duplicate).
Leave intentional alias families (bucket 1) untouched, and hand
adjacent-but-distinct clusters (bucket 2) to link-skills if they want a
cross-link — never a merge.
Like heal-skill, do not mutate before the user signs off. Present, per
cluster:
preferences.md, CLAUDE.md, other skills' bodies
that name an absorbed skill (see step 6).In the canonical skills/<canonical>/SKILL.md:
description into
the canonical description, deduped — discoverability must not regress.# <name> — <tagline>, ## When this fires,
## Procedure, ## Relationship to other skills, ## Anti-patterns.Never git rm an invocation name — overwrite it with a redirect so every
existing /name keeps resolving:
---
name: <absorbed>
description: "Alias for `<canonical>`. <one-line of what it does>. Use when asked to '<trigger>', '<trigger>'."
user-invocable: true
---
# <absorbed> (alias for `<canonical>`)
This is an alias for the **<canonical>** skill. Read and follow the canonical skill:
→ **[<canonical>](../<canonical>/SKILL.md)**
Carry the absorbed skill's own trigger phrases into the stub's description so
those phrasings still match. The stub holds zero procedural content — the
canonical is the single source of truth.
A consolidated name may be mentioned elsewhere. Find and update:
grep -rn "<absorbed>" skills/*/SKILL.md memories/ CLAUDE.md 2>/dev/null \
| grep -v "skills/<absorbed>/SKILL.md"
Repoint ## Relationship to other skills cross-links and any preferences.md /
CLAUDE.md mentions at the canonical name (note the stub still works, but links
should name the canonical).
python3 scripts/validate-skills.py # if present — must pass
Skills live in the ai-config repo — never leave changes local-only. Branch +
PR (not direct to main), request the repository owner as reviewer (request-pr-review),
then ARDI to clean (ardi).
git checkout -b consolidate-<canonical>-skill origin/main # CREATE_BRANCH
# write the canonical, overwrite absorbed skills as stubs, fix references
git add skills/<canonical>/ skills/<absorbed-1>/ skills/<absorbed-2>/ # only the
# dirs you touched — plus memories/preferences.md and/or CLAUDE.md ONLY if you
# edited them. Never `git add -A` or a bare `skills/`, which sweeps in unrelated edits.
git commit -m "skills: consolidate <a>/<b> into <canonical> (+ alias stubs)" # COMMIT
git push -u origin HEAD && gh pr create --fill # PUSH, CREATE_PR
find-overlap — the read-only detector this skill delegates its audit to;
it finds and classifies the overlapping clusters, consolidate-skills merges the
genuine duplicates. (find-overlap : consolidate-skills :: pr-status : ardi.)skill-builder — the inverse-facing sibling: it creates (extend-first)
and, when it finds it should have extended an existing skill, hands the
cleanup here.heal-skill — repairs one misfiring skill; this merges a redundant
set. If two skills "compete for the same request" but are genuinely distinct,
that's a heal-skill boundary fix, not a consolidation.link-skills — for adjacent-but-distinct skills that should reference each
other but stay separate, cross-link instead of merging.tidy / simplify — the same "collapse near-duplicates over proliferating
them" instinct, applied to code rather than the skill corpus.decompose-skill — the mirror-image direction: this skill merges several
skills into one; decompose-skill splits one overly-broad skill into a
canonical skill plus extracted shared fragments or narrower siblings.git rm-ing an invocation name instead of converting it to an alias stub —
it breaks every existing /name, automation, and muscle-memory.description must
cover the union of the absorbed skills' triggers, or discoverability
regresses.preferences.md / CLAUDE.md / other skills.