R

resolve-merge-conflicts

by @warpdotdevv
4.6(120)

Gitのマージコンフリクトを解決します。未解決のパス、コンフリクトの塊、コンパクトな差分のみを抽出し、ファイル全体を読み込むことなく処理を簡素化します。マージ、リベース、チェリーピック、スタッシュポップがコンフリクトで停止した場合や、ファイルにコンフリクトマーカーが含まれる場合に使用します。

gitmerge-conflictsversion-controldeveloper-toolscliGitHub
インストール方法
npx skills add https://github.com/warpdotdev/common-skills --skill resolve-merge-conflicts
compare_arrows

Before / After 効果比較

1 组
使用前

Gitマージコンフリクトを手動で解決する場合、ファイル全体を開き、行ごとに検索してコンフリクトを理解する必要があり、特にファイルが大きい場合やコンフリクトが多い場合に時間がかかり、エラーが発生しやすくなります。

使用後

コンフリクトパス、コンフリクトハンク、コンパクトな差分のみを抽出することで、開発者は問題を迅速に特定して解決でき、コンフリクトの理解と処理に必要な時間と労力を大幅に削減します。

SKILL.md

Resolve Merge Conflicts

Overview

Resolve conflicts without opening full files unless the compact view is insufficient. Start with a summary, then inspect one conflicted file at a time.

Workflow

  1. Start with a summary.
python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py

Use the summary to identify which files are unresolved, which index stages exist, and how many text hunks each file contains.

  1. Drill into one file.
python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py --file path/to/file

Prefer this over reading the whole file. The script prints only nearby context, the ours / base / theirs sections for each hunk, and a compact unified diff between ours and theirs.

  1. Resolve the file.
  • Take one side wholesale with git checkout --ours -- path/to/file or git checkout --theirs -- path/to/file when appropriate.
  • Otherwise edit the file directly and remove the conflict markers.
  • Read more of the file only if the compact output is not enough to decide the correct merge.
  1. Re-check unresolved files.
python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py
git diff --name-only --diff-filter=U
  1. Validate the resolution.
  • Ensure no unmerged paths remain.
  • Ensure no <<<<<<<, =======, or >>>>>>> markers remain in the resolved files.
  • Run targeted tests, builds, or linters for the touched area.
  • Stage the resolved files.

Commands

Summary only

python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py

Detailed view for one file

python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py --file path/to/file

Detailed view for all conflicted files

python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py --all

JSON output

python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py --file path/to/file --json

Tune output size

python3 .agents/skills/resolve-merge-conflicts/scripts/extract_conflict_context.py \
  --file path/to/file \
  --context 3 \
  --max-lines 60

Notes

  • Use the script before opening conflicted files directly.
  • Resolve one file at a time to keep context small.
  • Expect marker-based text conflicts and index-only conflicts such as add/add or modify/delete. The script summarizes both, and it falls back to index-stage previews when the worktree file has no conflict markers.

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数28.5K
評価4.6 / 5.0
バージョン
更新日2026年10月24日
比較事例1 件

ユーザー評価

4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%

この Skill を評価

0.0

対応プラットフォーム

🤖claude-code

タイムライン

作成2026年5月22日
最終更新2026年10月24日
🎁 Agent 知識カード
アンケート