| name | frb-fix-merge-conflict |
| description | Use when resolving merge or rebase conflicts in flutter_rust_bridge, especially conflicts involving generated files after master/main changed independently from a PR branch. |
FRB Fix Merge Conflict
Use this skill before resolving merge or rebase conflicts in flutter_rust_bridge.
Core Rule
Resolve hand-written files semantically. Do not hand-resolve generated files as the final result.
Generated conflict output should be treated as a stale artifact from two independently valid histories. After the hand-written sources are merged, regenerate the generated outputs and commit that regenerated result.
Before Starting
- Read the FRB environment setup instructions for the current checkout before running generation or tests.
- Read
frb-code-generation to choose the minimal regeneration command.
- If the conflict is discovered through CI or PR checks, read
frb-fix-ci before deeper investigation.
- Make sure the worktree starts clean except for the merge/rebase conflict you are intentionally resolving.
Classify Conflicts
List unmerged files:
git diff --name-only --diff-filter=U
Classify each file into one of these buckets:
| Bucket | Examples | Resolution |
|---|
| Hand-written source | Rust APIs, codegen logic, Dart tests, docs, configs | Resolve manually with normal semantic merge |
| Generated output | frb_generated.*, *.freezed.dart, *.g.dart, generated API wrappers, generated test entrypoints | Pick one side only as a temporary placeholder, then regenerate |