skill-exporter
Export a specific skill from ~/.claude/skills/ into a versioned git repository. Use when the user says "export skill X", "move skill to repo", "back up skill", "save skill to repo", "version this skil
Files1
View on GitHubSKILL.mdskills/skill-exporter/SKILL.md
GitHubSkill Exporter
Copy a skill from ~/.claude/skills/ into the skills/ directory of a git repo, then replace the local copy with a symlink. The skill keeps working in Claude Code while the source of truth moves to version control.
Find the target repo
- Check if CWD is inside a git repo with a
skills/directory at its root. - Search:
find ~ -maxdepth 4 -type d -name skills -path "*/.git/../skills" 2>/dev/null— confirm with user. - If nothing found, ask the user for the path.
Export
The user names the skill to export (e.g. "export my codex skill"). If the name is ambiguous, list real directories (not symlinks) in ~/.claude/skills/ to disambiguate — symlinks are already exported.
Then:
- Copy
~/.claude/skills/<skill-name>/to$REPO/skills/<skill-name>/.- If it already exists in the repo, show a diff (
diff -rq) and ask: overwrite or skip?
- If it already exists in the repo, show a diff (
- Verify the copy succeeded —
$REPO/skills/<skill-name>/SKILL.mdmust exist. - Symlink back — replace the local directory so the skill stays discoverable but lives in git:
rm -rf ~/.claude/skills/<skill-name> ln -s $REPO/skills/<skill-name> ~/.claude/skills/<skill-name> - Verify the symlink resolves and SKILL.md is readable through it.
- Remind the user to commit the new skill in the repo.