Skip to main content
rule CX Codex

code_review — Claude Code rule: review and install

The code_review rule for Claude Code sets a review process for changes before merging. It checks branches, files, code, tests, and the PR/MR description.

MIT ★ 674 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add evanca/flutter-ai-rules
/plugin install flutter-ai-skills@flutter-ai-rules
Open on GitHub

What code_review does

The rule starts by identifying the working and merge-target branches, then listing files that changed, were added, or were removed. For each change, it calls for checking the commit title and related components before judging the implementation. If the purpose remains unclear after investigation, that should appear in the report.

Review points cover file placement and naming, readable code, logic, error handling, security, performance, documentation, and tests. The rule also checks generated files, project conventions, and whether the PR/MR description matches the changes. When library guidance is uncertain, it calls for consulting online documentation. The response belongs in chat, with findings and recommendations for each file.

What it helps with

  • confirm the current branch is not main or develop
  • list files changed, added, or deleted in a merge request
  • spot logic errors, missing edge cases, and weak exception handling
  • assess whether tests exercise real behavior or only mocks
  • compare the PR/MR description with the actual changes

Example prompts for the agent

  • Review this branch and report findings for each file.
  • Check these changes before merging into main, including the tests and PR description.
  • Inspect this diff and report any change whose purpose remains unclear.

How to install code_review

1Plugin marketplace

/plugin marketplace add evanca/flutter-ai-rules
/plugin install flutter-ai-skills@flutter-ai-rules

2Manually: put the files in place

.claude/rules/code_review.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about code_review

How do I install code_review in Claude Code?

Run /plugin marketplace add evanca/flutter-ai-rules, followed by /plugin install flutter-ai-skills@flutter-ai-rules. The rule file path is .claude/rules/code_review.md.

What does code_review do?

It guides a pre-merge review of branches, changed files, implementation details, tests, and the PR/MR description. Its expected response gives conclusions and recommendations file by file.

What does code_review inspect in each file?

It checks concerns such as file location and naming, logic, error handling, security, documentation, test coverage, and consistency with project conventions.

Source text

code_review.md · MIT
# Code Review Ruleset for LLMs

1. Check that the current branch is a feature, bugfix, or PR/MR branch and not a main or develop branch.
2. Verify the branch is up-to-date with the target branch (main).
3. Identify the target branch for the merge and list all files that have changed, been added, or deleted.
4. For every change, look up the commit title and review how any connected components are implemented. 
5. Do not assume a change or fix is correct without investigating the implementation details.
6. Avoid complimenting or critiquing by default; be as objective and reasonable as possible. Instead of offering automatic praise, take a devil's advocate approach and give honest, thoughtful feedback.
7. If the change or fix remains difficult to understand after several attempts, include this in your report. 
8. Fetch online documentation if you're unsure about the best practices for a particular package or library.
9. For each changed file, check that the file is in the correct directory.
10. For each changed file, check that the file name follows naming conventions.
11. For each changed file, verify the file's responsibility is clear and that the reason for its change or addition is understandable.
12. For each changed file, review the code for readability and ensure variable, function, and class names are descriptive and consistent.
13. For each changed file, check the logic and correctness of the code, ensuring there are no logic errors or missing edge cases.
14. For each changed file, check that the code is modular and does not contain unnecessary duplication (maintainability).
15. For each changed file, ensure errors and exceptions are handled appropriately.
16. For each changed file, check for potential security concerns such as input validation and secrets in code.
17. For each changed file, check for obvious performance issues or inefficiencies.
18. For each changed file, verify that public APIs, complex logic, and new modules are documented.
19. For each changed file, ensure there is sufficient test coverage for new or changed logic.
20. For each changed file, ensure the code matches the project's style guide and coding patterns.
21. For generated files, confirm they are up-to-date and not manually edited.
22. Check that the overall change set is focused and scoped to the stated purpose and does not include unrelated or unnecessary changes.
23. Verify that the PR/MR description accurately reflects the changes made.
24. Ensure there are new or updated tests covering new or changed logic.
25. If there's a test, always evaluate whether the test could fail or if it's only checking a mock implementation.
26. Ensure all tests pass in the continuous integration system.
27. Provide clear, constructive feedback for any issues found, including suggestions for improvement and requests for clarification if anything is unclear.
28. The expected output is an answer in the chat, mentioning conclusions and recommendations per file.

© Ivanna Kaceviča · MIT · evanca/flutter-ai-rules

Similar IDE rules

All IDE rules for Code review and refactoring →

From the same set39

The whole set →
flutter_errors This rule connects common Flutter errors to likely layout or state-management causes. Use it when a widget tree fails with overflow, sizing, or build-phase issues. CX Codex +1 ★ 674repo stars flutter-errors flutter-errors is a Claude Code skill that helps diagnose Flutter layout and runtime errors. It activates for RenderFlex overflow, scroll issues, and setState calls during build. CX Codex +1 ★ 674repo stars mocktail Guidance for using Mocktail in Dart and Flutter tests: configure stubs, inspect interactions, and decide when a mock, fake, or real object fits. CX Codex +1 ★ 674repo stars flutter-change-notifier flutter-change-notifier — a skill that teaches the agent to use ChangeNotifier and provider for Flutter state management: models, providers, Consumer, rebuild optimization. CX Codex +1 ★ 674repo stars provider Guides agents on architecting Flutter state with the provider package, keeping rebuilds minimal and dependencies reactive. CX Codex +1 ★ 674repo stars mockito mockito is a Claude Code skill for Dart and Flutter tests that guides mock generation, stubbing, and interaction checks. It activates for Mockito testing tasks. CX Codex +1 ★ 674repo stars developing-genkit-dart developing-genkit-dart — a skill for building AI agents with Genkit Dart that tells the agent when to pull in reference docs for the core framework and its plugins. CX Codex +1 ★ 674repo stars firebase-storage firebase-storage is a skill with guidelines for Firebase Cloud Storage in Flutter apps, covering file uploads, downloads, metadata changes, and storage error handling. CX Codex +1 ★ 674repo stars

Project sponsors

Companies that keep this analytics open