Merge Command
Description
Finalize worktree work: update docs, commit, merge to main, clean up. **Context from user:** $ARGUMENTS ---
Installation
claude install-skill https://github.com/peterkrueck/Claude-Code-Development-Kit README
Merge Command
Finalize worktree work: update docs, commit, merge to main, clean up.
**Context from user:** $ARGUMENTS
Pre-flight
- undefined
Step 1: Update Documentation
Invoke the `/update-docs` skill, passing the branch changes as context. If no doc updates are needed, it will skip — that's fine.
Step 2: Commit Uncommitted Changes
Run `git status`. If there are uncommitted changes:
- undefined
If the working tree is clean, skip to Step 3.
Step 3: Merge to Main
**Critical: You cannot `git checkout main` inside a worktree** — main is checked out in the main repo. Use `git -C ` for all merge operations.
- undefined
Step 4: Clean Up Worktree
Only after a **successful** merge:
Use the `ExitWorktree` tool with:
- undefined
This is safe because all work is now on main. The tool warns about "unmerged commits" because it checks the worktree branch, not main — but the commits ARE on main after Step 3.
Step 5: Confirm
Report to user: what was merged (commit count + summary), and that we're back on main.
Related Skills
使用 Git Worktrees
创建孤立的 Git worktrees,带有智能目录选择与安全验证。
Git community Claude skills github
[Building agent skills blog](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
Git community #148
, [#161](https://github.com/affaan-m/everything-claude-code/pull/161))
Git community GitHub MCP
| Token | Repos, issues, PRs, workflows |
Git community GitHub MCP Server
Official first-party server to read repos, manage issues/PRs, and automate workflows.
Git community mcp-server-github
GitHub API integration for repos, issues, PRs.
Git community