code-review

A code-change review command that checks implementation quality, correctness, security, performance, and maintainability. It examines the current branch, changed files, and recent differences.

In plain words
What is it for?
Use it to review local code changes for readability, logic errors, error handling, type safety, security risks, dependency issues, and unnecessary performance costs.
Why use it?
It provides a repeatable checklist for problems such as missed edge cases, unsafe input handling, exposed secrets, duplicated code, and incorrect asynchronous code.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nicepkg/vsync/code-review
Clone the repo
git clone --depth 1 https://github.com/nicepkg/vsync

Made for: Claude Code.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 818 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00818
Opus 5 $0.00005 $0.00409
Sonnet 5 $0.00002 $0.00164
Haiku 4.5 $0.00001 $0.00082

Measured 2d ago against content hash fee595a6f908, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/code-review.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Review

Review the code changes for: $ARGUMENTS

Context

  • Current branch: !git branch --show-current
  • Git status: !git status --short
  • Recent changes: !git diff --stat HEAD~1 2>/dev/null || git diff --stat

Review Checklist

1. Code Quality

  • Readability: Is the code easy to understand?
  • Simplicity: Is this the simplest solution? Any over-engineering?
  • DRY: Is there duplicated code that should be abstracted?
  • Naming: Are variables, functions, and files named clearly?
  • Comments: Are complex sections documented? (No obvious comments)

2. Logic & Correctness

  • Edge cases: Are edge cases handled (null, empty, bounds)?
  • Error handling: Are errors caught and handled appropriately?
  • Type safety: Are TypeScript types used correctly?
  • Async/await: Are promises handled correctly? No unhandled rejections?

3. Security (OWASP Top 10)

  • Injection: No SQL/command injection vulnerabilities?
  • XSS: User input properly sanitized for display?
  • Sensitive data: No secrets, tokens, or PII in code?
  • Dependencies: No known vulnerable dependencies?

4. Performance

  • Unnecessary renders: React components optimized (memo, useMemo, useCallback)?
  • Bundle size: No large unnecessary imports?
  • N+1 queries: No inefficient data fetching patterns?
  • Memory leaks: Event listeners and subscriptions cleaned up?

5. Project Conventions

  • File structure: Files in correct directories?
  • Import paths: Using ~/ alias correctly?
  • Config values: Using site-info.ts instead of hardcoding?
  • UI components: Not modifying components/ui/ (shadcn managed)?

Review Format

Provide feedback in this format:

Summary

Brief overall assessment (1-2 sentences).

Issues Found

🔴 Critical (Must Fix)
File: path/to/file.ts:123
Issue: [Description]
Suggestion: [How to fix]

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 123 lines · 11 tokens per session scan A fee595a6f908

Subscribe to this mod's changes

code-review is a command published in the GitHub repository nicepkg/vsync (57 stars, last pushed 7mo ago), licensed MIT. It adds 11 tokens to every session and 818 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories