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
|
||||
|
||||
This is the skeleton commit. The skill bodies and agent files
|
||||
still need to be migrated from AILang's in-tree
|
||||
`~/dev/ailang/skills/` and generalised against this plugin's
|
||||
profile schema. That migration is iteration 1.
|
||||
Migration from AILang's in-tree `~/dev/ailang/skills/` is in
|
||||
progress. The `boss` skill is the landed pilot; the remaining
|
||||
seven skills follow. See `docs/migration.md` for the per-skill
|
||||
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
|
||||
the agent files that skill dispatches under `agents/`. Agents
|
||||
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.
|
||||
This document tracks the migration from AILang's in-tree
|
||||
`~/dev/ailang/skills/` into this plugin.
|
||||
|
||||
Migration from AILang's in-tree `~/dev/ailang/skills/` runs in
|
||||
iteration 1. The `boss` skill is the migration pilot
|
||||
(landed); the remaining seven skills follow once the pattern
|
||||
is approved.
|
||||
Each skill is one top-level directory at the repo root,
|
||||
containing a `SKILL.md` plus the agent files it dispatches
|
||||
under `agents/`. Agents live with their dispatching skill —
|
||||
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)
|
||||
│ └── SKILL.md
|
||||
├── brainstorm/
|
||||
@@ -55,11 +62,13 @@ skills/
|
||||
`boss` has no agents — it is itself the dispatcher of the
|
||||
others, not a dispatcher-of-subagents.
|
||||
|
||||
`install.sh` symlinks each skill's directory into
|
||||
`~/.claude/skills/<name>` and each skill's `agents/`
|
||||
subdirectory into `~/.claude/agents/<name>`, so Claude Code's
|
||||
flat user-level discovery still finds everything while the
|
||||
source tree keeps the structural binding.
|
||||
`install.sh` walks the repo root, treats every top-level
|
||||
directory that contains a `SKILL.md` as a skill, and symlinks
|
||||
it into `~/.claude/skills/<name>`; if the skill has an
|
||||
`agents/` subdirectory, that is symlinked into
|
||||
`~/.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
|
||||
|
||||
+11
-11
@@ -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"
|
||||
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
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Install complete."
|
||||
|
||||
Reference in New Issue
Block a user