Branch Merge Assistant
Safely merges session work from a topic branch back into its base branch.
The skill explicitly forbids unapproved force-pushes, skipped hooks, and rewriting or dropping commits, and asks the user when conflict resolution is uncertain. However, it directly commits uncommitted changes and runs a merge in the main worktree without general pre-execution confirmation, impact disclosure, or a rollback plan after success, so points are deducted. MIT licensing, Microsoft attribution, and repository provenance are traceable governance evidence only and do not resolve the authorization gaps.
The workflow covers status checking, merging, conflict listing, staging, committing, and post-merge validation, with some useful conflict feedback. However, it depends on an unavailable /commit skill, assumes a context-provided branch and worktree setup, lacks handling for general command failures, and provides no skill-specific test evidence. Because this is a static review without execution, the score is kept conservative.
The name, trigger description, and scenario are clear: merge a session topic branch back into its base branch. Boundary evidence is limited because the workflow assumes a supplied context block and a particular current/main worktree arrangement, without defining non-fit cases, permission prerequisites, or precise trigger exclusions. The function is local Git work and does not entirely depend on overseas services; Chinese users can use the commands, but the documentation is not localized.
The document is concise and organized into purpose, safeguards, workflow, conflict handling, and validation, with several explicit restrictions. Repository materials establish MIT licensing, Microsoft ownership, version information, and source location. The skill itself lacks installation or dependency notes, examples, FAQs, known limitations, changelog/versioning, and a clear maintenance or update path, so points are deducted.
The core objective and commands can support a normal merge, and the final checks validate a clean main worktree and ancestor relationship. However, automatic committing, dependence on the separate /commit skill, incomplete abnormal-case handling, and the absence of an expected result report reduce direct usability. Static reading cannot verify execution, so the score remains within the conservative effectiveness ceiling.
The commands, branch relationship, and validation conditions are auditable, and repository files corroborate basic licensing and governance claims. There is no skill-specific test suite, CI coverage, or third-party execution evidence; the supplied CI workflows do not cover the merge skill's key path. Static evidence therefore supports only a limited score.
- Before execution, explicitly confirm that current-worktree changes will be committed and verify the main worktree, source branch, and target branch.
- The referenced /commit skill is not included in the supplied material; failure behavior when that dependency is unavailable should be documented.
- Rollback after a successful merge, handling of non-conflict command failures, and a commit-content review step are unspecified.
What it does & when to use it
This skill merges a topic branch from the current worktree into the merge base branch in the main worktree. It first checks for uncommitted changes and invokes the /commit skill when needed. It then runs the Git merge and handles or reports conflicts. Afterward, it verifies that the main worktree is clean and that the topic branch is an ancestor of the resulting branch.
Checks the current worktree with Git status; invokes the /commit skill when uncommitted changes exist; runs git -C <main-worktree-path> merge <topic-branch>; lists conflicted files and stages resolved files; creates a merge commit when required; checks the main worktree status; and uses git merge-base --is-ancestor to verify that the topic branch was merged.
- A developer has finished work in an isolated topic worktree and needs to merge it into the main worktree.
- A contributor wants uncommitted changes handled before integrating a branch.
- A Git merge produces conflicts that need to be listed and resolved while preserving both sides' intent.
- A maintainer needs post-merge confirmation that the main worktree is clean and the topic branch is included.
Pros & cons
- Covers the full flow from commit checks through merging, conflict handling, and validation.
- Explicitly prohibits force-pushing, skipping push hooks, and rewriting or dropping commits without approval.
- Uses the main worktree path for the merge, fitting multi-worktree workflows.
- Requires Git, a main worktree path, and source and target branch context.
- The source provides no automated test suite or platform compatibility evidence.
- It pauses for user guidance when conflict resolution is uncertain.
- Installation and invocation methods for different clients are undocumented.
How to install
The source only identifies the skill file at src/vs/sessions/skills/merge/SKILL.md in the microsoft/vscode repository. It does not document a client-specific skills directory, installation command, or installation procedure.
How to use
Trigger the skill from the worktree containing the topic branch and provide the source branch, target branch, and main worktree path from the context. Example: "Merge this session's work back into the base branch." The source does not document the exact trigger mechanism.