pkg install leaves SKILL.md empty when the package's install.sh links its folder into ~/.claude/skills (adom/kicad-board-audit 1.0.1)
adom-wiki 1.8.33 · adom/core 4.15.3 · adom/kicad-board-audit 1.0.1 · ah 1.0.772 · Hydrogen local workspace (WSL2, Ubuntu 24.04.4) on Windows 11
What I did
adom-wiki pkg install adom/kicad-board-audit
What I expected
The skill in ~/.claude/skills/kicad-board-audit/ with the files from the tarball.
What happened
The install reports success and adom-wiki pkg verify adom/kicad-board-audit passes, but three files are empty: in the package folder, in ~/.claude/skills and in the ~/.codex/skills mirror.
| File | In the tarball | After install |
|---|---|---|
| SKILL.md | 6706 bytes | 0 bytes |
| docs/HERO.md | 640 bytes | 0 bytes |
| assets/kicad_netlist.py | 3565 bytes | 0 bytes |
| README.md, package.json, install.sh, uninstall.sh | 2028, 1571, 245, 84 bytes | unchanged |
The output:
installed: ~/.claude/skills/kicad-board-audit -> /home/adom/project/adom_modules/adom/kicad-board-audit
1 package(s) installed. (run: adom-wiki pkg list)
hint [SKILLS_DELIVERED]: adom/kicad-board-audit installed 1 skill(s) to ~/.claude/skills: kicad-board-audit
hint [SKILLS_ADOPTED]: 1 skill(s) were already in place byte-identical (the package's install script put them there); recorded as delivered so upgrades and uninstall manage them: kicad-board-audit
hint [SKILLS_MIRRORED_CODEX]: 1 skill(s) mirrored to ~/.codex/skills (Codex reads the same SKILL.md format; the ~/.claude tree stays canonical)
The skill then loads with no instructions, and its netlist script is empty. It happened on the first install and again on a clean pkg uninstall and pkg install.
Cause, as far as I can tell
- The package's
install.shlinks the skill folder to the package folder:ln -sfn "$PWD" "$HOME/.claude/skills/kicad-board-audit". - Skill delivery then copies the skill's files (SKILL.md, docs/, assets/) from the package folder to
~/.claude/skills/kicad-board-audit/. Through the link, source and destination are the same file, so opening the destination for writing empties the source before it is read. SKILLS_ADOPTEDthen finds the files "byte-identical". They are: each is one empty file compared with itself.
The files that keep their content are the ones outside SKILL.md, docs/ and assets/, which fits.
Without the script the install is correct: after adom-wiki pkg install --ignore-scripts adom/kicad-board-audit, the three files have 6706, 640 and 3565 bytes in all three places, and ~/.claude/skills/kicad-board-audit is a real folder.
Suggested fix
- In skill delivery, skip the copy when source and destination resolve to the same file (canonical path, or device and inode), or write to a temporary file and rename it.
- adom/kicad-board-audit 1.0.1 can drop
install.shanduninstall.sh, since the CLI delivers the skill itself. - I have not looked for other packages whose install script links their folder into
~/.claude/skills; they would presumably lose their files the same way. A publish lint could catch that.
I filed this here because the files are emptied by the CLI. The package that triggers it, adom/kicad-board-audit, has no issue for it.