Skip to main content

frb-categorize-code-diff

Use when classifying a flutter_rust_bridge branch or PR diff into test and non-test changes, including colocated Rust test modules.

Quellinformationen

Repository
fzyzcjy/flutter_rust_bridge
Letzte Quellaktivität
23. August 2026 um 12:52
Erkannte Sprache von SKILL.md
Englisch
Sterne
5.453
Forks
423

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
3 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
frb-categorize-code-diff
description
Use when classifying a flutter_rust_bridge branch or PR diff into test and non-test changes, including colocated Rust test modules.
# 1 When to use - Use this skill to answer which changes in a branch or PR are tests and which are not. - Use the repository script instead of classifying paths by hand. Rust tests are commonly colocated in production `.rs` files. ## 2 Run - Fetch the PR base before relying on `origin/master`. - Run from the repository root: ```bash uv run --no-project .claude/skills/frb-categorize-code-diff/categorize_code_diff.py --base origin/master --head HEAD ``` - Add `--json` when another tool will consume the result. - Pass the PR's actual base revision when it is not `origin/master`. ## 3 Interpret - `test-only`: every changed line is in a dedicated test path or a recognized colocated Rust test region. - `non-test-only`: every changed line is outside recognized test code. - `mixed`: the file contains both test and non-test changed lines. - `unclassified`: the diff cannot be mapped confidently, such as a binary patch. - Treat the non-test list as conservative. Unknown code is non-test rather than silently counted as test. ## 4 Reliability - The script compares `base...head`, matching GitHub pull request diff semantics. - Dedicated test paths include `test/`, `tests/`, `test_fixtures/`, and conventional test filenames. - Rust inline classification recognizes brace-delimited items preceded by `#[cfg(test)]` or `#[test]` in both the base and head revisions. - Re-run after every PR update. Line identities and rename targets may change. - Inspect `mixed` files manually before claiming that a PR contains no production changes. ## 5 Validation - Run the script tests after changing its classification logic: ```bash PYTHONDONTWRITEBYTECODE=1 uv run --no-project --with pytest --with typer pytest -q .claude/skills/frb-categorize-code-diff/test_categorize_code_diff.py ``` - Keep `PYTHONDONTWRITEBYTECODE=1`; otherwise pytest leaves an untracked `__pycache__/` inside the skill directory.
Auf GitHub ansehen