Copy a SKILL.md into the working directory's .skills/<name>/ so Claude
Code discovers it, and write a CLAUDE.md pointing at all discovered skills
(unless one already exists).
The skill name is derived from the SKILL.md's parent directory name, matching
the reference helper (path.basename(path.dirname(skillPath))).
NOTE: this performs EAGER filesystem writes (mkdirSync + copyFileSync),
and copyFileSync CLOBBERS any existing same-named skill copy at
<workingDirectory>/.skills/<name>/SKILL.md. This assumes a trusted-fixture
setup (a test/scratch working directory), not an arbitrary user dir.
Copy a
SKILL.mdinto the working directory's.skills/<name>/so Claude Code discovers it, and write aCLAUDE.mdpointing at all discovered skills (unless one already exists).The skill name is derived from the SKILL.md's parent directory name, matching the reference helper (
path.basename(path.dirname(skillPath))).NOTE: this performs EAGER filesystem writes (
mkdirSync+copyFileSync), andcopyFileSyncCLOBBERS any existing same-named skill copy at<workingDirectory>/.skills/<name>/SKILL.md. This assumes a trusted-fixture setup (a test/scratch working directory), not an arbitrary user dir.