code-review-auto

timequity's avatarfrom timequity

Automatic code review and fixes before showing to user.Use when: code generation is complete, before preview.Triggers: internal use only.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 18, 2025

When & Why to Use This Skill

This Claude skill automates the code review and optimization process by scanning generated code for quality, performance, and accessibility issues before it reaches the user. It functions as an invisible quality gate that automatically fixes common linting errors, refactors suboptimal structures, and ensures adherence to best practices, delivering production-ready code that is clean, efficient, and accessible.

Use Cases

  • Case 1: Automated cleanup of code quality issues such as removing unused imports, variables, and debug logs to maintain a professional codebase.
  • Case 2: Structural refactoring of generated components to ensure logical folder organization and prevent code duplication in complex projects.
  • Case 3: Performance optimization by identifying and flagging N+1 queries or blocking operations before the code is executed in a preview environment.
  • Case 4: Enhancing web accessibility by automatically generating missing alt text and verifying heading hierarchies to meet WCAG standards.
namecode-review-auto
description|
Use whencode generation is complete, before preview.
Triggersinternal use only.

Automatic Code Review

Review and fix issues before user sees code.

Review Checklist

Code Quality

  • No unused imports
  • No unused variables
  • No console.log in production
  • Consistent naming conventions
  • No magic numbers (use constants)

Structure

  • Components properly extracted
  • No code duplication
  • Reasonable file sizes (<300 lines)
  • Logical folder organization

Performance

  • No N+1 queries
  • Images optimized
  • Lazy loading where appropriate
  • No blocking operations

Accessibility

  • Alt text on images
  • Proper heading hierarchy
  • Focusable interactive elements
  • Color contrast sufficient

Auto-Fix Rules

Issue Fix
Unused import Remove
console.log Remove
Missing alt text Generate from context
Duplicate code Extract function
Long function Split into smaller

Process

  1. Scan generated code
  2. Identify issues (categorize by severity)
  3. Auto-fix what's possible
  4. Re-run tests to verify fixes don't break
  5. Continue to preview if all good

User Experience

User never sees:

  • Linting errors
  • Initial messy code
  • Intermediate states

User always sees:

  • Clean, reviewed code
  • Working preview
  • ✅ confirmation