Agent skill
resolve-merge-conflict
現在の branch を分岐元の最新に rebase するときに使う。まず rebase を実行し、止まった conflict を順番に解消して前に進める。長い事前調査を避けて、必要な file だけ見て片付けたいときに使う。
Install this agent skill to your Project
npx add-skill https://github.com/sushichan044/dotfiles/tree/main/.agents/skills/resolve-merge-conflict
SKILL.md
resolve-merge-conflict
最初にやること
- branch の目的を 1-2 文で確認する
- rebase 先の branch を決める
- さっさと
git fetchとgit rebaseを実行する
手順
-
状態確認
bashgit status --short --branch -
base を更新して rebase 開始
bashgit fetch origin <base> git rebase origin/<base> -
止まったら conflict file を確認
bashgit diff --name-only --diff-filter=U -
簡単な file から解消
- formatter
- import order
- rename / move
- 機械的に両方載せられる変更
-
迷う file だけ 3-way を見る
bashgit show :1:path/to/file git show :2:path/to/file git show :3:path/to/file
:1:base:2:applying commit:3:rebased branch
-
解消したら追加して続行
bashgit add <files> git rebase --continue -
次の conflict が出たら繰り返す
generated file / lockfile
- source file を先に直す
- generated file は後回し
- lockfile は片方を採って前進し、rebase 後に再生成する
例:
git checkout --ours ui/pnpm-lock.yaml
git add ui/pnpm-lock.yaml
PR を見る条件
最初から見ない。必要なときだけ見る。
- base が曖昧
- branch の目的が commit だけでは読めない
- ユーザー確認前に背景が必要
gh pr view --json number,title,body,url,baseRefName,headRefName
gh pr diff --name-only
ユーザー確認が必要なケース
- どちらの仕様を採るか決めきれない
- API / UI の最終挙動が二者択一
- config / migration / security 影響がある
確認は短く聞く。
`path/to/file` で conflict しています。
branch 側は <change>、base 側は <change> です。
推奨は <resolution> です。これで進めてよいですか?
完了後
git push --force-with-lease origin HEAD
報告すること:
- どこに rebase したか
- conflict をどう解いたか
- ユーザー確認が必要だった件数
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
terraform-style-guide
Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.
fix-github-actions-ci
GitHub Actions CI の失敗を調査して修正するためのスキルです。CI ログを分析して失敗箇所・原因を特定し、そのまま修正作業まで行います。
dd-logs
Log management - search, pipelines, archives, and cost control.
golang-safety
Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use whenever writing or reviewing Go code that involves nil-prone types (pointers, interfaces, maps, slices, channels), numeric conversions, resource lifecycle (defer in loops), or defensive copying. Also triggers on questions about nil panics, append aliasing, map concurrent access, float comparison, or zero-value design.
golang-data-structures
Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.
smart-compact
セッションのコンテキストを分析し、重要な情報を保持するためのプロンプトを生成して /compact コマンドの実行を支援するスキル。コンテキストウィンドウが逼迫してきた時や、セッションを整理したい時に使用。
Didn't find tool you were looking for?