agent-merge-conflict-arbiter
Skill này làm gì
Skill nhờ một agent trung lập xem xét thay đổi của cả hai bên cùng mục tiêu họ đã nêu, để tạo ra kết quả merge. Dành cho nhóm chạy nhiều agent song song trên một repository.
Khi nào nên dùng
- ✓Khi hai nhánh agent xung đột trong một chiến dịch chạy song song.
- ✓Khi một lần git merge dừng lại vì hai agent cùng thay đổi một đoạn mã.
- ✓Khi không agent nào nên tự quyết định kết quả của một xung đột.
Liên kết skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/agent-merge-conflict-arbiter/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hai agent của chúng tôi đã sửa cùng các tệp và merge bị dừng. Hãy giải quyết xung đột một cách trung lập và merge công việc.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xem xét cả hai diff và ý định đã nêu của từng bên, rồi tạo ra một phiên bản đã merge. Nó chạy build hoặc kiểm thử của dự án nếu chúng có sẵn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Agent Merge-Conflict Arbiter
Resolve a git merge conflict between two AGENTS' branches as an impartial third party. Agents resolving conflicts against a peer's work reliably either overwrite the peer or abandon their own change — they lack the peer's context and are biased toward their own side. This skill is the fix: a neutral reconciler that receives both diffs plus both sides' stated intents and produces a merged result, like a merge-queue arbiter.
When to Use
- Two agent branches/worktrees collide during a parallel campaign (kanban engineering pipeline, parallel-PR wave, multi-worktree refactor).
git mergeorgit rebasehalts on conflicts between two agents' work and neither original agent should self-adjudicate.- Do NOT use for conflicts within a single agent's own work, or for trivial lockfile/generated-file conflicts (regenerate those instead).
Prerequisites
- A repo checkout containing the halted merge, or the two branch names plus permission to run the merge yourself.
- Both sides' intent sources: kanban completion summaries (
terminalrunninghermes kanban show <task-id>), PR bodies, or at minimum each branch's commit messages. - The project's build/test command, if one exists.
How to Run
Standalone — a human (or agent) invokes this skill inside the conflicted repo: load the skill, then follow the Procedure top to bottom.
Spawned neutral agent — the preferred shape in multi-agent campaigns:
delegate_task: spawn a subagent whose task message contains the repo path, both branch names, and both sides' intent summaries verbatim, plus an instruction to follow this skill.- Kanban-native: create a reconciliation card assigned to a third profile
(not either worker's profile) with BOTH conflicted cards linked as parents —
kanban_create(title="reconcile branch-a x branch-b", assignee="reconciler", parents=["t_a", "t_b"]). The parent links carry both sides' completion summaries into the reconciler's context automatically; the card body should name the repo path and the two branches.
Quick Reference
| Hunk class | Definition | Resolution |
|---|---|---|
| disjoint-intent | The two changes serve different goals and can coexist | Combine both |
| same-question-different-answer | Both sides answered one design question differently | Pick ONE per stated intents; surface the decision |
| superseded | One side's premise no longer holds after the other's change | Keep the surviving side; note why |
Impartiality contract: never favor the side that spawned you; touch ONLY conflicted regions (no drive-by edits); every design-question pick must appear explicitly in the hand-back summary.
Procedure
1. Gather both sides
- Run via
terminal:git status(confirm the conflicted state and list conflicted files),git merge-base <A> <B>, then for each sidegit log --oneline <base>..<side>andgit diff <base>..<side> -- <file>for every conflicted file. In a halted merge,HEADis one side andMERGE_HEADis the other. - Collect each side's intent:
hermes kanban show <task-id>for completion summaries/metadata, or the PR body, or the commit messages from the log above. Write down one sentence of intent per side before touching any file. - Done when: you can state both intents in your own words and have both diffs for every conflicted file.
2. Classify every conflicted hunk
- Open each conflicted file with
read_fileand locate each<<<<<<</=======/>>>>>>>block. - Assign each hunk exactly one class from the Quick Reference table, judging by the stated intents — not by which change looks nicer.
- If a single hunk contains multiple independent decisions (e.g., new logic that combines cleanly PLUS a styling/rounding choice both sides answered differently), decompose it into sub-decisions and classify each one.
- A single file often mixes classes: one hunk may be a design collision while a neighboring hunk is disjoint. Classify per hunk, not per file.
- Done when: every hunk has a written class and a one-line rationale.
3. Resolve under the impartiality contract
- Edit each hunk with
patch(orwrite_filefor whole-file rewrites):- disjoint-intent → merge both changes so each intent is fully served.
- same-question-different-answer → pick the answer that best serves the STATED intents (e.g., an intent of "strict validation" beats "quick default" if the task required correctness). Ne
Câu hỏi thường gặp
Khi nào tôi không nên dùng nó?
Với xung đột trong công việc của chính một agent, hoặc với các tệp sinh tự động tầm thường như lockfile, nên tái tạo lại chúng thay vì dùng skill này.
Nó cần gì để bắt đầu?
Một repo đang có merge bị dừng, hoặc tên hai nhánh, cùng ý định của mỗi bên từ thông điệp commit hoặc ghi chú pull request.
Tại sao dùng một agent trung lập?
Skill nói các agent tự giải quyết xung đột với công việc của đồng cấp thường ghi đè lên đối phương hoặc bỏ đi thay đổi của chính mình.
Chi tiết
Mô tả gốc của tác giả
Neutral arbiter for merge conflicts between two agents.
Độ phổ biến
- Sao GitHub
- 260k
- Vị trí xếp hạng
- #438
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
antigravity-cli
260kHướng dẫn bạn cài đặt, cập nhật và khắc phục sự cố công cụ dòng lệnh Antigravity, gồm plugin, đăng nhập và sandbox.
blackbox
260kCho phép agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Blackbox AI, công cụ chạy nhiều mô hình và chọn kết quả tốt nhất.
dynamic-workflow
260kDạy agent của bạn chạy các đợt công việc tương tự lớn như một script đã lưu, để chỉ kết quả đã kiểm chứng mới quay về cuộc trò chuyện chính.
grok
260kCho phép agent của bạn giao việc lập trình cho Grok Build CLI của xAI, để xây tính năng, tái cấu trúc, rà soát pull request hoặc sửa issue hàng loạt.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.