Agent skill

Roo Conflict Resolution

by zgsm-ai in zgsm-ai/costrict

Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context.

Apache-2.0Auto-check passedDevelopment

Install Roo Conflict Resolution

skills CLI
$ npx skills add zgsm-ai/costrict --skill roo-conflict-resolution -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zgsm-ai/costrict roo-conflict-resolution --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zgsm-ai/costrict.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.roo/skills/roo-conflict-resolution .claude/skills/roo-conflict-resolution && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
roo-conflict-resolution
GitHub stars
4.5k
Token cost
~2.3k tokens
SKILL.md length
955 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context.

  • Works in 8 steps: Parse PR Number → Fetch PR Information → Checkout PR Branch and Prepare for Rebase → …
  • Tasks involve merge conflicts
  • SKILL.md covers When to Use This Skill, When NOT to Use This Skill, Workflow Overview and Initialization Steps, plus 7 more sections
  • Calls git and gh

What it does

Roo Conflict Resolution is an agent skill from zgsm-ai/costrict. Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context. Use when tasks involve merge conflicts, rebasing, PR conflicts, or git conflict resolution. This skill analyzes commit messages, git blame, and code intent to make intelligent resolution decisions.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git, Visual Studio Code, DeepSeek and Google Gemini. The repository describes itself as: Costrict - strict AI coder for enterprises, quality first, including AI Agent, AI CodeReview, AI Completion. The licence is Apache-2.0.

When your agent uses it

  • Tasks involve merge conflicts
  • Git conflict resolution

Example prompts

  • “Use the roo-conflict-resolution skill to provide comprehensive guidelines for resolving merge conflicts intelligently using git history and commit…”
  • “/roo-conflict-resolution”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Parse PR Number
  2. Fetch PR Information
  3. Checkout PR Branch and Prepare for Rebase
  4. Check for Merge Conflicts
  5. Conflict Analysis
  6. Resolution Strategy
  7. Conflict Resolution
  8. Validation

What it can do on your machine

Read from SKILL.md and the folder at commit dd38f54. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Roo Conflict Resolution loads about 2.3k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 955 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zgsm-ai/costrict at commit dd38f54, republished under its Apache-2.0 licence (© zgsm-ai). 955 words, ~2,312 tokens.

