fe: Command for Claude Code

.claude/commands/cr.md

cr is a command for Claude Code from n9e/fe. It costs 34 tokens per session (1,234 once invoked), scanned A, original, Apache-2.0.

A slash command that reviews code changes not yet committed to Git, a tool for tracking project history.

In plain words
What is it for?
Use it for a focused review of modified, staged, or newly created files before committing them.
Why use it?
It finds problems in the changes you are about to commit and applies project-specific review instructions when available.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is n9e/fe's own configuration. It tells Claude Code how to work on fe itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fe configures →

View source ↗ n9e/fe
Reuse

Borrowing it

Nothing to install: this file belongs to n9e/fe. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/n9e/fe/main/.claude/commands/cr.md
Clone the repo
git clone --depth 1 https://github.com/n9e/fe

Made for: Claude Code.

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 cr

README.md
[![agentmods](https://agentmods.dev/badge/commands/n9e/fe/cr/github.svg)](https://agentmods.dev/commands/n9e/fe/cr)
Your own site
<a href="https://agentmods.dev/commands/n9e/fe/cr"><img src="https://agentmods.dev/badge/commands/n9e/fe/cr/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 cr

Your own site · 80×15
<a href="https://agentmods.dev/commands/n9e/fe/cr"><img src="https://agentmods.dev/badge/commands/n9e/fe/cr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00034 $0.01234
Opus 5.5 $0.00014 $0.00494
Sonnet 5.5 $0.00007 $0.00247
Haiku 4.5 $0.00003 $0.00123

Measured 1mo ago against content hash 19d01690397f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/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. 1mo ago 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 (308 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 1,234 once invoked, about $0.0001 per session on Opus 5.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.