elegant-code-review

elegant-code-review is a command for Claude Code from athola/claude-night-market. It costs 27 tokens per session (701 once invoked), scanned A, original, MIT.

A review command for checking each change against a simple decision ladder, from using existing code to adding a new dependency.

In plain words
What is it for?
Use it on staged or unstaged Git changes before committing, especially when a new dependency or a large diff needs review.
Why use it?
It helps reveal when a change is larger than the problem requires and suggests specific code or dependency deletions.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the conserve plugin — 15 skills, 6 commands, 5 agents shipped together

Good fit Use it on staged or unstaged Git changes before committing, especially when a new dependency or a large diff needs review.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/athola/claude-night-market/elegant-code-review
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.

Clone the repo
git clone --depth 1 https://github.com/athola/claude-night-market

Made for: Claude Code.

Or install conserve, the plugin that ships this one along with the rest of its 15 skills, 6 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elegant-code-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/athola/claude-night-market/elegant-code-review/github.svg)](https://agentmods.dev/commands/athola/claude-night-market/elegant-code-review)
Your own site
<a href="https://agentmods.dev/commands/athola/claude-night-market/elegant-code-review"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/elegant-code-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for elegant-code-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/athola/claude-night-market/elegant-code-review"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/elegant-code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 701 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.00701
Opus 5 $0.00014 $0.00351
Sonnet 5 $0.00005 $0.00140
Haiku 4.5 $0.00003 $0.00070

Measured 8d ago against content hash f94fc1fa4abc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

elegant-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 8d 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.

plugins/conserve/commands/elegant-code-review.md · 77 lines

How it starts

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

Elegant Code Review

Walk the current working diff against the elegant-code decision ladder. For each added hunk, name the rung that justifies it, flag any rung skipped, and propose concrete deletions. This is a per-change review. For whole-codebase cleanup, use /unbloat.

When To Use

  • After writing or generating a change, before committing.
  • When a diff feels larger than the problem it solves.
  • When a new dependency appears in a lockfile or manifest.

When NOT To Use

  • Whole-codebase dead-code sweeps: use /unbloat or /bloat-scan.
  • Throwaway scripts where review cost is near zero.

Steps

  1. Load the rubric: Skill(conserve:elegant-code).

  2. Collect the diff:

    • Default: git diff (unstaged) plus git diff --staged.
    • --staged: staged changes only.
    • --base REF: git diff REF...HEAD.
  3. For each added hunk, assign the lowest ladder rung that justifies it:

    1. Need-to-exist
    2. Builtin / stdlib
    3. Native platform
    4. Installed dependency
    5. A few lines A new dependency is the last resort, below rung 5. If one was added, confirm it with Skill(imbue:dependency-verification) and check whether an installed dependency already covered the need.
  4. Cross-check deletability with a real tool when available, treating output as candidates only:

    command -v knip >/dev/null && knip || echo "knip absent; skipping"
    command -v vulture >/dev/null && vulture . || echo "vulture absent; skipping"
    
  5. Apply the negligence floor before proposing any deletion. Never propose removing input validation, authorization, data-loss handling, error handling, security paths, or accessibility.

  6. Check completeness, not just excess. Flag a hunk that handles only the happy path: missing edge cases (empty, None, zero, boundary), missing negative or failure paths, or an obvious performance trap (quadratic loop, N+1 query). Minimal code that omits these is unfinished, not lean.

Output

A short table, one row per reviewed hunk:

Read the full file on GitHub · 77 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. 8d ago First seen · 77 lines · 27 tokens per session scan A f94fc1fa4abc

Subscribe to this mod's changes

elegant-code-review is a command published in the GitHub repository athola/claude-night-market (337 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 701 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-09-03.