lauridskern/cindra/resolve-conflicts
Claude Code and agent skill by lauridskern/cindra
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
Install
npx vskill@latest install lauridskern/cindra/resolve-conflictsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as tailcallhq/forgecode/resolve-conflicts.
Git Conflict Resolution
Resolve Git merge conflicts by intelligently combining changes from both branches while preserving the intent of both changes. This skill follows a plan-first approach: assess conflicts, create a detailed resolution plan, get approval, then execute.
Core Principles
- Plan Before Executing: Always create a structured resolution plan and get user approval before making changes
- Prefer Both Changes: Default to keeping both changes unless they directly contradict
- Merge, Don't Choose: Especially for imports, tests, and configuration
- Regenerate Generated Files: Never manually merge generated files - always regenerate them from their sources
- Backup Before Resolving: For deleted-modified files, create backups first
- Validate with Tests: Always run tests after resolution
- Explain All Resolutions: For each conflict resolved, provide a one-line explanation of the resolution strategy
- Ask When Unclear: When the correct resolution isn't clear from the diff, present options to the user and ask for their choice
Workflow
Step 1: Assess the Conflict Situation
Run initial checks to understand the conflict scope:
Identify and categorize all conflicted files:
- Regular file conflicts (both modified)
- Deleted-modified conflicts (one deleted, one modified)
- Generated file conflicts (lock files, build artifacts, generated code)
- Test file conflicts
- Import/configuration conflicts
- Binary file conflicts
For each conflicted file, gather information:
- File type and purpose
- Nature of the conflict (content, deletion, type change)
- Scope of changes (lines changed, sections affected)
- Whether the file is generated or hand-written
Step 2: Create Merge Resolution Plan
Based on the assessment, create a structured plan before resolving any conflicts. Present the plan in the following markdown format:
Present this plan to the user and wait for their approval before proceeding with resolution. If there are any unclear conflicts where you need user input, list them in the "Questions/Decisions Needed" section.
For a complete example plan, see references/sample-plan.md.
Step 3: Handle Deleted-Modified Files
Execute this phase only after the plan is approved.
If there are deleted-but-modified files (status: DU, UD, DD, UA, AU):
This script will:
- Create timestamped backups of modified content
- Analyze potential relocation targets
- Generate analysis reports for each file
- Automatically resolve the deletion status
Review the backup directory and analysis files to understand where changes should be applied.
Step 4: Execute Resolution Plan
Follow the execution order defined in your plan. For each conflicted file, apply the appropriate resolution pattern according to your plan. For every conflict you resolve, provide a one-line explanation of how you're resolving it.
As you complete each action item in your plan, mark it as done and report progress to the user.
When Resolution is Unclear
When you cannot determine the correct resolution from the diff alone (these should already be listed in your plan's "Questions/Decisions Needed" section):
- Present the conflict to the user with the conflicting code from both sides
- Provide numbered options for resolution (Option 1, Option 2, etc.)
- Explain each option clearly with what it would do
- Ask the user to choose an option number or provide additional information
- Remember their choice and apply similar reasoning to subsequent related conflicts
Example interaction:
Once the user responds, apply their decision and similar logic to related conflicts.
Resolution Patterns
For each conflicted file, apply the appropriate resolution pattern:
Imports/Dependencies
Goal: Merge all unique imports from both branches.
One-line explanation: "Merging imports by combining unique imports from both branches, removing duplicates, and grouping by module."
Read references/patterns.md section "Import Conflicts" for detailed examples.
Quick approach:
- Extract all imports from both sides
- Remove duplicates
- Group by module/package
- Follow language-specific style (alphabetize, group std/external/internal)
Tests
Goal: Include all test cases and test data from both branches.
One-line explanation: "Merging tests by including all test cases from both branches, combining fixtures, and renaming if necessary to avoid conflicts."
Read references/patterns.md section "Test Conflicts" for detailed examples.
Quick approach:
- Keep all test functions unless they test the exact same thing
- Merge test fixtures and setup functions
- Combine assertions from both sides
- If test names conflict but test different behaviors, rename to clarify
Generated Files
Goal: Regenerate any generated files to include changes from both branches.
One-line explanation: "Resolving generated file by regenerating it from source files to incorporate changes from both branches."
Recognition: A file is generated if it:
- Is produced by a build tool, compiler, or code generator
- Has a source file or configuration that defines it
- Contains headers/comments indicating it's auto-generated
- Is listed in
.gitattributesas generated - Common examples: lock files, protobuf outputs, GraphQL schema files, compiled assets, auto-generated docs
Approach:
- Identify the generation source: Determine what command or tool generates the file
- Choose either version temporarily (doesn't matter which):
``bash git checkout --ours <generated-file> # or --theirs ``
- Regenerate from source: Run the appropriate generation command:
```bash # Package manager lock files cargo update # for Cargo.lock npm install # for package-lock.json yarn install # for yarn.lock bundle install # for Gemfile.lock poetry lock --no-update # for poetry.lock
# Code generation protoc ... # for protobuf files graphql-codegen # for GraphQL generated code make generate # for Makefile-based generation npm run generate # for npm script-based generation
# Build artifacts npm run build # for compiled/bundled assets cargo build # for Rust build artifacts ```
- Stage the regenerated file:
``bash git add <generated-file> ``
When unsure if a file is generated: Check for auto-generation markers in the file header, or ask the user if you should regenerate or manually merge the file.
Configuration Files
Goal: Merge configuration values from both branches.
One-line explanation: "Merging configuration by including all keys from both branches and choosing appropriate values for conflicts."
Read references/patterns.md section "Configuration File Conflicts" for detailed examples.
Quick approach:
- Include all keys from both sides
- For conflicting values, choose based on:
- Newer/more recent value
- Safer/more conservative value
- Production requirements
- Document choice in commit message
When unclear: Ask the user which configuration value to prefer (current vs incoming)
Code Logic
Goal: Understand intent of both changes and combine if possible.
One-line explanation: "Resolving code logic by analyzing intent: merging if changes are orthogonal, or choosing one approach if they conflict."
Read references/patterns.md section "Code Logic Conflicts" for detailed examples.
Quick approach:
- Analyze what each branch is trying to achieve
- If changes are orthogonal (different concerns), merge both
- If changes conflict (same concern, different approach):
- Review commit messages/PRs for context
- Choose the approach that matches requirements
- Test both approaches if unclear
- Document the decision
When unclear: Present both approaches as options to the user with context about what each does
Struct/Type Definitions
Goal: Include all fields from both branches.
One-line explanation: "Merging struct by including all fields from both branches and choosing appropriate types for any conflicting field definitions."
Quick approach:
- Merge all fields
- If field types conflict, analyze which is more appropriate
- Fix all compilation errors from updated struct
- Update tests to use new fields
When unclear: Ask the user which type definition is correct if field types conflict
Step 5: Validate Resolution
After completing all resolution phases in your plan, validate that all conflicts are resolved:
This script checks for:
- Remaining conflict markers (<<<<<<<, =======, >>>>>>>)
- Unmerged paths in git status
- Deleted-modified conflicts
- Merge state files
Step 6: Compile and Test
Build and test to ensure the resolution is correct (as defined in your plan's validation steps):
If tests fail:
- Review the failure - is it from merged code or conflict resolution?
- Check if both branches' tests pass individually
- Fix integration issues between the merged changes
- Re-run tests until all pass
Step 7: Finalize
Once all conflicts are resolved and tests pass, review your completed plan and commit:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingvendor/forgecode/.forge/skills/resolve-conflicts/SKILL.md
Popularity
- Repository stars
- 35
- Repository forks
- 1
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lauridskern/cindra/resolve-conflicts)