Vibe code auditor

From kumaran-is/claude-code-onboarding · View interactive version

Vibe code auditor is an AI agent skill from the GitHub repository kumaran-is/claude-code-onboarding. Audit AI-generated or rapidly-prototyped code for structural flaws, hallucinated imports, fragility, and production risks before committing or handing off. Use when code was generated with AI assistance, evolved without deliberate architecture, or a prototype needs productionizing.

How to use this skill

Skill file

Iron Law

NO FINDINGS WITHOUT CODE EVIDENCE — every issue must cite file and line number (or structural location for snippets). Do not speculate about code you have not read.

Vibe Code Auditor

Overview

AI-generated and rapidly-prototyped code that "works" may contain hallucinated imports, missing library versions, architectural fragility, and production risks that are invisible during casual review.

This skill is the pre-commit gate for AI-assisted code — it runs before code-reviewer and security-reviewer to catch AI-specific artifacts first.

Core distinction from code-reviewer: code-reviewer assumes production-intent code. This skill assumes prototype/AI-generated code and specifically checks for hallucinated APIs and prototype-to-production gaps.

When to Use

Pre-Audit Checklist

Before beginning, confirm:

Quick Scan (first 60 seconds):

Pattern Recognition Shortcuts:

| Pattern | Likely Issue | Quick Check |

|---------|-------------|-------------|

| eval(), exec(), os.system() | Security critical | Search for these strings |

| except: or except Exception: | Silent failures | Grep for bare excepts |

| password, secret, key, token in code | Hardcoded credentials | Search + check if literal string |

| if DEBUG, debug=True | Insecure defaults | Check config blocks |

| Functions >50 lines | Maintainability risk | Count lines per function |

| Nested if >3 levels | Complexity hotspot | Visual scan |

| No tests in repo | Quality gap | Look for test_ / *.spec.ts files |

| Direct SQL string concat | SQL injection | Search for f"SELECT or + "SELECT |

| HTTP client calls without timeout | Production risk | Check fetch/axios/requests calls |

| while True without break | Unbounded loop | Search for infinite loops |

Audit Dimensions

Evaluate across all 7 dimensions. For each finding: dimension, title, location (file:line), severity, explanation, recommendation.

1. Architecture & Design

2. Consistency & Maintainability

3. Robustness & Error Handling

4. Production Risks

5. Security & Safety

6. Dead or Hallucinated Code *(AI-specific — unique to this skill)*

7. Technical Debt Hotspots

Calibration by Code Size

| Input size | Focus |

|---|---|

| Snippet (<100 lines) | Security, robustness, obvious bugs only |

| Single file (100-500 lines) | Add architecture and maintainability |

| Multi-file system (500+ lines) | Full audit across all 7 dimensions |

Output Format

Produce the audit report in this exact structure. If a section has no findings, write "None identified."

Audit Report

Input: [file name(s) or "code snippet"]

Assumptions: [list any assumptions about context or environment]

Quick Stats: [X files, Y lines of code, Z language/framework]

Executive Summary

In 3-5 bullets:

- [CRITICAL/HIGH] Most severe issue
- [CRITICAL/HIGH] Second most severe issue
- [MEDIUM] Notable pattern
- Overall: Deployable as-is / Needs fixes / Requires major rework
Critical Issues (Must Fix Before Production)

For each issue:

[CRITICAL] Short descriptive title
Location: filename.ts, line 42
Dimension: Architecture / Security / Robustness / etc.
Problem: What is wrong and why it is dangerous.
Fix: Minimum change required.
Code Fix (if applicable):
  // Before: ...
  // After: ...
High-Risk Issues

Same format as Critical, tag [HIGH].

Maintainability Problems

Same format, tag [MEDIUM] or [LOW].

Production Readiness Score
Score: XX / 100

Scoring algorithm:

Start at 100
CRITICAL issue: -15 (security CRITICAL: -20)
HIGH issue: -8
MEDIUM issue: -3
Pervasive pattern (3+ similar issues): -5 additional
Floor: 0, Ceiling: 100

| Range | Meaning |

|-------|---------|

| 0-30 | Not deployable |

| 31-50 | High risk — significant rework required |

| 51-70 | Low-stakes / internal only with close monitoring |

| 71-85 | Production-viable with targeted fixes |

| 86-100 | Production-ready |

Refactoring Priorities

Top 3-5 changes in impact order:

1. [P1 - Blocker] Fix title — addresses [CRITICAL #1] — effort: S/M/L — prevents [specific failure]
2. [P2 - Blocker] Fix title — addresses [CRITICAL #2] — effort: S/M/L
3. [P3 - High] Fix title — addresses [HIGH #1] — effort: S/M/L

Effort: S = <1 day, M = 1-3 days, L = >3 days

Behavior Rules

Post-Audit Next Steps

| Finding Type | Next Skill |

|---|---|

| Deep security vulnerabilities found | security-reviewer — full OWASP deep-dive |

| Architectural anti-patterns found | architect-review — distributed systems assessment |

| Tests missing across codebase | test-driven-development — Red-Green-Refactor cycle |

| Duplicate logic patterns found | dedup-code-agent — systematic deduplication |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.