Skip to main content
command

sync-conflict-resolver — Claude Code command: setup and features

Resolves data synchronization discrepancies in files like .sync-state.json. Useful for automated field-level merging and conflict error log reviews.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command sync/sync-conflict-resolver
Open on GitHub

What sync-conflict-resolver does

This command scans state databases such as @.sync-state.json, checks conflict logs via *conflict* and *sync-errors* shell searches, and reads merge parameters from conflict-rules.json. Claude Code executes it with Read, Write, Edit, and Bash access across actions like detect, resolve, analyze, configure, or report.

It handles conflict resolution through distinct strategies: latest-wins, field-level merging, interactive manual choices, system priority, or custom rules. Quality assurance includes backing up state files before altering them, verifying results, and preserving rollback capabilities.

If conflict-rules.json is missing or rules are ambiguous, automated merging for complex nested records will require interactive user decisions.

What it helps with

  • Locate version mismatches and timing discrepancies in sync state files
  • Apply automated field-level merging or latest-wins priority
  • Create safety backups before altering records to support instant rollback
  • Generate summary reports from historical conflict and error logs

Example prompts for the agent

  • Run /sync-conflict-resolver detect to check for state discrepancies
  • Apply field merging with /sync-conflict-resolver resolve
  • Audit past issues using /sync-conflict-resolver report

How to install sync-conflict-resolver

1claude-code-templates

npx claude-code-templates@latest --command sync/sync-conflict-resolver

2Manually: put the files in place

.claude/commands/sync-conflict-resolver.md

Call it with /sync-conflict-resolver. For all projects use ~/.claude/commands/

Questions about sync-conflict-resolver

How do I install sync-conflict-resolver in Claude Code?

Run npx claude-code-templates@latest --command sync/sync-conflict-resolver or save the command definition directly to .claude/commands/sync-conflict-resolver.md.

What resolution strategies are available?

The command supports latest-wins, intelligent field-level merging, interactive manual resolution, system priority, and custom logic defined in conflict-rules.json.

Does the command create backups before overwriting files?

Yes, its workflow creates backups before any modifications, validates changes post-run, and maintains rollback capabilities.

Source text

sync-conflict-resolver.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[action] | detect | resolve | analyze | configure | report"
description: Resolve synchronization conflicts with intelligent strategies and automated resolution
---

# Sync Conflict Resolver

Resolve synchronization conflicts with intelligent automation: **$ARGUMENTS**

## Current Conflict State

- Sync database: @.sync-state.json or sync state files with potential conflicts
- Conflict history: !`find . -name "*conflict*" -o -name "*sync-errors*" | wc -l` conflict logs
- Resolution rules: @conflict-rules.json or existing resolution configuration
- Active conflicts: Current unresolved synchronization conflicts requiring attention

## Task

Implement comprehensive conflict resolution with intelligent automation:

**Resolution Action**: Use $ARGUMENTS to specify detect conflicts, resolve using strategies, analyze patterns, configure rules, or generate reports

**Conflict Resolution Framework**:
1. **Conflict Detection** - Scan synchronized items, compare field versions, identify timing conflicts, flag structural issues
2. **Intelligent Resolution** - Apply resolution strategies, handle field merging, preserve critical data, maintain relationships
3. **Pattern Analysis** - Study conflict trends, identify frequent issues, suggest process improvements, optimize strategies
4. **Configuration Management** - Set resolution preferences, define field priorities, configure merge rules, save automation settings
5. **Reporting & Analytics** - Generate conflict reports, track resolution success, analyze team patterns, provide insights
6. **Automated Prevention** - Implement locking mechanisms, optimize sync timing, enable change notifications, reduce conflicts

**Resolution Strategies**: Latest-wins, smart field-level merging, manual interactive resolution, system-priority resolution, custom rule-based resolution.

**Quality Assurance**: Backup before resolution, validation after changes, rollback capabilities, comprehensive audit trails.

**Output**: Resolved conflicts with detailed resolution reports, updated sync state, pattern analysis insights, and optimized conflict prevention strategies.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Automation and no-code: n8n, Zapier, Make →

From the same set740

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor