@4l3c/vibecheck
v0.1.3
Published
Scan codebases for AI-generated code issues ("AI slop") and generate fix prompts
Maintainers
Readme
vibecheck
Scan codebases for AI-generated code issues ("AI slop") and generate structured fix prompts.
84% of developers use AI coding tools, but the generated code consistently contains placeholder data, stub functions, empty error handlers, hardcoded secrets, and debug leftovers. vibecheck detects these patterns, scores your codebase with an AI Slop Index (0-100), and generates a fix prompt you can paste into any AI tool to fix its own mistakes.
Install
npm install -g vibecheckUsage
Scan a project
vibecheck scan vibecheck — AI Slop Index
32 [C+]
▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░
18 issues found · 2 critical | 5 high | 8 medium | 3 low
142 files scanned in 89msGenerate a fix prompt
vibecheck promptGenerates a structured markdown prompt with every issue, its location, code snippet, and fix instructions. Paste it into Claude, ChatGPT, Cursor, or any AI tool to fix everything at once.
vibecheck prompt --output fixes.md # Write to file
vibecheck prompt --clipboard # Copy to clipboardJSON output (for CI)
vibecheck scan --jsonReturns structured JSON with score, grade, passed, and full issue list. Exit code 1 when score exceeds threshold.
# Fail CI if AI Slop Index exceeds 30
vibecheck scan --json --threshold 30Initialize config
vibecheck initCreates a .vibecheck.yaml with default settings.
What it detects
Pattern rules (regex-based)
| Rule | What it catches | Examples |
|------|----------------|----------|
| placeholder-data | Mock emails, names, URLs, API keys, passwords | [email protected], John Doe, sk-test-xxx |
| debug-leftovers | Console statements, TODO/FIXME, debugger, AI artifacts | console.log(...), // TODO: implement, // I've updated the code to... |
| hardcoded-values | Localhost URLs, connection strings, secrets, ports | http://localhost:3000, postgres://admin:secret@... |
| generic-names | Overly generic variable/function names | const data =, const temp =, function doStuff() |
AST rules (TypeScript Compiler API)
| Rule | What it catches | Examples |
|------|----------------|----------|
| empty-handlers | Empty catch blocks, console-only error handlers | catch (e) {}, .catch(() => {}) |
| stub-functions | Functions returning null/undefined, empty bodies | return null, throw new Error("Not implemented") |
| unused-code | Imported identifiers never used in the file | import { unused } from 'mod' |
Scoring
The AI Slop Index (0-100) uses weighted severity scoring:
| Severity | Weight | |----------|--------| | Critical | 10 | | High | 5 | | Medium | 2 | | Low | 1 |
Formula: min(100, round((rawScore / filesScanned) * 5))
Critical issues impose a minimum floor (criticalCount * 5) so they can't be diluted in large projects.
| Grade | Score | |-------|-------| | A+ | 0-5 | | A | 6-8 | | A- | 9-12 | | B+ | 13-16 | | B | 17-22 | | B- | 23-28 | | C+ | 29-34 | | C | 35-40 | | C- | 41-46 | | D+ | 47-52 | | D | 53-58 | | D- | 59-65 | | F | 66-100 |
Configuration
Create a .vibecheck.yaml in your project root (or run vibecheck init):
# Disable a rule
rules:
generic-names:
enabled: false
# Override severity
rules:
debug-leftovers:
severity: low
# Ignore patterns (added to defaults)
ignore:
- "generated/**"
- "vendor/**"
# CI threshold
failThreshold: 30
# Output
output:
colors: true
verbose: falseProgrammatic API
import { scan, generateFixPrompt, calculateScore } from 'vibecheck';
const result = await scan({ rootDir: './src' });
console.log(result.score, result.grade, result.issues.length);
const prompt = generateFixPrompt(result);License
MIT
