用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill link-skills命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | link-skills |
| description | Find cross-ref gaps across skills. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Grep","Glob","Edit","Write"] |
Skills in this repo cross-reference each other under a ## Relationship to other skills section, so a reader who lands on one skill discovers the related ones.
As the corpus grows, those links drift: a skill gets added without back-links, a
workflow family gains a member that its siblings never mention, an A→B link
never gets its B→A return. This skill audits the whole skills/ tree for
those gaps and proposes the missing links.
It's the discovery counterpart to scripts/check-links.py (which only guards
existing relative links from breaking), and the corpus-wide counterpart to
skill-builder (which cross-links just the one skill being authored).
Three kinds, roughly in priority order:
skills/B/ link), but B's ## Relationship to other skills never names A.
The return link is almost always warranted.ard / ardi / ardia,
the branch/sync family sync-pr-branch / merge-main / clean-branches),
but some members don't point to the others.allowed-tools:, not a thin
alias redirect) has no ## Relationship to other skills section at all.Not every co-mention is a gap. Aliases only redirect to their canonical and need no Relationship section. Judgment decides which candidates are real — this skill surfaces candidates; it doesn't link blindly.
cd "$(git -C ~/.claude/skills/link-skills rev-parse --show-toplevel)" # the ai-config repo
ls skills/
Real skills declare allowed-tools:; alias files don't. Separate the two — only
real skills are expected to carry a Relationship section:
for f in skills/*/SKILL.md; do
grep -q '^allowed-tools:' "$f" && kind=real || kind=alias
grep -q 'Relationship to other skills' "$f" && rel=has-rel || rel=NO-REL
printf '%-8s %-8s %s\n' "$kind" "$rel" "$f"
done
real NO-REL … lines are gap-kind 3 candidates.
For every ordered pair of skills, record when one skill's body names the other —
backticked (`name`) or as a skills/name/ link. Iterate the glob directly
so the loop runs the same under bash and zsh (no mapfile):
for sd in skills/*/; do s=$(basename "$sd")
for td in skills/*/; do t=$(basename "$td")
[ "$s" = "$t" ] && continue
grep -qE "\`$t\`|skills/$t/" "skills/$s/SKILL.md" 2>/dev/null && echo "$s $t"
done
done | sort -u > /tmp/edges.txt
wc -l /tmp/edges.txt
An edge A B with no matching B A is a one-directional reference — a candidate
return link:
# print A->B where B->A is absent
while read -r a b; do
grep -qxF "$b $a" /tmp/edges.txt || echo "ONE-WAY: $a -> $b (consider $b -> $a)"
done < /tmp/edges.txt
Expect alias→canonical pairs (adr -> ard) and short-name noise to dominate the
raw list — both are filtered by the judgment in the note below and step 4.
Short-name noise. Two-letter skills (
st,gi,cb,dc,ts,rc,and) match backticked prose that isn't a skill reference. Treat their edges as candidates to eyeball, not confirmed links. Reading the surrounding line settles it fast.
The graph won't catch a sibling that's simply never mentioned. Skim the skill
list for workflow families and check each member points to the others — the
review/iterate family, the branch/sync family, the issue-grabbing family (gi /
gii / gia), the memory family (memorize / ums / record-learnings), the
style family (use-preferred-style / find-ai-tells). Add the missing links.
For each confirmed gap, add a bullet to the target skill's ## Relationship to other skills section (create the section just above ## Anti-patterns if it's
missing), matching the house format — bolded backticked skill name, em-dash, one
line on why they relate:
- **`other-skill`** — one line on how the two relate / hand off.
Show the user the exact diffs before applying. After editing, confirm no link broke:
python3 scripts/check-links.py
python3 scripts/validate-skills.py # if present — schema/frontmatter sanity
Skill edits live in the ai-config repo — never local-only. Commit on a branch,
open a PR, request the repository owner (see request-pr-review), and ARDI to clean
(see ardi). Stage skills via their real skills/<name>/SKILL.md path, not
through the .claude/skills symlink (git add rejects the symlinked path).
skill-builder — authors a new skill and cross-links that skill on the
way in; this skill is the corpus-wide audit that catches the links a single
authoring pass missed.heal-skill — repairs one skill that misfired (including fixing an
ambiguous overlap by cross-linking the two); link-skills is the proactive,
whole-corpus sweep rather than a reaction to one failure.find-overlap — the complementary detector: link-skills finds skills
that should reference each other but don't; find-overlap finds skills that
duplicate each other. When find-overlap flags an adjacent-but-distinct
cluster (overlap that shouldn't merge), the fix is a cross-link — this skill.request-pr-review, ardi — ship and clean the resulting PR.simplify / tidy, not a link.st, gi, …) edges without reading the line —
they over-match.scripts/check-links.py after editing — a typo'd skills/<name>/
link silently rots.