My Claude skills live in ~/.claude/skills, and I wanted them under git. What I didn’t want was a repo sitting inside ~/.claude itself. I wanted a normal repo at ~/skills that I could push to GitHub, while Claude kept loading the skills from ~/.claude/skills like nothing had changed.
The naive way is to keep the skills in ~/.claude/skills and manually copy each one over to ~/skills/ whenever the original folder changes. This is tedious and error prone.
We can instead automate this process using a symlink.
Symbolic link
A symlink (symbolic link) is just a special file whose content is a path string pointing somewhere else. When a program opens the symlink, the OS quietly follows that path and gives the program the file at the other end, as if the symlink had been the real thing all along.
For example, here find-skills is a symlink to the real folder at ../.agents/skills/find-skills:
papattaradaapithanangsiri@192 skills % ls -l find-skills
lrwxr-xr-x@ 1 papattaradaapithanangsiri staff 29 18 Jun 16:08 find-skills -> ../.agents/skills/find-skillsAnd here is how that symlink shows up once pushed to GitHub: a small file whose entire content is the path it points at.

So locally there is no real difference between reaching the content through the symlink and reaching it through the real file. Reading or editing either one lands on the same bytes. The difference only surfaces once git enters the picture. A symlink is just a file whose content is a path to another file, so that path string is all there is to commit (which is exactly what shows up on GitHub above). A repo full of those path stubs instead of actual skill content is not useful. Hence, the direction of the link setup locally matters.
The setup
Claude reads skills locally through the OS, so it does not care which side holds the real files: whichever side is the symlink, the OS resolves it and Claude lands on the real content either way. Git on the other hand does not dereference a symlink, it just commits that path string, so a symlinked folder ends up tracked as a single stub with nothing inside it. For git to track the actual skills, the real files have to sit directly in its working tree at ~/skills, which leaves the symlink to be the one on Claude’s side at ~/.claude/skills:
~/skills real files + .git
~/.claude/skills -> ~/skills
Because my original skills already lived in ~/.claude/skills, I need to move them out to the ~/skills directory first.
mv ~/.claude/skills ~/skills
ln -s ../skills ~/.claude/skillsThese commands move the real folder out to ~/skills, then put a symlink at the old ~/.claude/skills path. After this, ~/.claude/skills is no longer a real folder, it is a symlink pointing at the real content over in ~/skills.
Why the other way round does not work
Keeping the real files in ~/.claude/skills and making ~/skills the symlink, looks identical locally. But as mentioned, git would then commit ~/skills as a path stub rather than the skills themselves, so the repo would hold no real content.
Verify
After setting it up, we can confirm if the link actually points where expected. readlink is the quickest check, since it prints the target without trying to follow it:
papattaradaapithanangsiri@192 .claude % readlink skills
../skillsOnly the folder is the symlink, not the content inside
Listing what is inside ~/.claude/skills shows plain directories, not links:
papattaradaapithanangsiri@192 skills % pwd
/Users/papattaradaapithanangsiri/.claude/skills
papattaradaapithanangsiri@192 skills % ls -la
drwxr-xr-x 5 papattaradaapithanangsiri staff 160 9 Jun 11:10 dev-guide
drwxr-xr-x@ 3 papattaradaapithanangsiri staff 96 13 May 13:15 excalidrawOnly ~/.claude/skills itself is a symlink. When we look inside it, the OS has already followed the link to ~/skills, so everything we see from that point on is the real content living there. dev-guide and excalidraw are the actual folders in ~/skills, listed as ordinary directories, not links.