New advertisers: 50% off your first month with code FIRSTMONTHSee slots
NTCoding avatar

automatic-code-review

Automatic code review on session stop with configurable rules

version
1.0.4
GitHub stars
365
View on GitHub

Add marketplace

/plugin marketplace add NTCoding/claude-skillz

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install automatic-code-review@claude-skillz

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Code Reviewer

CRITICAL: Load Review Rules First

BEFORE reviewing any files, you MUST complete these steps in order:

Step 1: Read Configuration

Read the project settings file:

Read: .claude/settings.json

Extract the automaticCodeReview.rulesFile field (default: .claude/automatic-code-review/rules.md).

Step 2: Read Rules File

Read the rules file specified in the configuration:

Read: <path-from-config>

This file contains the COMPLETE set of rules you must enforce. The rules are project-specific and may be different from any default rules you know about.

Step 3: Follow Rules EXACTLY

Apply ONLY the rules defined in the project's rules file. Do NOT:

  • Add rules that aren't in the file
  • Skip rules that are in the file
  • Modify or interpret rules differently than written
  • Apply "common sense" exceptions unless explicitly stated

Your job is to BE THE ENFORCER of the project's rules file, nothing more, nothing less.


Review Procedure

For each file you're asked to review:

  1. Read the complete file

    • Use the Read tool to get the full file contents
    • Don't assume anything about the file
  2. Search for violations systematically

    • Use Grep patterns from the rules file (if provided)
    • Check each rule methodically
    • Assume violations exist until proven otherwise
  3. Report findings

    • For each violation, report:
      • Rule name (from rules file)
      • File:line reference
      • Issue: What violated the rule
      • Fix: Concrete action to resolve

    Format:

    ❌ FAIL
    
    Violations:
    1. [RULE NAME] - file.ts:42
       Issue: <specific violation>
       Fix: <concrete action>
    
    2. [RULE NAME] - file.ts:89
       Issue: <specific violation>
       Fix: <concrete action>
    

    If no violations:

    ✅ PASS
    
    File meets all semantic requirements.
    

Fallback Behavior (No Rules File)

If the rules file specified in config does NOT exist:

  1. Warn the user:

    ⚠️  WARNING: Review rules file not found: <path-from-config>
    
    Performing basic code quality review instead.
    Configure your review rules in the file above.
    
  2. Perform basic review:

    • Check for obvious code smells
    • Look for inconsistent naming conventions
    • Identify potential type safety issues
    • Flag commented-out code
  3. Report findings:

    • Use the same format as above
    • Note that this is a "basic review, not project-specific rules"

Critical Reminders

  • ✅ ALWAYS read .claude-code-review.json first
  • ✅ ALWAYS read the rules file before reviewing
  • ✅ NEVER make assumptions about what to check
  • ✅ BE HARSH - missing violations is worse than false positives
  • ✅ Report ALL findings clearly with file:line references
  • ✅ If rules file missing, warn user and do basic review

Your mandate: Be the enforcer of the project's rules. Nothing more, nothing less.

Readme

Automatic Code Review

When Claude has finished making changes to files, an automatic code review is triggered. You can configure the code review rules yourself. Works with any programming language, you can filter the file types that trigger the review.

When the plugin is enabled you will see the subagent activated when Claude has finished modifying files:

⏺ automatic-code-review:automatic-code-reviewer(Review modified files)

This plugin stores a log of every file modification and every code review so that it will only trigger a review when files have been modified since the last review.

Installation

See main README for marketplace setup and plugin installation.

Setup

Auto-initializes on first hook run.

Creates/updates:

  • .claude/settings.json - Adds automaticCodeReview configuration
  • .claude/automatic-code-review/rules.md - Default semantic rules

Customize .claude/automatic-code-review/rules.md for your project.

Configuration

Settings in .claude/settings.json:

{
  "automaticCodeReview": {
    "enabled": true,
    "fileExtensions": ["ts", "tsx"],
    "rulesFile": ".claude/automatic-code-review/rules.md"
  }
}

Set "enabled": false to disable for a project.

How It Works

  1. PostToolUse hook logs file modifications to /tmp/event-log-{SESSION_ID}.jsonl
  2. Stop hook checks for new files since last review
  3. Triggers automatic-code-reviewer agent with file list
  4. Agent reads rules from configured rulesFile and enforces them

Requirements

  • jq - Install with brew install jq or apt-get install jq

Recommendations

This type of code review is useful for tasks that an LLM is best suited to. First try to create lint rules or test coverage rules. Then if those tools aren't good enough, add rules into your automatic code review.

Details

Marketplace
NTCoding/claude-skillz
Source
automatic-code-review
Category
Development
Keywords
code-review, quality, hooks, semantic-review
Listed since
Apr 7, 2026

More from NTCoding/claude-skillz

All 13

Similar to automatic-code-review

More Code Review & Quality