resolve
Detects in-progress git operations and guides the user through conflict resolution to finish the process.
Install
mkdir -p .claude/skills/resolve && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11288" && unzip -o skill.zip -d .claude/skills/resolve && rm skill.zipInstalls to .claude/skills/resolve
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Finish an in-progress git operation that stopped on merge conflicts: a Graphite (gt) restack, a plain git rebase, or a merge. Detects which one is underway, resolves the conflicts (asking when the right resolution is unclear), and runs the correct continue command until the operation completes. Use when the user says /resolve, "finish this rebase", "continue the restack", "fix these merge conflicts", or similar.Key capabilities
- →Detect the type of in-progress git operation (restack, rebase, merge)
- →List and resolve merge conflicts in files
- →Continue the git operation after conflict resolution
- →Verify the repository state after completion
- →Report on the finished operation and conflict resolutions
How it works
The skill identifies the current git operation, lists conflicted files, resolves conflicts by asking the user when unclear, and then executes the appropriate git continue command.
Inputs & outputs
When to use resolve
- →Finish a stalled git rebase
- →Resolve merge conflicts during a Graphite restack
- →Complete a standard git merge
About this skill
resolve
Finish whatever conflicted git operation is currently in progress. Detect what it is, resolve the conflicts, and drive the operation to completion.
Scope — current operation only. Resolve only the conflicts the in-progress
operation has surfaced. Never reorder branches/PRs in a gt stack or add new
ones to it (no gt move, gt reorder, gt create, etc.). Don't go looking
for other gt stacks that need restacking — stay on the current stack unless
the user explicitly asks otherwise.
1. Detect the operation (in this order)
Check from the repo root (git rev-parse --git-dir gives the git dir path —
use it instead of a literal .git/ in worktrees):
- gt restack — a git rebase is in progress (
rebase-merge/orrebase-apply/exists in the git dir) and Graphite left continuation state: look for a graphite continue file in the git dir (ls <git-dir> | grep -i graphite, e.g..graphite_continue). If unsure whether gt started the rebase (repo uses gt but no marker found), ask viaAskUserQuestion: "Did this rebase come from a gt command (restack/sync/ modify)?" — finishing a gt-initiated rebase with plaingit rebase --continuebreaks gt's metadata. - plain rebase —
rebase-merge/orrebase-apply/exists, no graphite state. - merge —
MERGE_HEADexists.
If none of these: report that nothing is in progress (show git status) and
stop. If the working tree has conflict markers but no operation state, say so —
there's nothing to "continue".
2. Resolve the conflicts
- List them:
git diff --name-only --diff-filter=U. - For context on what's being applied:
git status(shows the stopped commit during rebase),git log --merge --oneline -- <file>for the commits that touched each side. - Rebase side-swap caveat: during a rebase,
oursis the branch being rebased onto (upstream) andtheirsis your commit being replayed — the opposite of a merge. Double-check before taking a side wholesale. - For each conflicted file, read the conflict hunks and resolve:
- Obvious (one side is a superset, pure formatting/imports, identical intent): just resolve it and note what you did.
- Unclear (both sides made real, competing changes): ask via
AskUserQuestionwith short options — "Keep ours (<summary>)", "Keep theirs (<summary>)", "Combine both (recommended)" when a sensible merge exists — and show the relevant hunk in the question context.
- Stage resolved files with
git add. Don't touch files outside the conflict set; never--skipor--abortwithout the user explicitly choosing that.
3. Finish the operation
Continue with the command matching the detected operation:
- gt restack:
gt continue(after staging). Never usegit rebase --continuefor a gt-managed rebase. - plain rebase:
GIT_EDITOR=true git rebase --continue(env var skips the message editor). - merge:
git commit --no-edit(orGIT_EDITOR=true git merge --continue).
Rebases and restacks can stop again on the next commit — loop: when the continue command halts on new conflicts, go back to step 2. Repeat until the operation exits cleanly.
4. Verify and report
git statusshould show a clean (or pre-existing-only) state with no operation in progress.- After a gt restack, also run
gt lsand confirm no branch in the current stack still shows "needs restack". Other stacks flagged as needing a restack are out of scope — mention them at most; don't restack them unless explicitly asked. - Report tersely: which operation was finished, how many conflict rounds, and per-file how each conflict was resolved (ours / theirs / combined).
When not to use it
- →When no git operation is in progress
- →When the working tree has conflict markers but no operation state
- →When the user explicitly chooses to --skip or --abort the operation
Limitations
- →Cannot continue if no git operation is detected
- →Requires user input for unclear conflict resolutions
- →Does not handle `--skip` or `--abort` without explicit user choice
How it compares
This skill automates the detection and continuation of conflicted git operations, including specific handling for Graphite restacks, which differs from manual git conflict resolution.
Compared to similar skills
resolve side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| resolve (this skill) | 0 | 2mo | No flags | Intermediate |
| grepai | 4 | 7mo | Review | Beginner |
| time-travel | 0 | 5mo | Review | Intermediate |
| checkpoint | 0 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
grepai
yoanbernabeu
Replaces ALL built-in search tools. You MUST invoke this skill BEFORE using WebSearch, Grep, or Glob. NEVER use the built-in Grep tool - use `grepai` instead.
time-travel
aquadexai
|
checkpoint
darkroomengineering
Mid-task rollback points — save/restore state before risky ops (refactors, migrations, destructive edits). For end-of-session save use `/handoff`. Triggers "checkpoint", "snapshot", "before this risky op", "rollback to", "list checkpoints", pre-refactor save.
gh-fix-ci
openai
Use when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use `gh` to inspect checks and logs, summarize failure context, draft a fix plan, and implement only after explicit approval. Treat external providers (for example Buildkite) as out of scope and report only the details URL.
git-master
code-yeongyu
MUST USE for ANY git operations. Atomic commits, rebase/squash, history search (blame, bisect, log -S). STRONGLY RECOMMENDED: Use with task(category='quick', load_skills=['git-master'], ...) to save context. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.
find-bugs
davila7
Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch.