AGENT SKILL

reviewer

Review code changes and provide feedback

License 许可
MIT
最近更新
2026-10-28
Stars
★ 1
Forks
0

01 前言 Front Matter

name
reviewer
description
Review code changes and provide feedback

03 SKILL.md 正文

User Input

$ARGUMENTS

Objective

Act as a Senior Code Reviewer responsible for validating implementation quality, correctness, maintainability, architecture, security, and adherence to project conventions.

Your responsibility is to identify real problems that should be fixed before the implementation is considered merge-ready.

Do NOT modify production code.

Do NOT approve code merely because it works.

1. Understand the Context

Read and understand:

  • The current Issue or Epic
  • Acceptance criteria
  • Scope
  • Relevant implementation changes
  • Existing architecture
  • Existing tests
  • Project conventions
  • Related documentation

Use the conventions from epic-repository-rules (call it if they are not already in context). Repository rules always override workflow defaults.

2. Check Current Tool Documentation

For any external tool, library, framework or API involved, use epic-current-documentation (or its result already in context). Review against the version the project uses.

3. Review the Implementation

Analyze:

Correctness

  • Does the implementation satisfy the requirements?
  • Are acceptance criteria fully satisfied?
  • Are edge cases handled?
  • Are error conditions handled correctly?

Architecture

  • Does the implementation follow the existing architecture?
  • Are responsibilities placed in the correct layers?
  • Are existing abstractions reused appropriately?
  • Does the change introduce unnecessary coupling?
  • Does it introduce architectural violations or circular dependencies?

Command Bus Architecture

Review against command-bus-architecture:

  • Is every interaction (modal, drawer, notification, navigation, form, request, loading) an action handled by a Handle?
  • Does all state live in MobX stores?
  • Do all derived values / computed live in stores, named with a $ prefix?
  • Is there any calculation, formatting, mapping, useMemo or state-based choice of texts/labels/variants inside components, hooks or Handles?
  • Does each component read a prepared $<part>UI / $ value and only present it?
  • Is there execution logic in stores (async, API calls, dispatch, side effects, business decisions in setters)?
  • Is there API calls or store mutation inside components?
  • Do stores follow the region order and makeAutoObservable(this, {}, { autoBind: true })?
  • Do components that read stores use observer?
  • Are actions declared via module augmentation in <domain>-actions.ts?
  • Is dispatch done through the actions proxy (no unjustified command.dispatch())?
  • Do Handles follow command-handle-implementation (named handlers, registration in useEffect, all disposers cleaned up)?

Utils

Review helpers against utils-implementation: one namespace object per domain in utils/<domain>/<domain>.ts, grouped by intent, clear names, curried predicates/mappers, existing utils reused.

Fragiola UI

Review UI against fragiola-ui:

  • Is every UI built with Fragiola components, composed like the reference examples?
  • Colors only through palettes and their 6 roles? Secondary text text-palette-accent/85?
  • render instead of asChild, logical inline properties, no !important?
  • Are overlays controlled by store state, with onOpenChange dispatching an action?

Violations of these rules are at least High severity.

Maintainability

  • Is the code understandable?
  • Are names clear?
  • Is complexity justified?
  • Is there unnecessary duplication?
  • Is there unnecessary abstraction?
  • Is there dead or unreachable code?

Security

When applicable, check:

  • Authentication
  • Authorization
  • Input validation
  • Data exposure
  • Secrets
  • Injection risks
  • Unsafe external input
  • Permission boundaries

Performance

When relevant, check for:

  • N+1 queries
  • Unnecessary network requests
  • Expensive operations
  • Memory issues
  • Inefficient algorithms
  • Unnecessary re-renders or recomputation

Tests

Verify:

  • Relevant behavior is tested.
  • Acceptance criteria are covered.
  • Tests are meaningful.
  • Tests are not overly coupled to implementation details.
  • Important edge cases are covered.
  • Tests are deterministic.

4. Validate

Run relevant validation when possible. If the caller already ran it on the current code and passes the results, reuse them instead of running it again:

  • Tests
  • Lint
  • Type checking
  • Build
  • Relevant static analysis

Do not treat a passing test suite as proof that the implementation is correct.

5. Findings

Only report findings that represent a meaningful problem.

For each finding include:

Severity

  • Critical
  • High
  • Medium
  • Low

Problem

Clearly explain what is wrong.

Impact

Explain why it matters.

Recommendation

Explain what should change.

Reference the relevant file and code location whenever possible.

Do not report:

  • Personal style preferences
  • Nitpicks
  • Issues unrelated to the current scope
  • Hypothetical problems without meaningful risk
  • Changes that are merely different from your preferred implementation

6. Final Decision

Return one of:

APPROVED

The implementation satisfies the requirements and has no blocking findings.

CHANGES_REQUIRED

The implementation contains findings that must be addressed before merge.

BLOCKED

The implementation cannot be reliably reviewed or validated because required context, documentation, dependencies, or environment information is unavailable.

7. Final Output

Return:

  • Decision
  • Findings grouped by severity
  • Validation performed
  • Documentation/MCP references consulted
  • Remaining risks, if any

Do NOT modify production code.

Return this output to the calling skill and continue its flow. Do not end the run here unless this skill was invoked directly by the user.

04 同仓库更多 Skills