From d7256e6f8cb795f3d3bbbfcb84502ae565d9bf03 Mon Sep 17 00:00:00 2001 From: Brummel Date: Thu, 28 May 2026 15:46:25 +0200 Subject: [PATCH] flatten: skills directly at repo root, no skills/ subdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ~/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// 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. --- README.md | 9 +++--- {skills/boss => boss}/SKILL.md | 0 skills/README.md => docs/migration.md | 43 ++++++++++++++++----------- install.sh | 26 ++++++++-------- 4 files changed, 44 insertions(+), 34 deletions(-) rename {skills/boss => boss}/SKILL.md (100%) rename skills/README.md => docs/migration.md (71%) diff --git a/README.md b/README.md index ac16254..b4d0b8a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/skills/boss/SKILL.md b/boss/SKILL.md similarity index 100% rename from skills/boss/SKILL.md rename to boss/SKILL.md diff --git a/skills/README.md b/docs/migration.md similarity index 71% rename from skills/README.md rename to docs/migration.md index 5867930..3abded4 100644 --- a/skills/README.md +++ b/docs/migration.md @@ -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/` and each skill's `agents/` -subdirectory into `~/.claude/agents/`, 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/`; if the skill has an +`agents/` subdirectory, that is symlinked into +`~/.claude/agents/`. Claude Code's flat user-level +discovery still finds everything while the source tree keeps +the structural binding. ## Migration checklist per skill diff --git a/install.sh b/install.sh index b7bef46..e8b2f37 100755 --- a/install.sh +++ b/install.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash # Install the skills plugin globally into ~/.claude/. # -# For each skill under skills//, creates symlinks: -# ~/.claude/skills/ -> /skills/ -# ~/.claude/agents/ -> /skills//agents (if that dir exists) +# Each top-level directory that contains a SKILL.md is treated as +# a skill. For each such , creates symlinks: +# ~/.claude/skills/ -> / +# ~/.claude/agents/ -> //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."