Skill Sync Manager
Use this skill to manage custom Skill upload and pull workflows for ~/.codex/skills or another user-specified skills directory. Treat this as repository maintenance: inspect first, protect system files, then run the smallest needed Git operation.
Default Targets
- Default skills directory:
~/.codex/skills.
- Custom skills are normal child directories such as
project_maintainer/ or skill-sync-manager/.
- Exclude system-managed and generated content by default:
.system/
*.zip
__pycache__/
.DS_Store
.env
- credential, token, key, and secret files
Start Protocol
- Identify the requested action: audit, initialize repo, connect remote, pull, push, package zip, repair conflict, or explain setup.
- Resolve the skills directory. Use
~/.codex/skills unless the user names another path.
- Run
scripts/audit_skill_repo.py or equivalent checks before changing anything.
- Report the current state briefly: repo status, remote, branch, custom skills found, risky tracked files, and blockers.
- Ask before destructive or identity-changing actions, including deleting files, overwriting local changes, force pushing, changing remotes, or rewriting history.
Common Workflows
Read references/git-workflows.md when performing a Git workflow or when exact commands are needed.
Initialize GitHub Sync
Use when the skills directory is not a Git repo or has no remote.
- Ensure
.gitignore protects .system/, generated archives, caches, and secrets.
- Initialize Git only if no repo exists.
- Stage only intended custom skill folders and
.gitignore.
- Commit with a concise message.
- Add the GitHub remote only after the user provides or confirms the URL.
- Pull/rebase or push according to whether the remote already has commits.
Pull Skills On Another Computer
Use when the user wants to sync down skills.
- Audit local changes first.
- If local changes exist, recommend committing or stashing before pulling.
- Pull with rebase for a linear history when appropriate.
- Re-run the audit and report new or changed skills.
Push Skill Changes
Use when the user wants to upload local skill edits.
- Audit first.
- Review
git status --short and avoid staging .system/, archives, caches, or secrets.
- Commit only intended files.
- Pull/rebase before push if the remote may have changed.
- Push to the configured branch.
Package A Skill
Use when the user needs an uploadable zip for one skill.
- Package the contents of the skill folder, not the parent folder unless the target platform requires otherwise.
- Do not include
.git/, caches, or generated archives.
- Validate the zip entries after packaging.
Safety Rules
- Never commit
.system/ unless the user explicitly insists after a warning.
- Never commit credentials,
.env, private keys, API keys, access tokens, or machine-local secrets.
- Never run
git reset --hard, git clean, force push, or delete conflict files without explicit user approval.
- Do not assume GitHub authentication is configured. If authentication fails, report the exact failure and suggest
gh auth login or credential setup.
- Prefer non-interactive Git commands.
Output Protocol
For every operation, give a short conclusion and evidence:
- 完成内容
- 当前状态
- 依据:关键命令结果或文件路径
- 下一步建议
If the environment cannot access the filesystem or Git, provide copyable command blocks for the user to run locally.
1---2name: skill-sync-manager3description: Manage local Codex or ChatGPT skill folders with Git and GitHub. Use when the user wants to initialize a skills repository, audit which skills are tracked, protect system or sensitive files, pull skill updates on another computer, commit skill changes, push skills to GitHub, package a skill zip, or resolve Git sync conflicts for ~/.codex/skills.4---56# Skill Sync Manager78Use this skill to manage custom Skill upload and pull workflows for `~/.codex/skills` or another user-specified skills directory. Treat this as repository maintenance: inspect first, protect system files, then run the smallest needed Git operation.910## Default Targets1112- Default skills directory: `~/.codex/skills`.13- Custom skills are normal child directories such as `project_maintainer/` or `skill-sync-manager/`.14- Exclude system-managed and generated content by default:15 - `.system/`16 - `*.zip`17 - `__pycache__/`18 - `.DS_Store`19 - `.env`20 - credential, token, key, and secret files2122## Start Protocol23241. Identify the requested action: audit, initialize repo, connect remote, pull, push, package zip, repair conflict, or explain setup.252. Resolve the skills directory. Use `~/.codex/skills` unless the user names another path.263. Run `scripts/audit_skill_repo.py` or equivalent checks before changing anything.274. Report the current state briefly: repo status, remote, branch, custom skills found, risky tracked files, and blockers.285. Ask before destructive or identity-changing actions, including deleting files, overwriting local changes, force pushing, changing remotes, or rewriting history.2930## Common Workflows3132Read `references/git-workflows.md` when performing a Git workflow or when exact commands are needed.3334### Initialize GitHub Sync3536Use when the skills directory is not a Git repo or has no remote.37381. Ensure `.gitignore` protects `.system/`, generated archives, caches, and secrets.392. Initialize Git only if no repo exists.403. Stage only intended custom skill folders and `.gitignore`.414. Commit with a concise message.425. Add the GitHub remote only after the user provides or confirms the URL.436. Pull/rebase or push according to whether the remote already has commits.4445### Pull Skills On Another Computer4647Use when the user wants to sync down skills.48491. Audit local changes first.502. If local changes exist, recommend committing or stashing before pulling.513. Pull with rebase for a linear history when appropriate.524. Re-run the audit and report new or changed skills.5354### Push Skill Changes5556Use when the user wants to upload local skill edits.57581. Audit first.592. Review `git status --short` and avoid staging `.system/`, archives, caches, or secrets.603. Commit only intended files.614. Pull/rebase before push if the remote may have changed.625. Push to the configured branch.6364### Package A Skill6566Use when the user needs an uploadable zip for one skill.67681. Package the contents of the skill folder, not the parent folder unless the target platform requires otherwise.692. Do not include `.git/`, caches, or generated archives.703. Validate the zip entries after packaging.7172## Safety Rules7374- Never commit `.system/` unless the user explicitly insists after a warning.75- Never commit credentials, `.env`, private keys, API keys, access tokens, or machine-local secrets.76- Never run `git reset --hard`, `git clean`, force push, or delete conflict files without explicit user approval.77- Do not assume GitHub authentication is configured. If authentication fails, report the exact failure and suggest `gh auth login` or credential setup.78- Prefer non-interactive Git commands.7980## Output Protocol8182For every operation, give a short conclusion and evidence:8384- 完成内容85- 当前状态86- 依据:关键命令结果或文件路径87- 下一步建议8889If the environment cannot access the filesystem or Git, provide copyable command blocks for the user to run locally.