Stats
Actions
Tags
From sync-repo
Use when syncing the current project to all git remotes (push/pull). Triggers on: user asks to push code, pull updates, sync repo, commit and push, or any mention of git remote sync. Works with all remotes configured in the current project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sync-repo:sync-repoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
将当前工程变更同步到所有已配置的 git 远程仓库。
将当前工程变更同步到所有已配置的 git 远程仓库。
git status --short 判断是否有变更--force)、禁止跳过钩子(--no-verify)git remote 列表,逐一推送;任一远程失败不阻塞另一个.env、credentials 等跳过并警告运行提交推送脚本:
# Linux / macOS / Git Bash (Windows)
bash ${CLAUDE_PLUGIN_ROOT}/skills/sync-repo/scripts/git-commit-push.sh "<commit_message>" "<repo_path>"
# Windows CMD
${CLAUDE_PLUGIN_ROOT}\skills\sync-repo\scripts\git-commit-push.bat "<commit_message>" "<repo_path>"
脚本流程:
git status --short 检查变更git add -A + git commitgit push <remote> <branch>git rebase --abort,记录失败,继续下一个 remote运行拉取脚本:
# Linux / macOS / Git Bash (Windows)
bash ${CLAUDE_PLUGIN_ROOT}/skills/sync-repo/scripts/git-pull-all.sh "<repo_path>"
# Windows CMD
${CLAUDE_PLUGIN_ROOT}\skills\sync-repo\scripts\git-pull-all.bat "<repo_path>"
脚本流程:
git pull --rebase <remote> <branch>git rebase --abort,记录失败,继续下一个 remote询问用户:拉取还是推送?
| 场景 | 处理方式 |
|---|---|
| rebase 冲突 | 中止 rebase,记录失败,继续下一个 remote |
| 推送失败(auth/网络) | 记录到汇总表,继续推下一个 remote |
| 所有远程都失败 | 汇总后提示用户检查网络/凭据 |
| 敏感文件检测 | 跳过并警告 |
| 脚本 | 用途 |
|---|---|
scripts/git-commit-push.sh | 提交 + 推送到所有远程(Bash) |
scripts/git-commit-push.bat | 提交 + 推送到所有远程(Windows CMD) |
scripts/git-pull-all.sh | 从所有远程拉取(Bash) |
scripts/git-pull-all.bat | 从所有远程拉取(Windows CMD) |
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 arialyy/ai-agents --plugin sync-repo