Agent SkillsasJEI/vscode › merge

merge

GitHub

将主题分支合并到基础分支。流程包括提交当前工作区变更、执行合并、处理冲突及验证结果。严格禁止强制推送或重写提交,冲突解决需用户确认,确保代码安全与一致性。

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

触发场景

用户希望将当前会话的工作成果合并回基础分支 需要将主题分支的更改集成到主工作区的基础分支中

安装

npx skills add asJEI/vscode --skill merge -g -y
更多选项

非标准路径

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

不安装直接使用

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

版本历史

  • ce4db66 当前 2026-07-19 08:58

同 Skill 集合

.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

元信息

文件数
0
版本
ce4db66
Hash
b2a83acd
收录时间
2026-07-19 08:58

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 20:54
浙ICP备14020137号-1 $访客地图$