Download SKILL.mdSave it as .claude/skills/roo-conflict-resolution/SKILL.md (or your agent's skills folder).
name
roo-conflict-resolution
description
Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context. Use when tasks involve merge conflicts, rebasing, PR conflicts, or git conflict resolution. This skill analyzes commit messages, git blame, and code intent to make intelligent resolution decisions.

CoStrict Conflict Resolution Skill

When to Use This Skill

Use this skill when the task involves:

  • Resolving merge conflicts for a specific pull request
  • Rebasing a branch that has conflicts with the target branch
  • Understanding and analyzing conflicting code changes
  • Making intelligent decisions about which changes to keep, merge, or discard
  • Using git history to inform conflict resolution decisions

When NOT to Use This Skill

Do NOT use this skill when:

  • There are no merge conflicts to resolve
  • The task is about general code review without conflicts
  • You're working on fresh code without any merge scenarios

Workflow Overview

This skill resolves merge conflicts by analyzing git history, commit messages, and code changes to make intelligent resolution decisions. Given a PR number (e.g., "#123"), it handles the entire conflict resolution process.

Initialization Steps

Step 1: Parse PR Number

Extract the PR number from input like "#123" or "PR #123". Validate that a PR number was provided.

Step 2: Fetch PR Information
bash
gh pr view [PR_NUMBER] --json title,body,headRefName,baseRefName

Get PR title and description to understand the intent and identify the source and target branches.

Step 3: Checkout PR Branch and Prepare for Rebase
bash
gh pr checkout [PR_NUMBER] --force
git fetch origin main
GIT_EDITOR=true git rebase origin/main
  • Force checkout the PR branch to ensure clean state
  • Fetch the latest main branch
  • Attempt to rebase onto main to reveal conflicts
  • Use GIT_EDITOR=true to ensure non-interactive rebase
Step 4: Check for Merge Conflicts
bash
git status --porcelain
git diff --name-only --diff-filter=U

Identify files with merge conflicts (marked with 'UU') and create a list of files that need resolution.

Main Workflow Phases

Phase 1: Conflict Analysis

Analyze each conflicted file to understand the changes:

  1. Read the conflicted file to identify conflict markers
  2. Extract the conflicting sections between <<<<<<< and >>>>>>>
  3. Run git blame on both sides of the conflict
  4. Fetch commit messages and diffs for relevant commits
  5. Analyze the intent behind each change
Phase 2: Resolution Strategy

Determine the best resolution strategy for each conflict:

  1. Categorize changes by intent (bugfix, feature, refactor, etc.)
  2. Evaluate recency and relevance of changes
  3. Check for structural overlap vs formatting differences
  4. Identify if changes can be combined or if one should override
  5. Consider test updates and related changes
Phase 3: Conflict Resolution

Apply the resolution strategy to resolve conflicts:

  1. For each conflict, apply the chosen resolution
  2. Ensure proper escaping of conflict markers in diffs
  3. Validate that resolved code is syntactically correct
  4. Stage resolved files with git add
Phase 4: Validation

Verify the resolution and prepare for commit:

  1. Run git status to confirm all conflicts are resolved
  2. Check for any compilation or syntax errors
  3. Review the final diff to ensure sensible resolutions
  4. Prepare a summary of resolution decisions

Git Commands Reference

CommandPurpose
gh pr checkout [PR_NUMBER] --forceForce checkout the PR branch
git fetch origin mainGet the latest main branch
GIT_EDITOR=true git rebase origin/mainRebase current branch onto main (non-interactive)
git blame -L [start],[end] [commit] -- [file]Get commit information for specific lines
git show --format="%H%n%an%n%ae%n%ad%n%s%n%b" --no-patch [sha]Get commit metadata
git show [sha] -- [file]Get the actual changes made in a commit
git ls-files -uList unmerged files with stage information
GIT_EDITOR=true git rebase --continueContinue rebase after resolving conflicts

Best Practices

Intent-Based Resolution (High Priority)

Always prioritize understanding the intent behind changes rather than just looking at the code differences. Commit messages, PR descriptions, and issue references provide crucial context.

Example: When there's a conflict between a bugfix and a refactor, apply the bugfix logic within the refactored structure rather than simply choosing one side.

Show full SKILL.md (380 more words)Show less
Preserve All Valuable Changes (High Priority)

When possible, combine non-conflicting changes from both sides rather than discarding one side entirely. Both sides of a conflict often contain valuable changes that can coexist if properly integrated.

Escape Conflict Markers (High Priority)

When using apply_diff, always escape merge conflict markers with backslashes to prevent parsing errors:

  • Correct: \<<<<<<< HEAD
  • Wrong: <<<<<<< HEAD

Look beyond the immediate conflict to understand related changes in tests, documentation, or dependent code. A change might seem isolated but could be part of a larger feature or fix.

Resolution Heuristics

CategoryRuleException
Bugfix vs FeatureBugfixes generally take precedenceWhen features include the fix
Recent vs OldMore recent changes are often more relevantWhen older changes are security patches
Test UpdatesChanges with test updates are likely more complete-
Formatting vs LogicLogic changes take precedence over formatting-

Common Pitfalls

Blindly Choosing One Side

Problem: You might lose important changes or introduce regressions. Solution: Always analyze both sides using git blame and commit history.

Ignoring PR Context

Problem: The PR description often explains the why behind changes. Solution: Always fetch and read the PR information before resolving.

Not Validating Resolved Code

Problem: Merged code might be syntactically incorrect or introduce logical errors. Solution: Always check for syntax errors and review the final diff.

Unescaped Conflict Markers in Diffs

Problem: Unescaped conflict markers (<<<<<<, =======, >>>>>>) will be interpreted as diff syntax. Solution: Always escape with backslash (\) when they appear in content.

Apply Diff Example

When resolving conflicts with apply_diff, use this pattern:

<<<<<<< SEARCH
:start_line:45
-------
\<<<<<<< HEAD
function oldImplementation() {
  return "old";
}
\=======
function newImplementation() {
  return "new";
}
\>>>>>>> feature-branch
=======
function mergedImplementation() {
  // Combining both approaches
  return "merged";
}
>>>>>>> REPLACE

Quality Checklist

Before Resolution
  • Fetch PR title and description for context
  • Identify all files with conflicts
  • Understand the overall change being merged
During Resolution
  • Run git blame on conflicting sections
  • Read commit messages for intent
  • Consider if changes can be combined
  • Escape conflict markers in diffs
After Resolution
  • Verify no conflict markers remain
  • Check for syntax/compilation errors
  • Review the complete diff
  • Document resolution decisions

Completion Criteria

  • All merge conflicts have been resolved
  • Resolved files have been staged
  • No syntax errors in resolved code
  • Resolution decisions are documented

Communication Guidelines

When reporting resolution progress:

  • Be direct and technical when explaining resolution decisions
  • Focus on the rationale behind each conflict resolution
  • Provide clear summaries of what was merged and why
Progress Update Format
Conflict in [file]:
- HEAD: [brief description of changes]
- Incoming: [brief description of changes]
- Resolution: [what was decided and why]
Completion Message Format
Successfully resolved merge conflicts for PR #[number] "[title]".

Resolution Summary:
- [file1]: [brief description of resolution]
- [file2]: [brief description of resolution]

[Key decision explanation if applicable]

All conflicts have been resolved and files have been staged for commit.

© zgsm-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .roo/skills/roo-conflict-resolution of zgsm-ai/costrict.

Open the folder on GitHubat commit dd38f54

Compare with similar skills

Roo Conflict Resolution next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Roo Conflict Resolution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Roo Conflict Resolution this skillzgsm-ai/costrict4.5k—~2.3kAutomated safety check: PassApache-2.0
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
Git Worktree Managermicrosoft/WindowsAppSDK4.7k—~2kAutomated safety check: PassMIT
SkillhoneTencent/SkillHone169—~3.4kAutomated safety check: PassCustom licence
Git WorkflowJetBrains/ideavim10k—~424Automated safety check: PassMIT
Release Prepfinch-xu/cc-router277—~1.5kAutomated safety check: PassMIT

Similar skills

  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Worktree Manager

    microsoft/WindowsAppSDK

    Official

    Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.

    4.7k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Skillhone

    Tencent/SkillHone

    Local Issue, pull-request, and Wiki workbench for agent skills.

    169 GitHub stars~3.4k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Git Workflow

    JetBrains/ideavim

    Official

    IdeaVim git workflow conventions covering commits, branches, PRs, and CI.

    10k GitHub stars~424 tokensUpdated today
    DevelopmentAuto-check passed
  • Release Prep

    finch-xu/cc-router

    cc-router 发版准备一条龙:升版本号 → 根据上一个 tag 以来的提交写 release-notes/<版本/ 的中英日三份更新内容 → 校验 → 给用户审 → 本地提交「Bump version to X.Y.Z」,停在打 tag 之前。当用户说「准备发版」「发个版」「发 6.1.0」「写发版说明 / 更新内容 / release notes」「bump 版本」时必须走本…

    277 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Release

    devlint/GitWand

    Guide a clean GitWand release end-to-end: bump version, update CHANGELOG, commit, tag, and push.

    180 GitHub stars~1.8k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from zgsm-ai/costrict

  • Evals Context

    zgsm-ai/costrict

    Provides context about the CoStrict evals system structure in this monorepo.

    4.5k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Roo Translation

    zgsm-ai/costrict

    Provides comprehensive guidelines for translating and localizing CoStrict extension strings.

    4.5k GitHub stars~1.8k tokensUpdated 11 days ago
    Auto-check passed

Categories

Questions about Roo Conflict Resolution

What does Roo Conflict Resolution do?

Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context. Roo Conflict Resolution is an agent skill from zgsm-ai/costrict. Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context.

When should I use Roo Conflict Resolution?

Roo Conflict Resolution fits situations like: tasks involve merge conflicts; Git conflict resolution.

How do I install Roo Conflict Resolution in Claude Code?

Run `npx skills add zgsm-ai/costrict --skill roo-conflict-resolution -a claude-code`. Or copy the skill folder (.roo/skills/roo-conflict-resolution in zgsm-ai/costrict) into .claude/skills/roo-conflict-resolution in your project. Claude Code loads it when a task matches its description.

How do I install Roo Conflict Resolution in Codex?

Run `npx skills add zgsm-ai/costrict --skill roo-conflict-resolution -a codex`. Or copy the skill folder (.roo/skills/roo-conflict-resolution in zgsm-ai/costrict) into .agents/skills/roo-conflict-resolution in your project. Codex loads it when a task matches its description.

Can I use Roo Conflict Resolution in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zgsm-ai/costrict --skill roo-conflict-resolution -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/roo-conflict-resolution, .gemini/skills/roo-conflict-resolution, .github/skills/roo-conflict-resolution and .opencode/skills/roo-conflict-resolution in your project.

What does Roo Conflict Resolution need to run?

Going by SKILL.md and its folder, Roo Conflict Resolution needs the command-line tools its instructions call (git and gh).

Does Roo Conflict Resolution access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Roo Conflict Resolution safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Roo Conflict Resolution use?

Roo Conflict Resolution is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Roo Conflict Resolution use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Roo Conflict Resolution?

Skills that share tags, products or a category with Roo Conflict Resolution: Ccmanager Config (kbwo/ccmanager, 1.3k stars), Git Worktree Manager (microsoft/WindowsAppSDK, 4.7k stars), Skillhone (Tencent/SkillHone, 169 stars) and Git Workflow (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Roo Conflict Resolution?

zgsm-ai (a GitHub organization) maintains it in zgsm-ai/costrict, which has 4,450 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 30, 2026.

Source: zgsm-ai/costrict on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.