Skip to content
Agentmart
Submit a tool

git-fix-conflict

Git/GitHubのmerge、rebase、cherry-pick、revert、apply、PRなどで発生したコンフリクトを検出して解消するSkill。ユーザーが「コンフリクトを直して」「マージコンフリクトを解消して」のように依頼したら使うこと。

Skill by mjun0812

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying git-fix-conflict?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mjun0812-git-fix-conflict

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Git/GitHubのmerge、rebase、cherry-pick、revert、apply、PRなどで発生したコンフリクトを検出して解消するSkill。ユーザーが「コンフリクトを直して」「マージコンフリクトを解消して」のように依頼したら使うこと。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/git-fix-conflict

Tools it pre-approves 22

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Edit,
  • Write,
  • Bash(git:*),
  • Bash(gh:*),
  • Bash(cat:*),
  • Bash(ls:*),
  • Bash(bat:*),
  • Bash(eza:*),
  • Bash(grep:*),
  • Bash(rg:*),
  • Bash(head:*),
Show 10 more
  • Bash(tail:*),
  • Bash(jq:*),
  • Bash(test:*),
  • Bash(make:*),
  • Bash(npm:*),
  • Bash(pnpm:*),
  • Bash(yarn:*),
  • Bash(go:*),
  • Bash(cargo:*),
  • Bash(uv:*)

What's inside

Skill name
git-fix-conflict
Description
Git/GitHubのmerge、rebase、cherry-pick、revert、apply、PRなどで発生したコンフリクトを検出して解消するSkill。ユーザーが「コンフリクトを直して」「マージコンフリクトを解消して」のように依頼したら使うこと。
License
MIT
Allowed tools
Read,, Edit,, Write,, Bash(git:*),, Bash(gh:*),, Bash(cat:*),, Bash(ls:*),, Bash(bat:*),, Bash(eza:*),, Bash(grep:*),, Bash(rg:*),, Bash(head:*),, Bash(tail:*),, Bash(jq:*),, Bash(test:*),, Bash(make:*),, Bash(npm:*),, Bash(pnpm:*),, Bash(yarn:*),, Bash(go:*),, Bash(cargo:*),, Bash(uv:*)
Instructions
78 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (6)

  • README.md
  • README_ja.md
  • SKILL.md
  • openai.yaml · agents/
  • summary_template.md · references/
  • summary_template_ja.md · references/

SKILL.md (first lines)

# Resolve Git Conflicts

## Arguments

- `--dry-run`: 検出したコンフリクトファイル一覧と解消方針の提案のみを提示し、ファイル編集・`git add`・commit・pushを一切行わない

## タスク

0. **事前チェック**:
   - 現在のブランチ、Git状態、進行中の操作、未解決ファイルを確認する
   - 必要に応じて現在のPR情報を取得する
   - `git diff --name-only --diff-filter=U` で未解決ファイルを確認する
   - 未解決ファイルがある場合は、現在進行中の操作(merge / rebase / cherry-pick / revert / apply / am等)を解消対象にする
   - 未解決ファイルがなく、現在のブランチにPRがあり `mergeable == CONFLICTING` の場合は、PR base branchをmergeしてコンフリクト解消を開始する
   - 未解決ファイルがなく、PRのコンフリクトも検出されない場合は「コンフリクトは検出されませんでした」と報告して終了する

1. **出力言語の検出**:
   - PRがある場合はPRのタイトルと本文を分析して言語を検出する(例: 日本語、英語)
   - PRがない場合は、ユーザーの依頼言語とリポジトリ内の直近のコミットメッセージを参考にする
   - すべてのコミットメッセージと報告は検出された言語で記述する
   - 言語が曖昧な場合は英語をデフォルトとする

2. **最新の変更を取得**:
   - GitHub PRのコンフリクトを解消する場合のみ、originからfetchしてbase branchを特定する
   - すでにmerge / rebase / cherry-pick / revert / apply / amが進行中の場合は、新しいmergeやrebaseを開始しない

3. **コンフリクト解消の開始または継続**:
   - すでにコンフリクト中の場合は、その進行中の操作を継続して解消する
   - PRが `CONFLICTING` でまだコンフリクト中でない場合は、`git merge origin/<base-branch>` で開始する
     - ただし `--dry-run` 指定時はmergeを開始せず、`git merge-tree --write-tree --name-only HEAD origin/<base-branch>` でコンフリクトファイルを非破壊的に検出する(作業ツリーを変更しない)
   - rebase中のコンフリクトは解消対象に含める。ただし、新規にrebaseを開始しない

4. **コンフリクトファイルの特定と分析**:
   - コンフリクト一覧: `git diff --name-only --diff-filter=U`
   - 各ファイルのコンフリクト領域を表示

   `--dry-run` が指定された場合は、ここで検出したコンフリクトファイル一覧と解消方針の提案のみを提示し、ファイル編集・`git add`・commit・pushを一切行わず終了する。

5. **各コンフリクトの解消**:
   - 各コンフリクトファイルについて:
     - コンフリクトマーカー(`<<<<<<<`, `=======`, `>>>>>>>`)を表示
     - 両方のバージョンを分析:
       - **HEAD (ours)** と **theirs** が指す側は進行中の操作で入れ替わる。merge中はHEADが現在のブランチ、theirsがbase branch。rebase・cherry-pick中はHEADが適用先 (base側)、theirsが再適用中のcommit
     - 両側の変更意図を踏まえて解消を適用
     - 判断理由を説明(検出された言語で)

6. **解消済みとしてマーク**:
   - 解消したファイルをステージング: `git add <resolved-files>`
   - 進行中の操作に応じて完了処理を行う:
     - merge: 検出された言語でmerge commitを作成
     - rebase: `git rebase --continue`
     - cherry-pick: `git cherry-pick --continue`
     - revert: `git revert --continue`
     - am: `git am --continue`
     - apply: stagingまで行い、必要なcommitは状況に応じて作成する
   - merge commitのメッセージ例:
     - 英語: `merge: resolve conflicts with <base-branch>`
     - 日本語: `merge: <base-branch>とのコンフリクトを解消`

7. **テストの実行**:
   - リポジトリのテスト・lint・buildコマンドを実行し、解消後に問題がないことを確認する
   - 失敗した場合は該当するコンフリクトの解消内容を見直し、必要なら手順5からやり直す

8. **変更をプッシュ**:
   - PR branchへ反映する必要がある場合は `git push`
   - rebaseなどで履歴が書き換わっている場合は、push前にユーザーへ確認し、必要な場合のみ `git push --force-with-lease` を使う

9. **結果を返す**(検出された言語で):
   - English: [`references/summary_template.md`](references/summary_template.md)
   - Japanese: [`references/summary_template_ja.md`](references/summary_template_ja.md)

## 注意事項

- 複雑なコンフリクト(大きなファイル、アーキテクチャの変更)の場合は、コンフリクトを表示してユーザーに判断を求める
- 新規にrebaseを開始しない。rebase中のコンフリクトは解消して `git rebase --continue` する
- 履歴を書き換えるpushが必要な場合は、必ず事前にユーザーへ確認し、`--force` ではなく `--force-with-lease` を使用する

From mjun0812/skills, MIT.

More from mjun0812/skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Oct 17, 2026 (13 days ago)
Last release
Oct 22, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mjun0812

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get git-fix-conflict running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying git-fix-conflict?

CallGet help
Cite this page

git-fix-conflict skill. Agent Mart. https://agentmart.dev/skills/mjun0812-git-fix-conflict (last updated 2026-10-24)