Skip to content

NickCirv/ai-code-roast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Banner

ai-code-roast

Brutally honest AI code reviews. Your code called. It's crying.

npm version license GitHub stars

The Problem

Code reviews are polite, diplomatic, and often useless. Your senior dev says "looks good" when it absolutely does not look good. You merge, ship, and regret at 2am when the thing falls over in production.

Your code deserves the truth. ai-code-roast delivers it β€” five categories, scored 0–10, with receipts.

Quick Start

# Roast a GitHub repo
npx ai-code-roast https://github.com/someone/their-repo

# Roast a local project
npx ai-code-roast ./my-project

Set your API key first:

export ANTHROPIC_API_KEY=your-key-here

Example Output

  ╔══════════════════════════════════════════╗
  β•‘         πŸ”₯  AI CODE ROAST  πŸ”₯           β•‘
  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
  Target: some-startup-api

  β–Έ ARCHITECTURE
    Score: [β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘] 4/10
    "You've discovered a new design pattern: the Spaghetti Singleton.
     Controllers doing database calls directly β€” Gordon is weeping."
    Evidence: UserController.js:47 β€” raw SQL in a route handler

  β–Έ CODE QUALITY
    Score: [β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘] 3/10
    "This function has 340 lines and 11 levels of nesting.
     It's not a function, it's a feature film."
    Evidence: processOrder() in orders.js

  β–Έ SECURITY
    Score: [β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 2/10
    "Your API key is hardcoded in config.js and committed to GitHub.
     Somewhere, a hacker is sending you a thank-you card."
    Evidence: config.js:12 β€” STRIPE_SECRET_KEY='sk_live_...'

  β–Έ NAMING
    Score: [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘] 6/10
    "Who is 'x'? What does 'doThing' do? 'temp2' β€” a sequel nobody asked for."
    Evidence: helpers.js β€” 14 single-letter variables in 80 lines

  β–Έ TESTS
    Score: [β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘] 0/10
    "Zero test files found. You are speed-running technical debt."
    Evidence: No test/ or __tests__/ directory anywhere

  ────────────────────────────────────────────

  OVERALL ROAST GRADE

  πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚              ROAST GRADE: D+                   β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯

  ────────────────────────────────────────────

  Final Verdict:
  "This codebase has the structure of a fever dream and the security
   posture of a screen door. It works, which is somehow the most
   damning thing I can say. Ship it, just not to production."

Features

  • Roasts GitHub repos by URL or local directories
  • Five scored categories: Architecture, Code Quality, Security, Naming, Tests
  • Evidence-backed verdicts β€” not vibes, actual file:line citations
  • Gordon Ramsay caliber system prompt (perfected over 40+ iterations)
  • Reads up to 50 files, 200 lines each β€” enough signal without blowing context
  • Colored output with ASCII score bars
  • Works on JS, TS, Python, Go, Rust, PHP, Ruby, and more

How It Works

  1. Accepts a GitHub URL or local path
  2. Clones the repo (if URL) to a temp directory
  3. Scans for source files across 10+ languages
  4. Reads up to 50 files, 200 lines each
  5. Sends to Claude with a Gordon Ramsay-caliber system prompt
  6. Parses the structured roast response
  7. Formats and displays with color-coded scores and emoji fire

Roast Categories

Category What It Judges
Architecture Structure, patterns, separation of concerns, folder organization
Code Quality Readability, DRY violations, complexity, dead code, anti-patterns
Security Hardcoded secrets, injection risks, unvalidated input, CORS misconfig
Naming Variables, functions, files β€” self-documenting or a cry for help?
Tests Coverage, quality, edge cases β€” or the glorious absence thereof

Scoring

Score Meaning
9–10 Gordon himself would approve. Genuinely rare.
7–8 Decent. Could be worse. Faint praise is still praise.
5–6 Edible but not enjoyable. Steak cooked medium-well.
3–4 Concerning. Technical debt with interest accumulating daily.
1–2 A disaster. No offense to the junior who wrote this.
0 You've made coding history, and not in a good way.

Requirements

  • Node.js 18+
  • ANTHROPIC_API_KEY environment variable (get one here)

See Also

  • pr-poet β€” PR descriptions that are actually good. Also: haikus.
  • readme-surgeon β€” README feedback and surgical fixes
  • blame-ai β€” git blame, but make it AI's fault

License

MIT β€” NickCirv

About

Brutally honest AI code reviews. Roasts your code, then tells you exactly how to fix it. Your code called β€” it's crying. πŸ”₯

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors