Best for
- Asked to review a pull request, merge request, or branch.
- Evaluating changed, added, or deleted files for correctness and quality.
- Auditing a diff before merging.
evanca/flutter-ai-rules/skills/code-review/SKILL.md
Use when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.
Decision brief
Perform structured, objective code reviews for Flutter/Dart projects following a repeatable checklist.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/evanca/flutter-ai-rules --skill "skills/code-review"Inspect the Agent Skill "code-review" from https://github.com/evanca/flutter-ai-rules/blob/b294a77b68b5508f8d3151fb93d87ed9622d2ff1/skills/code-review/SKILL.md at commit b294a77b68b5508f8d3151fb93d87ed9622d2ff1. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Confirm the current branch is a feature, bugfix, or PR/MR branch — not the project's primary branch (e.g. main, master, develop). 2. Verify the branch is up-to-date with the target branch (no unresolved conflicts). 3. Identify the target branch for the merge.
1. Confirm the current branch is a feature, bugfix, or PR/MR branch — not the project's primary branch (e.g. main, master, develop). 2. Verify the branch is up-to-date with the target branch (no unresolved conflicts). 3. Identify the target branch for the merge.
1. List all changed, added, and deleted files. 2. For each change, look up the commit title and review how connected components are implemented. 3. Analyze the change: is it clear why the change was made? If not, dig into the connected methods and files until it is. When you rep…
Iterate through each changed file. For every file, verify the following:
1. Verify the change set is focused and scoped to its stated purpose — no unrelated changes. 2. Check that the PR/MR description accurately reflects the changes.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 604 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Perform structured, objective code reviews for Flutter/Dart projects following a repeatable checklist.
Use this skill when:
main, master, develop).Checkpoint: If the branch is behind the target, flag it before proceeding.
Iterate through each changed file. For every file, verify the following:
| Area | What to verify |
|---|---|
| Understand the change | Why was it made? Review connected methods/files; note which ones you analyzed and why |
| Location | File is in the correct directory |
| Naming | File name follows project naming conventions |
| Responsibility | The file's responsibility is clear; reason for change is understandable |
| Readability | Variable, function, and class names are descriptive and consistent |
| Logic & correctness | No logic errors or missing edge cases |
| Code smells | Scan for the smells in Code Smells Reference below |
| Maintainability | Code is modular; no unnecessary duplication |
| Error handling | Errors and exceptions are handled appropriately |
| Security | No input validation gaps; no secrets committed to code |
| Performance | No obvious inefficiencies (e.g., unnecessary rebuilds, O(n^2) loops on large lists) |
| SOLID principles | Adherence assessed without forcing unnecessary boilerplate or over-abstraction |
| Flutter/Dart/ patterns | Match against the project's loaded guidelines and conventions |
| Documentation | Public APIs, complex logic, and new modules are documented |
| Test coverage | New or changed logic has sufficient tests (see Step 4) |
| Style | Code matches the project's style guide and linting rules |
| Existing code | If the new changes look fine, also review surrounding existing (unchanged) code for smells and suggest refactors where relevant |
For generated files (e.g., *.g.dart, *.freezed.dart): confirm they are up-to-date and not manually modified.
Scope discipline: Your job is not to comment on every change — it's to find errors and concrete improvement areas and comment on those. Don't manufacture comments where the code is fine.
(Note: The following is just an example using Bloc/Cubit; apply similar principles to Riverpod, Provider, or your chosen state management package.)
// BAD — rebuilds entire tree on every state change
BlocBuilder<MyCubit, MyState>(
builder: (context, state) => EntireScreen(state: state),
);
// GOOD — scope rebuilds to the widget that actually changes
BlocSelector<MyCubit, MyState, String>(
selector: (state) => state.title,
builder: (context, title) => Text(title),
);
Key usage on dynamically generated widgets.dispose() is called for controllers, streams, and animation controllers.const constructors are used where possible.For each file, check for common code smells. Use refactoring.guru/refactoring/smells for definitions and suggested refactorings.
| Category | Smells |
|---|---|
| Bloaters | Long Method, Large Class, Primitive Obsession, Long Parameter List, Data Clumps |
| Object-Orientation Abusers | Alternative Classes with Different Interfaces, Refused Bequest, Temporary Field, Switch Statements |
| Change Preventers | Divergent Change, Parallel Inheritance Hierarchies, Shotgun Surgery |
| Dispensables | Comments (redundant), Duplicate Code, Data Class, Dead Code, Lazy Class, Speculative Generality |
| Couplers | Feature Envy, Inappropriate Intimacy, Incomplete Library Class, Message Chains, Middle Man |
Verify test coverage explicitly — this is easy to skip and easy to fake, so be deliberate:
Checkpoint: If CI is red or tests are missing for new logic, flag as a blocking issue.
After the per-file pass, decide the outcome:
suggestion, minor, or major.By default, provide the review as a chat response — a structured response covering each file:
suggestion / minor / major) and a concrete fix suggestion.Approved, Approved with suggestions, or Changes requested.Posting comments online (opt-in only). After presenting the chat review, ask the user whether they'd prefer you to also post these comments online on the PR/MR — so the team can see them, review them, and reply. Only post online if the user explicitly says yes. Never post to the platform on your own initiative.
When the user does opt in, post issues as inline comments anchored to the right file and line (use proper position fields), with the conclusion/key-concerns as a top-level review comment and an approval when warranted. This requires a review-bot access token for the platform (GitHub/GitLab); if one isn't configured, let the user know and ask them to set it up before posting.
Token safety. The token is a secret. You may check whether it exists and report its length to confirm it's configured, but never read, echo, log, print, or otherwise reveal the token value — not in chat, not in a file, not in a commit. Pass it to
curlonly by referencing the env var (e.g.$GITLAB_TOKEN), never by inlining the literal value, and avoidcurl -v/--verbose(it prints the auth header). This is enforced by aPreToolUsehook (scripts/protect-token.sh) that blocks any Bash command which would expose the value. See the "Handling the token safely" section in each reference file for the safe existence/length check.The hook fires in both the Claude Code CLI and the Agent SDK. (SDK apps that set
settingSources/setting_sourcesexplicitly must include"project"for skill hooks to load; it's included by default.)For platform-specific API details, curl formats, and approval steps, follow:
- GitLab → references/gitlab-posting.md (uses the
GITLAB_TOKENenv var)- GitHub → references/github-posting.md (uses the
GITHUB_TOKENenv var)
Alternatives
event4u-app/agent-config
Use when the user says "review this", "check my code", or wants feedback on changes. Reviews for correctness, quality, security, and coding standards.
aAAaqwq/AGI-Super-Team
AI code review for PR or local changes
alirezarezvani/claude-skills
Adversarial code review that breaks the self-review monoculture. Use when you want a genuinely critical review of recent changes, before merging a PR, or when you suspect Claude is being too agreeable about code quality. Forces perspective shifts through hostile reviewer personas that catch blind spots the author's mental model shares with the reviewer.
ruvnet/RuView
Comprehensive GitHub code review with AI-powered swarm coordination