plugins/dev/skills/code-roast/SKILL.md
Roasts code with severity-graded sins, cites file:line, and offers redemption in a humorous tone. Use when the user asks to roast code, find sins, shame my code, or get a code quality roast.
npx skillsauth add madappgang/magus code-roastInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Code Roast skill performs a humorous but technically rigorous code quality analysis using a registry of 192 anti-patterns across 8 languages plus universal categories.
Core Rules:
file:line — every sin gets a precise locationWhat it covers: Go, Java, C#, TypeScript/JavaScript, Python, React, HTML/CSS, SQL, universal patterns (SOLID, microservices, testing, CI/CD, dependencies, concurrency), and AI-generated code ("slop") detection.
Before starting, read the companion files for this skill:
sin-registry.md — but ONLY the sections relevant to the detected languages in the target code. Do NOT read all 192 patterns if the project is Go-only.detection-patterns.md — focus on Tier 1 patterns for detected languages, then check Tier 2 tool availability.Language detection: Look at file extensions in the target scope to determine which language sections to load.
Determine what code to roast. In priority order:
git diff or git diff main...HEADgit diff HEAD~5 for recent workFor large scopes (>50 files), ask the user to narrow down:
Use AskUserQuestion:
"This codebase has {N} files. Want me to roast everything or focus on a specific area?"
Options: "Full scan", "Changed files only (git diff)", "Specific directory"
Output: List of target files with language breakdown.
Before the detailed analysis, deliver 2-3 personalized devastating observations based on a quick scan. These set the tone and show you've actually looked at the code.
How to generate:
Format:
## Opening Salvo
I've looked at your code. I have... opinions.
- [Observation 1 about the worst thing you noticed immediately]
- [Observation 2 about a structural issue]
- [Optional observation 3 if something truly egregious stands out]
Let's see what the sin registry has to say.
Tone calibration: Match the tone level (see Tone Calibration section below). Default is MEDIUM.
This is the main detection phase. Execute the three-tier detection pipeline from detection-patterns.md.
Step 1: Tier 1 — Built-in Grep Detection (ALWAYS)
Run Grep patterns from detection-patterns.md Tier 1 section for the detected languages. Start with CAPITAL patterns, then FELONY, then CRIME.
For each match:
sin-registry.mdStep 2: Tier 2 — CLI Tool Detection (IF AVAILABLE)
Check which Tier 2 tools are installed using Bash:
which golangci-lint eslint ruff semgrep stylelint 2>/dev/null
For each available tool, run it with JSON output. Parse results and map tool rule IDs to sin-registry entries.
DO NOT:
Step 3: Tier 3 — Cloud API Detection (IF KEYS PRESENT)
Check for cloud service env vars. Only mention these if they would add significant value:
echo "${SONAR_TOKEN:+sonar}" "${SNYK_TOKEN:+snyk}" "${GITHUB_TOKEN:+gh-scanning}"
If available, query the relevant API. If not, skip silently.
Group findings by severity, then by file:
## Sin Inventory
### CAPITAL OFFENSES (fix NOW)
**{ID}: {Name}** — `{file}:{line}`
> {Roast line from sin-registry}
> **Fix**: {Fix hint}
**{ID}: {Name}** — `{file}:{line}`
> {Roast line}
> **Fix**: {Fix hint}
### FELONIES (fix today)
...
### CRIMES (fix this sprint)
...
### MISDEMEANORS (fix when touched)
...
### PARKING TICKETS (noted)
...
### AI SLOP DETECTED (review and rewrite)
...
Summary line at the end:
**Sin Count**: {N} total — {capital} CAPITAL, {felony} FELONY, {crime} CRIME, {misdemeanor} MISDEMEANOR, {ticket} PARKING TICKET, {slop} SLOP
If no sins found, see Recovery Table below.
Pick the single worst sin (highest severity, most impactful) and do a surgical breakdown:
## Autopsy: {Sin Name}
**Location**: `{file}:{line_start}-{line_end}`
**Severity**: {SEVERITY}
**Detected by**: {detection method}
### The Code
{Show the actual offending code snippet, 5-15 lines}
### Why This Is Bad
{2-3 sentences explaining the actual technical impact. Be specific:
memory leak rate, deadlock conditions, security exposure, performance cost.}
### The Roast
{Extended roast — 2-3 sentences, more creative than the one-liner from the registry.
Build on the registry's roast but make it specific to THIS code.}
### The Fix
{Show the corrected code. Same snippet but fixed.}
CRITICAL: After presenting the sin inventory and autopsy, you MUST stop and ask the user what they want to fix.
Do NOT automatically start fixing code. The user chooses.
Use AskUserQuestion:
question: "Which sins do you want me to fix?"
options:
- "Fix all CAPITAL + FELONY sins (Recommended)"
description: "Fix the {N} most critical issues that could cause crashes, data loss, or security breaches"
- "Fix everything"
description: "Fix all {total} sins across all severity levels"
- "Let me pick specific ones"
description: "I'll tell you which specific sins to address"
- "Just the report, thanks"
description: "Keep the analysis but don't change any code"
If the user picks "Let me pick specific ones", ask them to specify sin IDs or severity levels.
Execute the fixes the user selected. For each fix:
Format:
## Resurrection
### Fixed: {ID} {Sin Name} — `{file}:{line}`
**Before**:
{old code}
**After**:
{new code}
---
After all fixes:
## Resurrection Complete
**Fixed**: {N} sins across {M} files
**Remaining**: {R} sins (user chose not to fix)
**New sin count**: {total - N}
If the project went from many sins to few, add a redemption message matching the tone level.
Default tone is MEDIUM. The user can request a different tone by saying things like "be gentle", "go savage", "nuclear mode", or "be nice about it".
| Level | When | Opening Style | Roast Intensity | Fix Presentation |
|-------|------|---------------|-----------------|------------------|
| GENTLE | User says "be nice", "gentle", beginner code | Encouraging with observations | Mild observations, no burns | "Here's a more idiomatic approach..." |
| MEDIUM | Default; peer review tone | Direct, witty, professional | Registry roast lines as-is | "Fix: {hint}" |
| SAVAGE | User says "savage", "don't hold back", "roast hard" | Devastating opening | Extended roasts, callbacks to previous sins | "You have 48 hours to fix this before I tell your DBA" |
| NUCLEAR | User explicitly says "nuclear" | Scorched earth | Full creative mode, absurdist escalation | "The only fix is git rm -rf and starting over. I'm kidding. Mostly." |
GENTLE (same sin):
"I notice this function might benefit from error handling — here's a more robust approach."
MEDIUM:
"Congratulations, you've invented Schrodinger's File — it's both open and corrupted until production explodes."
SAVAGE:
"Congratulations, you've invented Schrodinger's File — it's both open and corrupted until production explodes. I counted 14 of these in your codebase. Your error handling strategy is 'hope.'"
NUCLEAR:
"I found 14 ignored errors in your codebase. Your error handling strategy makes YOLO look conservative. Your production server is running on prayers and the structural integrity of whatever intern wrote the happy path. I've seen better error handling in bash scripts that start with
set -e— which, by the way, yours doesn't."
# Code Roast Report
**Target**: {scope description}
**Files scanned**: {N}
**Languages**: {list}
**Tone**: {GENTLE|MEDIUM|SAVAGE|NUCLEAR}
**Detection**: Tier 1 (grep){+ Tier 2 (CLI tools)}{+ Tier 3 (cloud)}
# Code Roast Report
I've scanned {N} files across {languages} and...
I have nothing. Your code is clean. This is either genuinely excellent engineering
or you've hidden the bodies very well.
**Recommendation**: Run the full tool suite (Tier 2) for deeper analysis.
The grep patterns catch the obvious sins, but some need AST analysis to detect.
**Note**: Some patterns are best detected by specialized tools.
Consider installing for deeper analysis:
- `golangci-lint` (Go) — catches {N} additional patterns
- `ruff` (Python) — catches {N} additional patterns
- `eslint` (TS/JS) — catches {N} additional patterns
These are optional and free. The roast is complete without them.
| Situation | Action | |-----------|--------| | No sins found | Congratulate genuinely; suggest Tier 2 tools for deeper scan | | All tools missing (Tier 2) | Tier 1 grep patterns still work; note tool recommendations | | Target too large (>200 files) | Ask user to narrow scope | | Language not in registry | Use universal patterns (UNI-*) + SLOP patterns; note coverage gap | | User says "stop" mid-roast | Stop immediately; show what you have so far | | Sin is a false positive | Acknowledge and skip; explain why the pattern matched but isn't a real issue | | User disagrees with severity | Respect their judgment; they know their codebase constraints | | Mixed-language project | Load relevant sections for each detected language |
DO:
DON'T:
testing
A test skill for validation testing. Use when testing skill parsing and validation logic.
tools
--- name: bad-skill description: This skill has invalid YAML in frontmatter allowed-tools: [invalid, array, syntax prerequisites: not-an-array --- # Bad Skill This skill has malformed frontmatter that should fail parsing. The YAML has: - Unclosed array bracket - Wrong type for prerequisites (should be array, not string)
development
Sync model aliases from the curated Firebase database. Fetches default model assignments, short aliases, team compositions, and known model metadata from the claudish API. Run this to get fresh model recommendations.
tools
Release one or more Magus plugins to the distribution repos (magus, magus-alpha, magus-marketing). Handles version inference from git history, marketplace.json updates, tagging, and force-push to lean dist repos. Use whenever the user says "release kanban", "release the dev plugin", "cut a new version of gtd", "bump kanban to 1.7", or hands you a batch like "release kanban and gtd". Also use for multi-plugin releases and for checking what a release would contain before committing.