Agent skill

code-reviewer

6-aspect structured code review. Checks security, types, error handling, tests, quality, simplification.

Stars 14
Forks 2

Install this agent skill to your Project

npx add-skill https://github.com/nguyenthienthanh/aura-frog/tree/main/aura-frog/skills/code-reviewer

SKILL.md

Aura Frog Code Reviewer โ€” 6-Aspect Analysis

Priority: HIGH โ€” Use before merging code


When to Use

  • After implementation, before merge
  • During Phase 4 (Refactor + Review)
  • When explicitly requested

Review Process

Step 1: Get Changed Files

bash
git diff --name-only main...HEAD
# Or: files modified in current workflow

Step 2: Run 6-Aspect Review

MANDATORY: All 6 aspects must be covered. Do not skip any.

Aspect 1: ๐Ÿ”’ Security

  • Hardcoded secrets (API keys, passwords, tokens)
  • SQL injection, XSS, command injection vectors
  • Auth/authz gaps (missing middleware, privilege escalation)
  • CSRF, CORS misconfigurations
  • Insecure crypto (MD5, SHA1, Math.random for tokens)

Aspect 2: ๐Ÿท๏ธ Type Safety

  • Missing type annotations on public functions
  • any type usage (suggest specific types)
  • Inconsistent return types
  • Null/undefined handling gaps
  • Generic types that could be narrower

Aspect 3: โš ๏ธ Error Handling

  • Unhandled promise rejections
  • Empty catch blocks without justification
  • Missing error boundaries (React) / error middleware (Express)
  • Silent failures (errors swallowed without logging)
  • Missing retry logic on external calls

Aspect 4: ๐Ÿงช Test Gaps

  • Untested critical paths
  • Missing edge case tests
  • Test quality (testing behavior vs implementation)
  • Mock quality (over-mocking, missing integration tests)
  • Gaps on modified files

Aspect 5: ๐Ÿ“ Code Quality

  • KISS violations (over-engineering, premature abstraction)
  • DRY violations (duplicated logic)
  • Naming clarity (functions, variables, files)
  • Single Responsibility violations
  • Dead code, unused imports

Aspect 6: โ™ป๏ธ Simplification Opportunities

  • Complex conditionals that could be simplified
  • Deep nesting that could be flattened (early returns)
  • Long functions that should be split
  • Verbose patterns with simpler alternatives
  • Redundant null checks or type guards

Step 3: Generate Report

toon
review[6]{aspect,icon,status,findings}:
  Security,๐Ÿ”’,โœ…|โš ๏ธ|โŒ,{count} findings
  Types,๐Ÿท๏ธ,โœ…|โš ๏ธ|โŒ,{count} findings
  Errors,โš ๏ธ,โœ…|โš ๏ธ|โŒ,{count} findings
  Tests,๐Ÿงช,โœ…|โš ๏ธ|โŒ,{count} findings
  Quality,๐Ÿ“,โœ…|โš ๏ธ|โŒ,{count} findings
  Simplify,โ™ป๏ธ,โœ…|โš ๏ธ|โŒ,{count} findings

Detail each finding:

[ASPECT] [SEVERITY] file:line โ€” description
  โ†’ Fix: recommendation

Severity: ๐Ÿ”ด CRITICAL (block merge) | ๐ŸŸก WARNING (should fix) | ๐Ÿ”ต INFO (nice to have)

Step 4: Decision

  • โœ… APPROVED โ€” 0 critical, โ‰ค3 warnings
  • โš ๏ธ APPROVED WITH COMMENTS โ€” 0 critical, >3 warnings
  • โŒ CHANGES REQUESTED โ€” Any critical finding

Step 5: Summary Line

Review: ๐Ÿ”’โœ… ๐Ÿท๏ธโœ… โš ๏ธโš ๏ธ ๐Ÿงชโœ… ๐Ÿ“โœ… โ™ป๏ธโœ… โ€” APPROVED WITH COMMENTS (1 error handling warning)

Critical (Block Merge)

  • Hardcoded secrets
  • SQL injection / XSS / command injection
  • Missing auth on protected routes
  • Breaking changes without migration

Remember: Review improves code quality. Be constructive.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results