Agent SkillsasJEI/vscode › merge

merge

GitHub

将主题分支合并到基础分支,处理未提交变更、执行合并操作及冲突解决,确保工作区干净并验证提交完整性。

src/vs/sessions/skills/merge/SKILL.md asJEI/vscode

Trigger Scenarios

用户希望将当前会话的工作合并回基础分支 需要执行 Git 分支合并操作

Install

npx skills add asJEI/vscode --skill merge -g -y
More Options

Non-standard path

npx skills add https://github.com/asJEI/vscode/tree/main/src/vs/sessions/skills/merge -g -y

Use without installing

npx skills use asJEI/vscode@merge

指定 Agent (Claude Code)

npx skills add asJEI/vscode --skill merge -a claude-code -g -y

安装 repo 全部 skill

npx skills add asJEI/vscode --all -g -y

预览 repo 内 skill

npx skills add asJEI/vscode --list

SKILL.md

Frontmatter
{
    "name": "merge",
    "description": "Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch."
}

Merge Changes

Merge the topic branch (checked out in the current worktree) into the merge base branch (checked out in the main worktree). The context block appended to the prompt contains the source branch, target branch, and main worktree path.

Guidelines

  • Never force-push (--force, --force-with-lease) without explicit user approval.
  • Never skip pre-push hooks (do not use --no-verify).
  • Never rewrite or drop commits without asking the user.
  • When in doubt about conflict resolution — ask the user.

Workflow

1. Commit uncommitted changes in the current worktree

Check for uncommitted changes in the current worktree:

git status --porcelain

If there are uncommitted changes, use the /commit skill to commit them before continuing.

2. Merge the topic branch into the base branch

Use git -C <main-worktree-path> to run commands against the main worktree without leaving the current worktree.

git -C <main-worktree-path> merge <topic-branch>

3. Handle merge conflicts

If the merge reports conflicts:

3.1. List conflicted files:

git -C <main-worktree-path> diff --name-only --diff-filter=U

3.2. For each conflicted file, read the file content, resolve the conflict by preserving the intent of both sides, and stage the resolved file:

git -C <main-worktree-path> add <resolved-file>

3.3. When in doubt on how to resolve a merge conflict, ask the user for guidance. If the user wants to abort, run:

git -C <main-worktree-path> merge --abort

3.4. Once all conflicts are resolved and staged, commit the merge:

git -C <main-worktree-path> commit --no-edit

Validation

After the merge completes, verify the result:

  1. Confirm the main worktree is clean:
git -C <main-worktree-path> status --porcelain
  1. Confirm the topic branch is an ancestor of the base branch (i.e. all commits are merged):
git -C <main-worktree-path> merge-base --is-ancestor <topic-branch> HEAD

Version History

  • ce4db66 Current 2026-07-19 08:58

Same Skill Collection

.agents/skills/launch/SKILL.md
.github/skills/accessibility/SKILL.md
.github/skills/add-policy/SKILL.md
.github/skills/agent-host-e2e-tests/SKILL.md
.github/skills/agent-host-logs/SKILL.md
.github/skills/author-contributions/SKILL.md
.github/skills/auto-perf-optimize/SKILL.md
.github/skills/azure-pipelines/SKILL.md
.github/skills/chat-customizations-editor/SKILL.md
.github/skills/chat-perf/SKILL.md
.github/skills/code-oss-logs/SKILL.md
.github/skills/component-fixtures/SKILL.md
.github/skills/cpu-profile-analysis/SKILL.md
.github/skills/design-philosophy/SKILL.md
.github/skills/fix-ci-failures/SKILL.md
.github/skills/fix-errors/SKILL.md
.github/skills/heap-snapshot-analysis/SKILL.md
.github/skills/hygiene/SKILL.md
.github/skills/integrated-browser/SKILL.md
.github/skills/integration-tests/SKILL.md
.github/skills/memory-leak-audit/SKILL.md
.github/skills/otel/SKILL.md
.github/skills/sessions/SKILL.md
.github/skills/smoke-tests/SKILL.md
.github/skills/symbolicate-crash-dump/SKILL.md
.github/skills/tool-rename-deprecation/SKILL.md
.github/skills/unit-tests/SKILL.md
.github/skills/update-screenshots/SKILL.md
.github/skills/ux-css-layout/SKILL.md
.github/skills/ux-theming/SKILL.md
.github/skills/vscode-dev-workbench/SKILL.md
extensions/copilot/.agents/skills/anthropic-sdk-upgrader/SKILL.md
extensions/copilot/.agents/skills/launch/SKILL.md
src/vs/sessions/skills/act-on-feedback/SKILL.md
src/vs/sessions/skills/code-review/SKILL.md
src/vs/sessions/skills/commit/SKILL.md
src/vs/sessions/skills/create-draft-pr/SKILL.md
src/vs/sessions/skills/create-pr/SKILL.md
src/vs/sessions/skills/fix-ci/SKILL.md
src/vs/sessions/skills/generate-run-commands/SKILL.md
src/vs/sessions/skills/sync-upstream/SKILL.md
src/vs/sessions/skills/sync/SKILL.md
src/vs/sessions/skills/troubleshoot/SKILL.md
src/vs/sessions/skills/update-pr/SKILL.md
src/vs/sessions/skills/update-skills/SKILL.md
extensions/copilot/.agents/skills/github-copilot-upgrader/SKILL.md

Metadata

Files
0
Version
ce4db66
Hash
b2a83acd
Indexed
2026-07-19 08:58

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 04:25
浙ICP备14020137号-1 $Гость$