cr

When user uses /cr slash command, review uncommitted code changes with reusable language-aware rules, preferring project-local review commands or rules when they exist.

Command for Claude Code

View the source file n9e/fe
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/n9e/fe/cr
Clone the repo
git clone --depth 1 https://github.com/n9e/fe

Made for: Claude Code.

Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00034 $0.01234
Opus 5 $0.00017 $0.00617
Sonnet 5 $0.00007 $0.00247
Haiku 4.5 $0.00003 $0.00123

Measured today against content hash 19d01690397f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cr 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 today.

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/cr.md · 146 lines

How it starts

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

/cr - Generic Code Review

When the user invokes /cr, review the current repository's uncommitted changes. This skill is intentionally generic: it focuses on review rules and changed code, not branch comparison or release workflow.

Project-Local Rules First

Before applying the generic checklist, look for project-specific review rules and prefer them when present.

Check likely locations:

find . -maxdepth 4 \( -path './node_modules' -o -path './.git' \) -prune -o \
  \( -path './.cursor/commands/cr.md' -o -path './.cursor/rules' -o -name 'AGENTS.md' -o -name 'CLAUDE.md' \) -print

If a project-local /cr command or review rules exist:

  • Read and apply them first.
  • Use generic /cr rules only as a fallback or supplement.
  • In the report, state which project-local files were applied.
  • If project-local rules conflict with this generic skill, project-local rules win.

Scope

Review uncommitted changes only:

git status -sb
git diff --name-status
git diff --stat
git diff
git diff --staged --name-status
git diff --staged --stat
git diff --staged
git ls-files --others --exclude-standard

Do not compare against upstream branches, merge bases, or release targets unless the user explicitly asks. If there are no staged, unstaged, or relevant untracked changes, report that there is nothing to review.

For untracked files, inspect them when they look like source, config, migration, test, or documentation files related to the change.

Language Profiles

Infer active profiles from changed files and project layout. Apply all matching profiles.

React / TypeScript Frontend

Use for ts, tsx, js, jsx, css, less, scss, route, i18n, and frontend config changes.

Focus on:

  • Type safety: props, hooks, API responses, generics, casts, any, and stale interfaces.
  • React behavior: hook dependencies, stale closures, memoization misuse, controlled inputs, key stability, effects with async work, and cleanup.
  • Error and loading states: failed requests, empty states, retries, disabled controls, and user-facing feedback.
  • Null safety: optional data, arrays, refs, DOM access, nested API fields, and conditional rendering.
  • Feature flags and environment gates for new behavior.
  • State consistency: React Query cache invalidation, Zustand/store updates, URL state, local storage, and cross-tab behavior.
  • Layout impact: overflow, responsive behavior, fixed heights, table columns, modals, z-index, and style leakage.
  • i18n: missing keys, hard-coded user-facing text, wrong locale file updates, and malformed translation keys.
  • Tests: missing focused tests for changed formatting, branching, hooks, reducers, or regressions.

Read the full file on GitHub · 146 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. today First seen · 146 lines · 34 tokens per session scan A 19d01690397f

Subscribe to this mod's changes

cr is a command published in the GitHub repository n9e/fe (302 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 1,234 once invoked, about $0.0002 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-01.