resolve-conflicts
Qué hace
Esta skill ayuda a resolver conflictos de fusión de Git de forma cuidadosa y planificada. Cubre importaciones, pruebas, archivos de bloqueo y archivos borrados en una de las ramas. Es para desarrolladores que se encuentran con conflictos de fusión.
Cuándo usarla
- ✓Cuando una fusión o un rebase de Git se detiene con conflictos que debes resolver.
- ✓Cuando un archivo de bloqueo o un archivo generado está en conflicto y debe regenerarse.
- ✓Cuando una rama borró un archivo que la otra rama modificó.
Link de la skill
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/resolve-conflicts/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes ayudarme a resolver estos conflictos de fusión y explicarme qué hiciste en cada uno?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente revisa el estado del conflicto, hace un plan para cada archivo y te pide aprobación. Después lleva a cabo el plan, ejecuta las pruebas y explica cada decisión.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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:
git status
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:
## Merge Resolution Plan
### Conflict Summary
- **Total conflicted files**: [N]
- **Deleted-modified conflicts**: [N]
- **Generated files**: [N]
- **Regular conflicts**: [N]
### Resolution Strategy by File
#### 1. [File Path]
**Conflict Type**: [deleted-modified / generated / imports / tests / code logic / config / struct / binary]
**Strategy**: [Brief description of resolution approach]
**Rationale**: [Why this strategy is appropriate]
**Risk**: [Low/Medium/High] - [Brief risk description]
**Action Items**:
- [ ] [Specific action 1]
- [ ] [Specific action 2]
#### 2. [File Path]
...
### Execution Order
1. **Phase 1: Deleted-Modified Files** - Handle deletions and backups first
2. **Phase 2: Generated Files** - Regenerate from source
3. **Phase 3: Low-Risk Merges** - Imports, tests, documentation
4. **Phase 4: High-Risk Merges** - Code logic, configuration, structs
5. **Phase 5: Validation** - Compile, test, verify
### Questions/Decisions Needed
- [ ] **[File/Decision]**: [Question for user] (Options: 1, 2, 3)
### Validation Steps
- [ ] Run conflict validation script
- [ ] Compile project
- [ ] Run test suite
- [ ] Manual verification of high-risk changes
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):
.forge/skills/resolve-conflicts/scripts/handle-deleted-modified.sh
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/Decis
Preguntas frecuentes
¿Resolverá los conflictos sin preguntar?
No. Hace un plan y te pide que lo apruebes antes de hacer cambios.
¿Cómo gestiona los archivos de bloqueo?
Los regenera a partir de sus fuentes en lugar de fusionarlos a mano.
¿Ejecuta pruebas después?
Sí. Ejecuta las pruebas tras la resolución para comprobar el resultado.
Detalles
Descripción original del autor
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.
repo: tailcallhq/forgecode
Popularidad
- Estrellas en GitHub
- 7,6 mil
- Posición en el ranking
- #13114
- Licencia
- Apache-2.0
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
create-agent
7,6 milEnseña a tu agente a crear o cambiar agentes personalizados para la app de programación Forge, guardados como archivos markdown con los ajustes al principio.
create-command
7,6 milEnseña a tu agente a crear comandos reutilizables para la app de programación Forge, escritos como pasos en markdown que se ejecutan en orden.
create-github-issue
7,6 milAyuda a tu agente a abrir una incidencia de GitHub que siga la plantilla propia del repositorio, con los campos y las etiquetas adecuados.
create-plan
7,6 milAyuda a tu agente a escribir un plan de implementación detallado para una tarea compleja, con pasos, riesgos y alternativas, antes de cambiar cualquier código.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.