Review

From FriendlyInternet/nuxt-crouton · View interactive version

Review is an AI agent skill from the GitHub repository FriendlyInternet/nuxt-crouton. Code Review Assistant. Reviews uncommitted changes or recent commits for pattern violations, security issues, and bugs. Optimized for solo dev moving fast. Use when reviewing code before or after committing.

How to use this skill

Skill file

Review Skill

Fast, opinionated code review for a solo dev shipping quickly. Catches real problems, skips bikeshedding.

Modes

| Invocation | What it reviews |

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

| /review | All uncommitted changes (staged + unstaged) |

| /review last N | The last N commits on current branch |

| /review --scope <pkg> | Uncommitted changes filtered to a package |

| /review --file <path> | A single file |

Rules

  1. No style opinions — formatting, naming preferences, comment style → skip. That's linting.
  2. No scope creep — only review what's in the diff. Never suggest "while you're here..." changes.
  3. No praise — don't say "nice work" or "good use of". Just flag problems or say "clean".
  4. Severity matters — categorize every finding. Don't mix critical bugs with nits.
  5. Be specific — file, line, what's wrong, how to fix. No vague "consider improving".
  6. Trust the dev — if something looks intentional, don't flag it. Flag things that look accidental.

Severity Levels

| Level | Meaning | Action |

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

| 🔴 Critical | Security hole, data loss risk, crash | Must fix before shipping |

| 🟡 Warning | Bug likely, pattern violation, missing validation | Should fix soon |

| 🔵 Note | Minor issue, potential improvement | Fix when convenient |

Fast-Path for Non-Code Changes

When the diff contains only documentation and config files (.md, .yml, .yaml, .json, .toml, .txt) and no code files (.ts, .vue, .css, .scss, .js, .mjs), skip the full checklist and use this shortened review:

Check:

Skip: Security, correctness, project patterns, package boundaries, dead code, API endpoints, Vue components — these don't apply to non-code changes.

Detection:

# If this returns nothing, it's a doc-only diff → use fast-path
git diff --name-only <base>..<branch> | grep -E '\.(ts|vue|css|scss|js|mjs)$'

Produce the same structured report format, just with the shorter checklist.

Workflow

Step 1: Gather the diff

For uncommitted changes (/review or /review --scope):

git diff                  # unstaged
git diff --cached         # staged
git status               # new files

For recent commits (/review last N):

git log --oneline -N
git diff HEAD~N..HEAD

For single file (/review --file <path>):

git diff -- <path>        # if modified
# or just read the file if it's new

If --scope is set, filter to files matching packages/<pkg>/** or apps/<pkg>/**.

Step 2: Read the full context

For every changed file, read the COMPLETE file (not just the diff). You need surrounding context to catch:

For files over 500 lines, read at minimum the changed sections ±50 lines.

Step 3: Run checks

Check every changed file against this checklist. Skip categories that don't apply (e.g., skip "API" checks for a component file).

Security
Correctness
Project Patterns (from CLAUDE.md)
Package Boundaries
Dead Code
API Endpoints (server/ files only)
Gates, Checks & Flow Steps

Applies when the diff adds or changes a rule that judges other code (a validator, a CI check, a

sign-off gate) or a step that mutates state (writes a file, commits, labels, dispatches). See

AGENTS.md → Authoring a gate for the argument.

git add on a gitignored path adds nothing (#1933) · --add-label X on an issue already carrying

X fires no event, so nothing downstream wakes (#1750) · rows.filter(r => r.refTarget) dropped

the relations missing a target, then reported "No relationships" (#1953)

can't distinguish "did the work" from "did nothing", say so and add the proof

committable rather than trusting the write; remove-then-add rather than hoping the event fires

the rule matches its author's imagination — #1957's first version passed 8 and would have refused

4 shipping schemas. Cheap to do:

node scripts/corpus-check.mjs --glob 'apps/*/schemas/*.json' --rule ./my-rule.mjs

(advisory — skip it when there's no meaningful corpus, e.g. a rule over one generated file)

proved nothing

Vue Components (*.vue files only)

Step 4: Produce the report

If nothing found:
## Review: clean ✅

Reviewed N files, no issues found.
If issues found:
## Review Summary

| Severity | Count |
|----------|-------|
| 🔴 Critical | X |
| 🟡 Warning | Y |
| 🔵 Note | Z |

### 🔴 Critical

#### [Short title]
**File:** `path/to/file.ts:42`
**Issue:** [What's wrong]
**Fix:** [How to fix — be specific, show code if helpful]

---

### 🟡 Warning

#### [Short title]
**File:** `path/to/file.vue:15`
**Issue:** [What's wrong]
**Fix:** [How to fix]

---

### 🔵 Note

#### [Short title]
**File:** `path/to/file.ts:88`
**Issue:** [What's wrong]
**Fix:** [How to fix]

Step 5: Offer to fix

After presenting the report:

Want me to fix any of these? (all / critical only / pick by number)

If user says "all" or "critical only", fix them directly — no confirmation per fix. Use Edit tool. After fixing, run pnpm typecheck on affected apps.

Parallelization

When reviewing 5+ files, split into parallel agents:

For <5 files, review sequentially in the main context — agent overhead isn't worth it.

Edge Cases

No changes

Nothing to review — working tree is clean and no commits specified.

Binary/generated files

Skip: *.sqlite, *.wasm, pnpm-lock.yaml, .nuxt/, dist/, .wrangler/, node_modules/

Large diffs (50+ files)

Warn the user and suggest scoping:

50+ files changed. Consider scoping:
  /review --scope crouton-core
  /review --file path/to/important-file.ts

Then proceed if they confirm, using parallel agents.

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.