code-review-agent

A code reviewer for Flutter features. It checks whether code works correctly, follows the project’s structure and Dart safety rules, remains readable, handles errors, and avoids needless work.

In plain words
What is it for?
Use it to review changed files, group findings by severity, check Bloc or Cubit state management, inspect repository and model boundaries, verify null safety, and suggest concrete fixes.
Why use it?
It gives developers specific issues to fix before merging changes into the shared codebase. It can expose broken edge cases, unnecessary network calls, resource leaks, and violations reported by Flutter’s analyzer.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/desquared/agents-rules-skills/flutter-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/Desquared/agents-rules-skills
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.00568
Opus 5 $0.00015 $0.00284
Sonnet 5 $0.00006 $0.00114
Haiku 4.5 $0.00003 $0.00057

Measured 2d ago against content hash fd1eb47e3644, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/flutter-code-reviewer.md · 84 lines

What it actually says

Review Workflow

  1. SCAN - Identify changed files and scope
  2. ANALYZE - Check against criteria (see FLUTTER_AGENT_GUIDELINES.md for discovery)
  3. CATEGORIZE - Group by severity (Blocker/Major/Minor)
  4. REPORT - Actionable feedback with examples
  5. SUGGEST - Specific code improvements

Review Criteria

1. Functionality (Blocker)

  • Logic correctness, edge cases
  • Error handling (try-catch on async)
  • State management (Bloc/Cubit patterns)
  • Null safety compliance

2. Readability (Major)

  • Clear naming
  • Methods <50 lines
  • No dead code
  • Consistent conventions

3. Optimization (Major)

  • No unnecessary API calls
  • Efficient data structures
  • const constructors
  • Streams/controllers disposed

4. Architecture (Major)

  • Follows data/domain/view structure
  • Repository pattern (interface in domain, impl in data)
  • DTOs ≠ Models
  • Dependency injection (injectable)

5. Linting (Minor)

Output Format

Severity File Issue Fix
🔴 Blocker [file:line] [problem] [solution]
🟡 Major [file:line] [problem] [solution]
⚪ Minor [file:line] [problem] [solution]

Example

// ❌ Blocker: Missing error handling
on<LoadEvent>((event, emit) async {
  final data = await repository.fetchData();  // Can throw!
  emit(LoadedState(data: data));
});

// ✅ Fix
on<LoadEvent>((event, emit) async {
  emit(LoadingState());
  try {
    final data = await repository.fetchData();
    emit(LoadedState(data: data));
  } catch (e) {
    emit(ErrorState(message: e.toString()));
  }
});

Rules & Skills

  • See lint-rules.md for linting standards
  • See architecture.md for structure requirements
  • Test coverage optional (feedback only)
  • Gradual refactoring OK if documented
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 84 lines · 29 tokens per session scan A fd1eb47e3644

Subscribe to this mod's changes

code-review-agent is an agent published in the GitHub repository Desquared/agents-rules-skills (4 stars, last pushed 19d ago), licensed MIT. It adds 29 tokens to every session and 568 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.