pr-review
Pre-PR audit of the Flutter monorepo project against its documented best practices (architecture, BLoC/Repository/TaskEither, app_ui, i18n, logging/PII…
от 7span★ 43 звезды на GitHub
Установить pr-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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;
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- resources/best-practices.md
FAQ
Что делает скилл pr-review?
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.
Как установить скилл pr-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…