Track lessons
Claude Code & Terminal Agents
0 of 4 completed
- Create and Test a Custom Claude Code Skill
- Share Claude Code Skills Across Repositories with Symlinks
- Structure CLAUDE.md So Claude Code Gets the Right Context
- Configure Specialized Subagents in Claude Code
Other tracks
Share Claude Code Skills Across Repositories with Symlinks
Copying the same skill into several repositories creates versions that drift. A symbolic link keeps one real folder and exposes it wherever Claude Code expects to discover the skill.
When to use
- Maintain personal skills in one versioned repository.
- Test one skill across several codebases without copying updates.
- Expose a shared skill personally or only inside selected projects.
Example
Keep code-reviewer in ~/dev/skills, then link it into two client repositories. Editing the source updates both immediately.
TL;DR
Keep skills in one folder; link them where you need them.
ln -s ~/dev/skills/code-reviewer .claude/skills/code-reviewerSteps
- 1
Make a single source folder (ideally its own git repo)
Create one home for the canonical skill files. A dedicated Git repository also gives you history and sharing.
bashmkdir -p ~/dev/skills && cd ~/dev/skills && git init - 2
Use them everywhere: link into your personal skills
Link the source folder into your personal Claude skills directory when it should be available in every project.
bashmkdir -p ~/.claude/skills ln -s ~/dev/skills/code-reviewer ~/.claude/skills/code-reviewer - 3
Or only in one repo
Create a project-level link instead when the skill is relevant only to the current repository.
bashmkdir -p .claude/skills ln -s ~/dev/skills/code-reviewer .claude/skills/code-reviewer - 4
Windows (PowerShell, Developer Mode or admin)
On Windows, create the equivalent directory link from PowerShell; symbolic-link permission may require Developer Mode or an elevated shell.
PowerShellNew-Item -ItemType SymbolicLink -Path .claude\skills\code-reviewer -Target $HOME\dev\skills\code-reviewer - 5
Check the link
Confirm the destination appears as a link and points at the expected source before opening a new Claude Code session.
bashls -la .claude/skills
Gotchas
- A committed symlink to your home folder breaks for teammates; add it to .gitignore or commit a real copy.
- Use absolute targets so links survive moving the repo.
- Restart the Claude Code session if a new skill does not appear.
- Skill names must be unique across personal and project folders.
Cheat sheet
| ln -s <target> <link> | Create symlink (macOS/Linux) |
| New-Item -ItemType SymbolicLink | Create symlink (Windows) |
| readlink <link> | Show link target |
| rm <link> | Remove link, keep source |
Related
Sources
Reviewing agent output? CodeCrab reviews pull requests locally with your own AI tools.
