From sync-my-skills
Sync and manage Claude Code skills across multiple machines using GitHub. Use this skill whenever the user says /my-skills, wants to sync skills between devices, back up their skills to GitHub, install skills from a remote repo, manage skill synchronization, or asks about sharing skills across machines. Trigger on phrases like 'sync my skills', 'push skills', 'pull skills', 'set up skill sync', 'list my remote skills'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sync-my-skills:my-skillsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sync Claude Code skills across multiple machines using a personal GitHub repository. Manages individual skill-level symlinks so the user's existing `~/.claude/skills/` directory stays intact.
Sync Claude Code skills across multiple machines using a personal GitHub repository. Manages individual skill-level symlinks so the user's existing ~/.claude/skills/ directory stays intact.
gh CLI installed and authenticated (gh auth status)git installed~/.my-skills.yml~/.my-skills-repo/The repo separates user-level and project-level skills:
~/.my-skills-repo/
├── user/ ← user level skills
│ ├── memo/SKILL.md
│ └── recap/SKILL.md
└── projects/ ← project level skills (by project name)
├── retrievo/
│ └── backend-init/SKILL.md
└── execute/
└── frontend-init/SKILL.md
Symlink paths:
~/.claude/skills/<skill> → ~/.my-skills-repo/user/<skill>{cwd}/.claude/skills/<skill> → ~/.my-skills-repo/projects/<project>/<skill>Parse the user's input to determine which command to run. The user will typically say /my-skills <command> [args].
setupInitial setup: connect to GitHub, create or clone the repo, and configure.
Steps:
Verify gh is installed and authenticated:
gh auth status
If not authenticated, tell the user to run ! gh auth login to authenticate.
Check if ~/.my-skills.yml already exists. If so, read it and ask if the user wants to reconfigure.
Ask the user for the repo name (default: my-skills). The repo will be created as private.
Check if the repo already exists on GitHub:
gh repo view <username>/my-skills --json name 2>/dev/null
If the repo exists, clone it:
git clone https://github.com/<username>/my-skills.git ~/.my-skills-repo
If it doesn't exist, create it:
gh repo create my-skills --private --description "My Claude Code skills" --clone --gitignore=""
Then move the cloned repo to ~/.my-skills-repo if needed. Create the directory structure:
mkdir -p ~/.my-skills-repo/user ~/.my-skills-repo/projects
Create ~/.my-skills.yml:
repo: <username>/my-skills
local_path: ~/.my-skills-repo
linked_skills: []
If the cloned repo already contains skills (from another machine), list them and ask which ones to link:
# User level skills
ls -d ~/.my-skills-repo/user/*/SKILL.md 2>/dev/null | sed 's|.*/user/\(.*\)/SKILL.md|\1|'
# Project level skills
find ~/.my-skills-repo/projects -name SKILL.md 2>/dev/null
For each selected user-level skill, create a symlink (see the Linking section below).
Report setup complete with a summary of what was configured.
pushPush local skills to the remote repo.
Usage:
/my-skills push — push all linked user-level skills/my-skills push <skill-name> — push a specific user-level skill/my-skills push <skill1> <skill2> — push multiple user-level skills/my-skills push <skill-name> --project (-p) — push a project-level skill (auto-detect project name from cwd, confirm with user)/my-skills push <skill-name> --project (-p) <project-name> — push a project-level skill to a specific project nameSteps:
Read ~/.my-skills.yml to get config. If not found, tell the user to run setup first.
Determine scope and source directory:
~/.claude/skills/, repo target is ~/.my-skills-repo/user/--project (-p)):
{cwd}/.claude/skills/basename $(git rev-parse --show-toplevel 2>/dev/null || pwd)~/.my-skills-repo/projects/<project-name>/If no skill names specified (user level only), push all currently linked skills:
linked_skills, changes are already in the repo directory via symlink. Just commit and push.If skill names are specified:
# User level
cp -r <source>/<skill-name> ~/.my-skills-repo/user/<skill-name>
# Project level
mkdir -p ~/.my-skills-repo/projects/<project-name>
cp -r <source>/<skill-name> ~/.my-skills-repo/projects/<project-name>/<skill-name>
linked_skills in ~/.my-skills.ymlCommit and push:
cd ~/.my-skills-repo
git add -A
git commit -m "Update skills: <skill-names>"
git push
Report which skills were pushed.
pullPull skills from the remote repo to this machine.
Usage:
/my-skills pull — pull all updates for linked user-level skills + show new ones/my-skills pull <skill-name> — pull and link a specific user-level skill/my-skills pull <skill1> <skill2> — pull and link multiple user-level skills/my-skills pull <skill-name> --project (-p) — show project list from repo, let user select, then pull/my-skills pull <skill-name> --project (-p) <project-name> — pull a project-level skill directlySteps:
Read ~/.my-skills.yml. If not found, tell the user to run setup first.
Pull latest from remote:
cd ~/.my-skills-repo
git pull
Determine scope and target directory:
~/.claude/skills/, repo source is ~/.my-skills-repo/user/--project (-p)):
{cwd}/.claude/skills/ls ~/.my-skills-repo/projects/
~/.my-skills-repo/projects/<project-name>/If no skill names specified (user level):
~/.my-skills-repo/user/ that aren't linked yet, and ask if the user wants to link themIf skill names are specified:
linked_skills in ~/.my-skills.ymlReport which skills were pulled/linked.
listShow status of all skills (local and remote), separated by scope.
Usage:
/my-skills list — show all user-level and project-level skills/my-skills list --project (-p) <project-name> — show skills for a specific project onlySteps:
Read ~/.my-skills.yml. If not found, tell the user to run setup first.
Pull latest repo info (fetch only, don't merge):
cd ~/.my-skills-repo
git fetch
Collect information (use bash -c '...' for complex shell scripts to avoid zsh compatibility issues):
~/.my-skills-repo/user/~/.claude/skills/ pointing to ~/.my-skills-repo/user/)~/.claude/skills/, not a symlink)~/.my-skills-repo/, e.g. plugin-installed skills)~/.my-skills-repo/projects/ (grouped by project name)When checking symlinks, strip trailing slashes from paths before using [ -L ]. Use readlink to determine the symlink target.
Display as a table with these status labels:
[linked] — symlink points to ~/.my-skills-repo/[remote] — exists in repo but not linked on this machine[local only] — exists locally but not in repo (regular directory, not a symlink)[other] — symlink pointing to somewhere else (e.g. plugin-installed)Repo: <username>/my-skills (private)
── User Level ──
[linked] memo Create study notes from conversations
[linked] recap Summarize session work
[local only] backend-init (no description)
[other] skill-creator Create and improve skills (via plugin)
── Project Level ──
retrievo/
[linked] backend-init Spring Boot + Kotlin DDD project init
[remote] claude-api Build apps with Claude API
To get skill descriptions, read each SKILL.md and extract the description from frontmatter.
If there are updates available (local behind remote), note them.
unlinkRemove symlink and restore original skill from backup.
Usage:
/my-skills unlink <skill-name> — unlink a user-level skill/my-skills unlink <skill1> <skill2> — unlink multiple skills/my-skills unlink <skill-name> --project (-p) — unlink a project-level skillSteps:
Read ~/.my-skills.yml. If not found, tell the user to run setup first.
For each skill:
~/.my-skills-repo/~/.my-skills-backup/<skill>, restore it:
mv ~/.my-skills-backup/<skill> <target>/<skill>
cp -r ~/.my-skills-repo/user/<skill> <target>/<skill>
linked_skills in ~/.my-skills.yml (for user-level)The skill remains in the repo — only the local symlink is removed. The skill becomes a standalone local copy.
Report which skills were unlinked.
When linking a skill, handle these cases carefully:
Skill exists in target as a regular directory (not yet linked):
~/.my-skills-backup/ (outside the skills directory to avoid being recognized as a skill):
mkdir -p ~/.my-skills-backup
mv <target>/<skill> ~/.my-skills-backup/<skill>
ln -s ~/.my-skills-repo/user/<skill> <target>/<skill>ln -s ~/.my-skills-repo/projects/<project>/<skill> <target>/<skill>~/.my-skills-backup/<skill>Skill already linked (symlink exists and points to repo):
Skill exists as a symlink to somewhere else:
Skill doesn't exist in target:
~/.my-skills.yml:
repo: kunsanglee/my-skills
local_path: ~/.my-skills-repo
linked_skills:
- memo
- recap
linked_skills tracks user-level linked skills only. Project-level links are determined by checking symlinks in the project's .claude/skills/ directory.
gh is not installed: "gh CLI is required. Install with: brew install gh"Communicate with the user in Korean (matching their preference), but keep technical terms (GitHub, symlink, push, pull, etc.) in English.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub kunsanglee/sync-my-skills --plugin sync-my-skills