flatten: skills directly at repo root, no skills/ subdir

~/dev/skills/skills/boss/ was visually awkward (skills/skills
read twice) and structurally unnecessary — the skills ARE the
repo's main content, not a sub-collection inside it.

Layout changes:
- boss/SKILL.md moves to the repo root
- skills/README.md (migration notes) moves to docs/migration.md
  where documentation-about-the-system belongs
- install.sh discovers skills via the SKILL.md marker file
  instead of a hardcoded skills/<name>/ path, so future skill
  additions just drop in at the root

Cross-references in boss/SKILL.md (../README.md, ../brainstorm,
etc.) now resolve against the repo root instead of the old
skills/ subdir, which is what they describe: top-level
README is the skill table; sibling skill dirs are the other
migrated skills.
This commit is contained in:
2026-05-28 15:46:25 +02:00
parent 9e10e9dfee
commit d7256e6f8c
4 changed files with 44 additions and 34 deletions
+13 -13
View File
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
# Install the skills plugin globally into ~/.claude/.
#
# For each skill <name> under skills/<name>/, creates symlinks:
# ~/.claude/skills/<name> -> <repo>/skills/<name>
# ~/.claude/agents/<name> -> <repo>/skills/<name>/agents (if that dir exists)
# Each top-level directory that contains a SKILL.md is treated as
# a skill. For each such <name>, creates symlinks:
# ~/.claude/skills/<name> -> <repo>/<name>
# ~/.claude/agents/<name> -> <repo>/<name>/agents (if that dir exists)
#
# Idempotent — existing symlinks pointing to this repo are left
# alone; existing entries that point elsewhere are reported and
@@ -39,16 +40,15 @@ link_one() {
echo "link $dst -> $src"
}
if [ -d "$REPO_DIR/skills" ]; then
for s in "$REPO_DIR"/skills/*/; do
[ -d "$s" ] || continue
name="$(basename "$s")"
link_one "$s" "$CLAUDE_SKILLS/$name"
if [ -d "$s/agents" ]; then
link_one "$s/agents" "$CLAUDE_AGENTS/$name"
fi
done
fi
for d in "$REPO_DIR"/*/; do
[ -d "$d" ] || continue
[ -f "$d/SKILL.md" ] || continue
name="$(basename "$d")"
link_one "${d%/}" "$CLAUDE_SKILLS/$name"
if [ -d "$d/agents" ]; then
link_one "${d%/}/agents" "$CLAUDE_AGENTS/$name"
fi
done
echo
echo "Install complete."