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:
@@ -70,7 +70,8 @@ plugin.
|
|||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
This is the skeleton commit. The skill bodies and agent files
|
Migration from AILang's in-tree `~/dev/ailang/skills/` is in
|
||||||
still need to be migrated from AILang's in-tree
|
progress. The `boss` skill is the landed pilot; the remaining
|
||||||
`~/dev/ailang/skills/` and generalised against this plugin's
|
seven skills follow. See `docs/migration.md` for the per-skill
|
||||||
profile schema. That migration is iteration 1.
|
and per-agent migration checklists and the expected final
|
||||||
|
layout.
|
||||||
|
|||||||
@@ -1,20 +1,27 @@
|
|||||||
# skills/
|
# Migration
|
||||||
|
|
||||||
One subdirectory per skill, each containing a `SKILL.md` plus
|
This document tracks the migration from AILang's in-tree
|
||||||
the agent files that skill dispatches under `agents/`. Agents
|
`~/dev/ailang/skills/` into this plugin.
|
||||||
live with their dispatching skill, not in a parallel top-level
|
|
||||||
directory — this is what makes the "no orphan agents" rule
|
|
||||||
structurally true rather than only documented.
|
|
||||||
|
|
||||||
Migration from AILang's in-tree `~/dev/ailang/skills/` runs in
|
Each skill is one top-level directory at the repo root,
|
||||||
iteration 1. The `boss` skill is the migration pilot
|
containing a `SKILL.md` plus the agent files it dispatches
|
||||||
(landed); the remaining seven skills follow once the pattern
|
under `agents/`. Agents live with their dispatching skill —
|
||||||
is approved.
|
this is what makes the "no orphan agents" rule structurally
|
||||||
|
true rather than only documented.
|
||||||
|
|
||||||
Expected layout after migration:
|
The `boss` skill is the migration pilot (landed); the remaining
|
||||||
|
seven skills follow once the pattern is approved.
|
||||||
|
|
||||||
|
## Expected layout after migration
|
||||||
|
|
||||||
```
|
```
|
||||||
skills/
|
~/dev/skills/
|
||||||
|
├── README.md
|
||||||
|
├── INSTALL.md
|
||||||
|
├── install.sh
|
||||||
|
├── uninstall.sh
|
||||||
|
├── docs/
|
||||||
|
├── templates/
|
||||||
├── boss/ (pilot: landed)
|
├── boss/ (pilot: landed)
|
||||||
│ └── SKILL.md
|
│ └── SKILL.md
|
||||||
├── brainstorm/
|
├── brainstorm/
|
||||||
@@ -55,11 +62,13 @@ skills/
|
|||||||
`boss` has no agents — it is itself the dispatcher of the
|
`boss` has no agents — it is itself the dispatcher of the
|
||||||
others, not a dispatcher-of-subagents.
|
others, not a dispatcher-of-subagents.
|
||||||
|
|
||||||
`install.sh` symlinks each skill's directory into
|
`install.sh` walks the repo root, treats every top-level
|
||||||
`~/.claude/skills/<name>` and each skill's `agents/`
|
directory that contains a `SKILL.md` as a skill, and symlinks
|
||||||
subdirectory into `~/.claude/agents/<name>`, so Claude Code's
|
it into `~/.claude/skills/<name>`; if the skill has an
|
||||||
flat user-level discovery still finds everything while the
|
`agents/` subdirectory, that is symlinked into
|
||||||
source tree keeps the structural binding.
|
`~/.claude/agents/<name>`. Claude Code's flat user-level
|
||||||
|
discovery still finds everything while the source tree keeps
|
||||||
|
the structural binding.
|
||||||
|
|
||||||
## Migration checklist per skill
|
## Migration checklist per skill
|
||||||
|
|
||||||
+13
-13
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Install the skills plugin globally into ~/.claude/.
|
# Install the skills plugin globally into ~/.claude/.
|
||||||
#
|
#
|
||||||
# For each skill <name> under skills/<name>/, creates symlinks:
|
# Each top-level directory that contains a SKILL.md is treated as
|
||||||
# ~/.claude/skills/<name> -> <repo>/skills/<name>
|
# a skill. For each such <name>, creates symlinks:
|
||||||
# ~/.claude/agents/<name> -> <repo>/skills/<name>/agents (if that dir exists)
|
# ~/.claude/skills/<name> -> <repo>/<name>
|
||||||
|
# ~/.claude/agents/<name> -> <repo>/<name>/agents (if that dir exists)
|
||||||
#
|
#
|
||||||
# Idempotent — existing symlinks pointing to this repo are left
|
# Idempotent — existing symlinks pointing to this repo are left
|
||||||
# alone; existing entries that point elsewhere are reported and
|
# alone; existing entries that point elsewhere are reported and
|
||||||
@@ -39,16 +40,15 @@ link_one() {
|
|||||||
echo "link $dst -> $src"
|
echo "link $dst -> $src"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -d "$REPO_DIR/skills" ]; then
|
for d in "$REPO_DIR"/*/; do
|
||||||
for s in "$REPO_DIR"/skills/*/; do
|
[ -d "$d" ] || continue
|
||||||
[ -d "$s" ] || continue
|
[ -f "$d/SKILL.md" ] || continue
|
||||||
name="$(basename "$s")"
|
name="$(basename "$d")"
|
||||||
link_one "$s" "$CLAUDE_SKILLS/$name"
|
link_one "${d%/}" "$CLAUDE_SKILLS/$name"
|
||||||
if [ -d "$s/agents" ]; then
|
if [ -d "$d/agents" ]; then
|
||||||
link_one "$s/agents" "$CLAUDE_AGENTS/$name"
|
link_one "${d%/}/agents" "$CLAUDE_AGENTS/$name"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Install complete."
|
echo "Install complete."
|
||||||
|
|||||||
Reference in New Issue
Block a user