Install
$ agentstack add skill-assertchris-claude-skills-custom-conflict-resolution ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Git Conflict Resolution via Rebase
This skill handles git merge conflicts using a rebase-first strategy, ensuring clean history and thoughtful conflict resolution.
Core Principles
- Always use rebase, never merge - Unless explicitly told otherwise
- One file at a time - No batch processing unless user explicitly permits it
- Preserve best code from both branches - Analyze and merge thoughtfully
- Never take shortcuts - Each conflict deserves proper analysis
Process
Step 1: Understand the Situation
Before touching anything:
- Check current git status
- Identify the target branch (usually
mainororigin/main) - Understand what the current branch contains vs target
- Check for duplicate commits (common when PRs were merged to main)
git status
git log --oneline --graph origin/main..HEAD
git log origin/main --oneline | head -20
Step 2: Attempt Rebase
git fetch origin main
git rebase origin/main
If rebase succeeds: Great! Skip to Step 5 (verification).
If conflicts occur: Continue to Step 3.
Step 3: Conflict Analysis
When conflicts occur:
- List all conflicted files:
git status | grep "both modified"
- For each conflicted file, show the conflict to the user:
git diff
- ASK THE USER: "I found conflicts in X files. Should I resolve them one at a time, or are there specific patterns where I can batch process (like pure syntax changes)?"
Step 4: Resolve Each Conflict
For each conflicted file, follow this process:
A. Analyze the Differences
- Show what changed in HEAD (target branch):
git show HEAD:
- Show what changed in the incoming commit:
git show :: # or read the conflict markers
- Explain to the user:
- What main/target branch has
- What feature branch has
- What the conflict is about
- Which approach seems better and why
B. Resolution Strategy
Choose based on analysis:
Strategy 1: Accept one side completely
git checkout --ours # Keep current branch
git checkout --theirs # Accept incoming changes
Strategy 2: Manual merge required
- Use Edit tool to manually combine the best of both
- Preserve functionality from both branches
- Remove conflict markers (>>>>>>)
Strategy 3: Manual edit after accepting one side
- Accept one version as base
- Use Edit tool to apply specific changes from the other version
C. Verify and Stage
After resolving:
- Lint the file (if applicable):
php -l # For PHP files
npm run lint # For JS files
- Stage the resolved file:
git add
- Report to user: "Resolved X by [brief explanation]"
Step 5: Complete the Rebase
After all conflicts are resolved:
git rebase --continue
If more conflicts arise in subsequent commits, repeat Step 4.
Step 6: Verification
- Check the clean history:
git log --oneline --graph HEAD~10..HEAD
- Verify working directory is clean:
git status
- Force push with lease:
git push --force-with-lease
Common Scenarios
Scenario 1: Duplicate Commits
Problem: Feature branch was based on commits that were later merged to main via PR, creating duplicate commits with different hashes.
Solution: Use git rebase --onto to replay only the unique commits:
# Find the first unique commit in your branch
git log --oneline origin/main..HEAD
# Rebase only commits after the duplicates
git rebase --onto origin/main
Scenario 2: Structural Refactoring Conflicts
Problem: Main refactored code structure (e.g., array → closure), feature branch modified the old structure.
Solution:
- Accept main's new structure (
git checkout --ours) - Apply feature branch's logical changes to the new structure using Edit tool
- Preserve both improvements
Batch Processing Rules
NEVER batch process unless the user explicitly says:
- "If conflicts are only [specific pattern], you can batch accept [branch]"
- "For files with only syntax changes, use our version"
When permitted, use:
git checkout --ours file1 file2 file3
git add file1 file2 file3
Error Recovery
If you make a mistake:
git rebase --abort
# Start over from Step 2
If user wants to switch to merge instead:
git rebase --abort
git merge origin/main
# Apply same careful one-file-at-a-time process
Critical Don'ts
- DON'T use
git checkout --oursor--theirswithout understanding what you're accepting - DON'T batch process multiple files without explicit user permission
- DON'T skip showing the user what conflicts exist
- DON'T assume syntax-only changes - verify first
- DON'T move on to next file until current one is staged
- DON'T combine operations - resolve, then lint, then stage
Success Criteria
A successful conflict resolution means:
- Clean linear history on top of target branch
- All functionality from both branches preserved
- No duplicate commits
- All tests pass (run if available)
- User understands what was done and why
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: assertchris
- Source: assertchris/claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.