Develop or update CargoKit for flutter_rust_bridge. Use when a bug or feature belongs in fzyzcjy/Cargokit, when updating the FRB CargoKit submodule pointers, or when preparing the paired CargoKit and FRB PRs that synchronize CargoKit changes into FRB integrate templates and examples.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill when the actual fix belongs in the external fzyzcjy/Cargokit repository and FRB needs a follow-up PR that points its CargoKit submodules at the updated CargoKit branch or commit.
The usual shape is two PRs:
Do not implement CargoKit behavior only in copied FRB example output. The source of truth is the CargoKit repository referenced by the template submodules.
FRB embeds CargoKit as git submodules in two template locations:
frb_codegen/assets/integration_template/app/rust_builder/cargokitfrb_codegen/assets/integration_template/plugin/cargokitBoth submodules should normally point at the same CargoKit branch or commit for the same logical update. Downstream generated copies may appear under:
frb_example/**/cargokit/**frb_example/**/rust_builder/cargokit/**Read frb-cargokit first if you need to classify an existing diff before deciding where the change belongs.
Work in fzyzcjy/Cargokit for the actual CargoKit implementation.
If you are editing through an FRB submodule checkout, remember that commits belong to the nested CargoKit repository, not the outer FRB repository. Push the nested repository branch before updating the outer FRB submodule pointer.
In the FRB repository:
Initialize submodules if needed:
git submodule update --init --recursiveFetch and check out the CargoKit branch or commit in both submodule checkouts:
git -C frb_codegen/assets/integration_template/app/rust_builder/cargokit fetch origin <branch-or-ref>
git -C frb_codegen/assets/integration_template/app/rust_builder/cargokit checkout <commit-or-branch>
git -C frb_codegen/assets/integration_template/plugin/cargokit fetch origin <branch-or-ref>
git -C frb_codegen/assets/integration_template/plugin/cargokit checkout <commit-or-branch>Stage the submodule pointer updates in the outer FRB repository:
git add frb_codegen/assets/integration_template/app/rust_builder/cargokit
git add frb_codegen/assets/integration_template/plugin/cargokitConfirm the outer FRB diff shows submodule pointer changes for both paths.
Useful checks:
git submodule status --recursive
git diff --submoduleDo not leave one template submodule on the old CargoKit commit unless the app and plugin templates intentionally need different CargoKit revisions.
After changing either CargoKit submodule pointer, run:
./frb_internal precommit-integrateThis updates copied CargoKit output and platform scaffold files under frb_example/**. Those downstream diffs are expected when CargoKit files are copied from the updated template.
Stage and commit the regenerated integrate output together with the submodule pointer update:
git add frb_example frb_codegen/assets/integration_template
git commit -m "Update CargoKit template pointers"Then run the normal PR checks from frb-prepare-pr, especially:
./frb_internal lint --fixRun focused tests when the CargoKit change affects a platform that can be exercised locally. Otherwise let FRB CI cover the platform matrix and use frb-fix-ci for failures.
The FRB PR should mention that CargoKit is intentionally pointed at the temporary CargoKit PR branch or commit. Keep the PR body empty if the local PR workflow requires it, but use GitHub comments when you need to leave coordination notes.
Before asking for final review:
./frb_internal precommit-integrate if the CargoKit commit changed.When FRB CI fails after a CargoKit update, classify the failure before editing:
fzyzcjy/Cargokit, then update both FRB submodule pointers../frb_internal precommit-integrate and commit the copied output../frb_internal lint --fix../frb_internal precommit-integrate.Do not patch copied frb_example/**/cargokit/** files directly as the final fix. They should be produced from the updated CargoKit submodule and integrate templates.
frb-cargokit - Understand CargoKit ownership and diff layersfrb-code-generation - Choose the correct generation commandfrb-prepare-pr - Prepare an FRB PRfrb-fix-ci - Diagnose CI failures after the PR is opened1d5348b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.