pr-review
Pre-PR audit of the Flutter monorepo project against its documented best practices (architecture, BLoC/Repository/TaskEither, app_ui, i18n, logging/PII…
by 7span★ 43 GitHub stars
Install pr-review in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
pr-review
Audit the project against resources/best-practices.md (the single source of truth; read it first).
Never edit source files. The only file you may write is pr-review-report.md at the repo root.
Input
Optional path argument (e.g. apps/app_core/lib/modules/auth). Default: whole repo (apps/, packages/).
Always skip: *.g.dart, *.gr.dart, **/gen/**, packages/app_translations/lib/gen/**, Hive registrar files, .dart_tool/, build/, bricks/.
Hand-edited generated files (G1): only checkable for tracked files via git diff -- '*.g.dart' '*.gr.dart' etc. If the scope is untracked or has no git history, say G1 was not checked.
Steps
- Read
resources/best-practices.md. - Tooling (summarise output, never fix):
- Prerequisite: analyze is meaningless without resolved dependencies. If
.dart_tool/package_config.jsonis missing in a package, runflutter pub getormelos bootstrap(dependency resolution only, allowed). If that fails, G2 isunknown. dart format --output=none --set-exit-if-changed <scope>melos run analyze(fallback:flutter analyzeordart analyze . --fatal-infos). If the output is dominated by unresolved-package/override_on_non_overriding_membernoise, the environment is broken: report G2 asunknownand why, do not report the noise as findings.- Do NOT run
build_runner,locale-gen,asset-gen, or any build. If routes/translations/assets changed and generated output looks stale (G4), say which generator to run. If generated files do not exist locally (e.g.app_router.gr.dartmissing or gitignored), G4 isunknown; say that a generator must be run, do not call it stale.
- Prerequisite: analyze is meaningless without resolved dependencies. If
- Mechanical rules. Use ripgrep (
rg) or git grep with regex patterns. Exclude generated files. Count per rule, keep ~5 examples:- U1
Scaffold(not preceded byApp - U2
SizedBox(withheight:/width:only (instead ofVSpace/HSpace) - U3
Text(notAppText(/RichText/SelectableText - U4
ElevatedButton|TextButton|OutlinedButton(instead ofAppButton) - U5
Color(0xandColors\.excepttransparent(instead ofcontext.colorScheme) - U6
Image.asset(|SvgPicture.asset(with string literal (instead ofAssets.*) - U7 methods/functions returning
Widget(^\s*Widget \w+\(), excluding the preceding line@overrideand the namesbuild/wrappedRoute/createState(extractStatelessWidgetinstead) - U8 hardcoded user-facing literals:
text: ['"],Text\(['"],title: ['"],hintText: ['"],SnackBar\(.*['"]followed by a letter (instead ofcontext.t.*; ignore keys, routes, assets, log messages; borderline cases such as share-sheet subjects are nits, not should-fix) - L1
\bprint\(|debugPrint\(|dart:developerlog((instead offlog()orgetIt<Logger>()) - L2 any log call (
flog,logger.*,print) whose argument mentions token/otp/phone/mobile/email/password/selfie/secret - A2
ApiClient|Dio|Hivereferenced directly from*/screen*/files - A3 repositories lacking
abstract interface class I - A4
try/catchinside*/repository/*(useTaskEither) - A7 states with
.loading()/._(constructors (prefer single const constructor withcopyWith) - A10
package:\w+/src/(importing private src across packages) - I1
../imports or/lib/in import paths; insideapp_coreusepackage:app_core/... - L3 secrets: key/secret/token literals, committed
.env* - L4 repo-wide (not scope-limited):
git diffofAndroidManifest.xml,Info.plist/entitlements for overly broad permissions Always confirm a hit by reading context before counting it; drop false positives (e.g. insidepackages/app_uiwhich defines the primitives).
- U1
- Read-the-code checks ("Bugs and risk" in the checklist). Prioritise recently modified files (
git log -n 30 --name-only,git status) and Bloc/Cubit/repository/screen files. Read the code; do not infer from names. Report only issues you can point to atfile:linewith a concrete failure scenario. - Report.
Severity
Blocker (B) / Should-fix (S) / Nit (N) exactly as tagged in the checklist. A rule violated 800 times is still one rule: give the count.
Output
Write pr-review-report.md (overwrite) and print a short summary in chat.
# PR review report - <date> - scope: <path|whole project>
Verdict: READY / NOT READY / INCOMPLETE (any blocker => NOT READY; a blocker rule that could not be evaluated, e.g. G2 analyze, => INCOMPLETE, never READY)
## Tooling format: pass/fail, analyze: pass/fail (+ key errors)
## Blockers <rule id> <title> - file:line - why it matters - suggested fix
## Should-fix per rule: count, ~5 examples (file:line), fix hint
## Nits per rule: count only
## Bugs and risk file:line, scenario, fix
## Not checked what was skipped and why
Be honest in "Not checked" (e.g. analyze could not run, generator staleness unknown). After the report, offer to fix;
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- resources/best-practices.md
FAQ
What does the pr-review skill do?
Pre-PR audit of the Flutter monorepo project against its documented best practices (architecture, BLoC/Repository/TaskEither, app_ui, i18n, logging/PII, generated files, bugs and risk). Use before opening a PR, or when asked to review, audit, or check the code. Read-only; writes only pr-review-report.md.
How do I install the pr-review skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the pr-review skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…