gh-skills-sync
Use this skill when asked to update or synchronize GitHub-related skills:
gh-fix-cigh-fix-issuegh-prgh-pr-check
Read references/sync-behavior.md when you need details about source selection, backup behavior, or project-vs-global targeting.
Use When
- The user wants to refresh the local copy of the
gh-*automation skills. - The task is to check whether project and global copies are in sync.
- The user wants to pin synchronization to a specific upstream ref.
Do Not Use When
- The task is about editing
unity-cliskills in.claude-plugin/plugins/unity-cli/skills. - The request is to use a
gh-*skill rather than sync it.
Recommended Flow
- Run
--checkfirst when the user only asked for status or when the current state is unclear. - Decide whether to target project skills, global skills, or both.
- Run the sync command with any required
--ref. - Re-run
--checkafter changes and report what moved.
Command
Run from repository root:
scripts/sync-gh-skills.sh
Typical Options
# check only (no write)
scripts/sync-gh-skills.sh --check
# update project skills only
scripts/sync-gh-skills.sh --target project
# pin a specific ref
scripts/sync-gh-skills.sh --ref main
Examples
- "Check whether our local
gh-*skills are behind upstream." - "Update only the project copy of the GitHub automation skills."
- "Sync the
gh-*skills from a pinned upstream ref."
Behavior
- Default source repo:
akiojin/skills - Sync targets:
- Global:
${CODEX_HOME:-~/.codex}/skills - Project:
./.codex/skills
- Global:
- Existing destination skill directories are backed up under
.backup/gh-sync-<timestamp>/. - Fetch method is automatic:
- Prefer
skill-installerif available. - Fallback to
git sparse-checkoutso it also works in Claude Code environments.
- Prefer
Common Issues
- The wrong target was updated: use
--target projector the appropriate target selector before syncing. - The user only wanted a dry check: start with
--check. - Updated skills do not appear immediately: restart Codex or Claude Code after the sync.
- Use
scripts/sync-gh-skills.sh --checkafter any update to verify consistency.