resolve-conflicts
Fungsinya
Skill ini membantu menyelesaikan konflik merge Git dengan cara yang cermat dan terencana. Skill ini mencakup impor, tes, file lock, dan file yang dihapus di salah satu sisi. Skill ini ditujukan untuk pengembang yang menghadapi konflik merge.
Kapan dipakai
- ✓Saat merge atau rebase Git berhenti karena konflik yang perlu Anda selesaikan.
- ✓Saat file lock atau file yang dihasilkan mengalami konflik dan harus dibuat ulang.
- ✓Saat satu cabang menghapus file yang diubah oleh cabang lain.
Link skill
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/resolve-conflicts/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bisakah Anda membantu menyelesaikan konflik merge ini dan menjelaskan apa yang Anda lakukan untuk setiap konflik?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memeriksa status konflik, membuat rencana untuk setiap file, dan meminta persetujuan Anda. Setelah itu agent menjalankan rencana, menjalankan tes, dan menjelaskan setiap pilihan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah ia akan menyelesaikan konflik tanpa bertanya?
Tidak. Ia membuat rencana dan meminta Anda menyetujuinya sebelum membuat perubahan.
Bagaimana file lock ditangani?
File lock dibuat ulang dari sumbernya, bukan digabung secara manual.
Apakah ia menjalankan tes setelahnya?
Ya. Ia menjalankan tes setelah penyelesaian untuk memeriksa hasilnya.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.6k
- Peringkat
- #13114
- Lisensi
- Apache-2.0
- Diperbarui
- 1/11/2026
Komentar
- …
Skill lain dari repositori ini
create-agent
7.6kMengajari agent Anda membuat atau mengubah agen kustom untuk aplikasi coding Forge, disimpan sebagai file markdown dengan pengaturan di bagian atas.
create-command
7.6kMengajari agent Anda membuat perintah yang dapat digunakan ulang untuk aplikasi coding Forge, ditulis sebagai langkah markdown yang dijalankan berurutan.
create-github-issue
7.6kMembantu agent Anda membuat issue GitHub yang mengikuti templat issue repositori, dengan kolom dan label yang tepat.
create-plan
7.6kMembantu agent Anda menulis rencana implementasi terperinci untuk tugas kompleks, dengan langkah, risiko, dan alternatif, sebelum ada perubahan kode.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.