一键导入
git-sync
Synchronize local default branch with remote, ensuring up-to-date base for worktrees.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Synchronize local default branch with remote, ensuring up-to-date base for worktrees.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a versioned release of claudecode_webui — bump version fields, update CHANGELOG.md, tag the commit, push, and create the GitHub Release.
Project-specific build process for the Builder workflow. Builds frontend assets for claudecode_webui.
Navigate to the Claude Code WebUI application, verify it loads, and optionally select a project and/or session by name. Use when starting any UI test, opening the app, verifying the app is loaded, switching projects, or selecting sessions.
Detect and respond to a permission prompt in the Claude Code WebUI. Use when approving or denying tool permissions, handling permission modals, responding to Claude asking for approval, or unblocking a paused session.
Create a new project in the Claude Code WebUI via the UI. Use when creating a project, adding a project, opening the new project modal, or testing project creation flow.
Delete a project via the Claude Code WebUI. Use when deleting a project, removing a project, testing project deletion, or cleaning up test projects.
| name | git-sync |
| description | Synchronize local default branch with remote, ensuring up-to-date base for worktrees. |
| allowed-tools | ["Bash(~/.claude/skills/git-sync/scripts/sync.sh:*)","Bash(git stash :*)","Bash(git restore :*)","Bash(git checkout :*)","Bash(git remote -v)"] |
Run the sync script. The script path is relative to this skill's directory:
~/.claude/skills/git-sync/scripts/sync.sh
To override the default branch (e.g. if auto-detection fails):
~/.claude/skills/git-sync/scripts/sync.sh --branch main
The script emits structured KEY=VALUE pairs on stdout. Key fields:
| Field | Meaning |
|---|---|
GIT_SYNC_STATUS | success or error |
DEFAULT_BRANCH | Detected default branch name |
ORIGINAL_BRANCH | Branch before sync started |
COMMITS_PULLED | Number of new commits pulled (on success) |
LATEST_COMMIT | Latest commit after sync (on success) |
ERROR_CODE | Error type (on failure) |
DETAILS | Error details (on failure) |
Report to the user:
Sync complete
- Default branch: <DEFAULT_BRANCH>
- Pulled <COMMITS_PULLED> new commit(s)
- Latest: <LATEST_COMMIT>
- Ready to create new worktrees
If COMMITS_PULLED=0, simply say the branch is already up to date.
ERROR_CODE=uncommitted_changes)The default branch has uncommitted changes, which is unexpected. Show the user the DETAILS field (modified files) and ask them to choose:
git stash push -m "Temp stash before sync", then re-run the sync scriptgit restore ., then re-run the sync scriptERROR_CODE=no_default_branch)The script could not determine the default branch automatically. Ask the user which branch to sync (typically main or master), then re-run with:
~/.claude/skills/git-sync/scripts/sync.sh --branch <user-specified-branch>
ERROR_CODE=ff_failed)The local default branch has diverged from remote. The output includes LOCAL_COMMITS and REMOTE_COMMITS showing what diverged. Present these to the user and ask them to choose:
git checkout <DEFAULT_BRANCH> && git reset --hard origin/<DEFAULT_BRANCH>, warn this discards local commitsgit checkout -b recover/<DEFAULT_BRANCH>-commits && git checkout <DEFAULT_BRANCH> && git reset --hard origin/<DEFAULT_BRANCH>After resolving, re-run the sync script to verify.
ERROR_CODE=fetch_failed)Network or remote issue. Report the error and suggest:
git remote -v