link-claude-skills
Skill0 starsChanged 5 months agoMITView on GitHub
Link a git-tracked skills repo folder with the user's ~/.claude/skills directory (either direction), so skills can be version-controlled. Use when the user wants to link, symlink, or junction their .claude/skills folder to/from a repo, or asks to set up skill version control. Works on Windows and Linux (including Raspberry Pi 4).
- Deletes or force-pushes
In this repository57 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-mattSkill
- cast-memberSkill
- check-feedbackSkill
- codebase-designSkill
- content-pipeline-initSkill
- content-pipelineSkill
- data-analystSkill
- decision-mappingSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- draft-asset-promptsSkill
- edit-articleSkill
- fableSkill
- game-concept-interviewSkill
- git-guardrails-claude-codeSkill
- global-guidelinesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- improve-codebase-architectureSkill
- karpathy-guidelinesSkill
- launch-sessionSkill
- lesson-reviewSkill
- loop-meSkill
- migrate-to-shoehornSkill
- obsidian-vaultSkill
- opusSkill
- prototypeSkill
- publish-metadataSkill
- resolving-merge-conflictsSkill
- retrieve-lessonsSkill
- reviewSkill
- rotate-sessionSkill
- run-buildSkill
- run-clipsSkill
- scaffold-exercisesSkill
- session-sandboxSkill
- setup-matt-pocock-skillsSkill
- setup-pre-commitSkill
- setup-status-lineSkill
- showrunner-shortSkill
- sonnetSkill
- tddSkill
- teachSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- verify-outputsSkill
- wrap-allSkill
- wrapSkill
- writing-beatsSkill
- writing-fragmentsSkill
- writing-great-skillsSkill
- writing-shapeSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 40
If the link-side path is already a link pointing at the canonical path — done, report success, no changes needed.
- Very specific: line 42
If both sides are real directories with content — STOP.
- Distinctive: line 47
Ensure the canonical side is a real directory.
- Distinctive: line 50
Remove the link-side path if it exists (it'll be empty or a stale link at this point — safe to remove).
- Distinctive: line 52
Create the link at the link-side path, pointing at the canonical path.
- Distinctive: line 53
Verify: list both paths and confirm they report the same file count and the link resolves to the canonical target.
- Distinctive: line 96
No elevated privileges are needed on Linux for symlinks in the user's own home directory — this is the same on a Raspberry Pi 4 as any …
- Distinctive: line 101
Always run the inspection step first and show the user what you found before deleting or moving anything.
- Very specific: line 103
Never use rm -rf / Remove-Item -Recurse on a path until you've confirmed via ls -la / Get-Item that it's a link and not the real directory …
- Very specific: line 107
Default to repo-canonical when the goal is "version control my skills" — that's the direction that makes the repo the source of truth and …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Link Claude skills folder to a repo
Connects <user-home>/.claude/skills with a folder inside a git repo (e.g.
claude-skills), so the skills can be committed and versioned, while Claude
Code keeps reading them from the normal .claude/skills location.
One side holds the real files; the other side is a link to it. Never have both sides hold independent real content — that's how skills silently diverge.
Inputs
Ask or infer:
repo_path— path to the repo's skills folder (e.g.~/Repos/claude-skills).home_skills— the user's skills dir:~/.claude/skills(Linux/macOS/Pi4) or%USERPROFILE%\.claude\skills(Windows).direction:repo-canonical(default, recommended for version control): the repo folder holds the real files;.claude/skillsbecomes the link.home-canonical:.claude/skillsholds the real files; the repo folder becomes the link.
Detect the platform
- Windows: use PowerShell, junctions/symlinks via
New-Item. - Linux (including Raspberry Pi 4) or macOS: use
ln -s— plain symlinks, no elevated privileges needed either direction.
Algorithm (run this logic regardless of OS)
- Inspect both paths. For each, determine: doesn't exist / exists as a link already / exists as a real directory (and if so, whether it has content — check file counts, don't trust an empty-looking listing, some tools truncate output).
- If the link-side path is already a link pointing at the canonical path — done, report success, no changes needed.
- If both sides are real directories with content — STOP. Do not merge
or delete automatically. Report the conflict to the user and ask them
to reconcile (e.g.
diff -rqthe two, decide which wins) before re-running. - Otherwise:
- Ensure the canonical side is a real directory. If it doesn't exist yet but the link-side has the real content, move that content to the canonical path (don't copy-then-delete; move preserves it atomically).
- Remove the link-side path if it exists (it'll be empty or a stale link at this point — safe to remove).
- Create the link at the link-side path, pointing at the canonical path.
- Verify: list both paths and confirm they report the same file count and the link resolves to the canonical target.
Windows (PowerShell) commands
# Inspect
Get-Item <path> -Force | Select-Object LinkType, Target
(Get-ChildItem <path> -Force).Count
# Remove a junction/symlink itself (does NOT touch target contents)
(Get-Item <linkPath>).Delete()
# Move real content into place (only if canonical dir doesn't exist yet)
Move-Item <oldRealPath> <canonicalPath>
# Create the link — prefer Junction (works without admin/Developer Mode).
# Only try SymbolicLink if the user specifically wants a true symlink and
# has admin rights or Developer Mode enabled.
New-Item -ItemType Junction -Path <linkPath> -Target <canonicalPath>Junctions only work for local directories on the same machine (not UNC/ network paths) — that's fine for this use case.
Linux / Raspberry Pi 4 (bash) commands
# Inspect
ls -la <path> # check if it's a symlink (l...) and where it points
readlink -f <path>
find <path> -mindepth 1 | wc -l # real content count
# Remove a symlink itself (does NOT touch target contents)
rm <linkPath> # only if it's confirmed to be a symlink, not a real dir
# Move real content into place (only if canonical dir doesn't exist yet)
mv <oldRealPath> <canonicalPath>
# Create the link
ln -s <canonicalPath> <linkPath>No elevated privileges are needed on Linux for symlinks in the user's own home directory — this is the same on a Raspberry Pi 4 as any other Linux box.
Safety notes
- Always run the inspection step first and show the user what you found before deleting or moving anything.
- Never use
rm -rf/Remove-Item -Recurseon a path until you've confirmed vials -la/Get-Itemthat it's a link and not the real directory — deleting a symlink and deleting its target are very different operations. - Default to
repo-canonicalwhen the goal is "version control my skills" — that's the direction that makes the repo the source of truth and letsgit status/git logreflect real changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

