docs(claude-code): teach the skill-management skills the Nix layout

~/.claude/skills is generated by home-manager: the directories are real
but every leaf file is a read-only symlink into the store. The skills
that author and install skills assumed it was an ordinary writable tree.

- craft-skill: personal skills are authored in modules/claude-code/skills
  and applied by a rebuild, never edited under ~/.claude/skills; writing
  there succeeds silently and strands the skill outside the repo.
- setup-skills, update-skills: copy out of the library with cp -rL and
  chmod -R u+w. A plain cp -r copies the symlinks, committing store paths
  into the project, and dereferenced files keep the store's read-only mode.
- craft-skill also staged through `dot add`, a fish function this repo no
  longer carries; plain git add replaces it.
This commit was merged in pull request #1.
This commit is contained in:
2026-07-19 08:34:22 -04:00
parent bdb6f01934
commit 7809e079e3
4 changed files with 20 additions and 6 deletions

View File

@@ -36,8 +36,11 @@ skill that isn't already there — that's
already included an explicit go-ahead argument (e.g. `-y`, `yes`), in
which case apply them without asking. Applying means: delete
`.claude/skills/<name>/` entirely and copy
`~/.claude/skills/library/<name>/` in its place, so no file the project
copy had but the library no longer has can survive — then recompute its
`~/.claude/skills/library/<name>/` in its place with `cp -rL` followed
by `chmod -R u+w` (the library is read-only symlinks into the Nix store;
a plain `cp -r` would put store paths into the project), so no file the
project copy had but the library no longer has can survive — then
recompute its
hash and overwrite that entry's `hash` in `.claude/skills-lock.yaml` in
place.