---
name: ase-repo-resolve
argument-hint: "[--help|-h] [--dir|-d
] [--safe|-s] [--interactive|-i] [ ...]"
description: >
Resolve the Git merge conflicts of a working directory -- of an
in-progress merge, rebase, cherry-pick, revert, stash apply, or of
conflict markers left by patch -- carefully and semantically, never
losing any change, escalate unresolvable hunks as-is, continue the
in-progress operation, and emit a RESOLVED, PARTIAL, NONE, or FAILED
verdict. Use when the user calls to "resolve" or "fix" merge
conflicts.
user-invocable: true
disable-model-invocation: false
effort: high
allowed-tools:
- "Bash(git *)"
- "Bash(mkdir -p *)"
- "Bash(cp -p *)"
- "Bash(rm -rf *)"
- "Bash(rm -f *)"
- "Read"
- "Edit"
- "Write"
---
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
Resolve Merge Conflicts
$ARGUMENTS
*Resolve* the merge conflicts of the working directory *semantically*,
*never* losing any change, *escalate* the unresolvable hunks as-is,
*continue* the in-progress operation, and report the *resolve verdict*.
During the entire operation, you *MUST* *NEVER* create, switch, or
check out any branch, and always continue the operation on the branch
currently checked out, as a branch switch destroys the in-progress
operation state like `MERGE_HEAD` or `REBASE_HEAD` -- this overrides
any general rule like "branch first if on the default branch".
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-resolve.md
Procedure
---------
1.
1. Set to with any leading and
trailing whitespace stripped. Do not output anything.
2. Resolve the conflicts by expanding the following:
3.
Only output the following and then immediately
*STOP* processing the entire current skill:
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ▶ ERROR: **** is no Git working directory, ▶ RESOLVE VERDICT: **FAILED**
Only output the following and then immediately
*STOP* processing the entire current skill:
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ RESOLVE VERDICT: **NONE**
2.
1. If is not `RESOLVED` or
is `none`, skip this entire STEP 2, as either conflicts remain
or there is no operation to continue (e.g., after
`git stash apply` or `patch --merge`).
2. Run the command
`git -C "" diff --name-only --diff-filter=U`. If its
output is *not* empty (unmerged files outside of
remain), only output the following and skip the
remaining items of this STEP 2:
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ status: **not continued -- further conflicted files remain**
3. Continue the operation by running the command
`git -C "" -c core.editor=true --continue`,
which keeps the prepared commit message without opening an
editor.
Only output the following and then *START OVER* at
STEP 1, item 2, to resolve the conflicts of the next commit:
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ status: **continued -- next conflicts**
Only output the following , as the resolution itself
is complete and staged:
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ WARNING: operation failed to continue
Only output the following :
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ status: **operation continued**
3.
1. Report the escalations by expanding the following:
2. Only output the following :
⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: ****, ▶ RESOLVE VERDICT: ****
3.
Give the closing hint by expanding the following (which,
depending on the configured , may expand
into nothing and hence emit no output at all):
Resolve the escalated hunks manually (or re-run with `--interactive`), stage the files via `git add`, and continue the operation.