cr

cr is a command for coding agents from ZhangShenao/harness9. It costs 20 tokens per session (1,162 once invoked), scanned A, original, MIT.

A read-only command for reviewing all staged, unstaged, and untracked code changes before a commit. A commit is a saved checkpoint in a version-control system.

In plain words
What is it for?
It is for checking working-tree changes, including sensitive files identified by their paths, and reporting problems with their locations.
Why use it?
It helps find correctness problems, security risks, quality issues, and release risks before changes are committed, without running the project or altering files.

Command

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/zhangshenao/harness9/cr
Clone the repo
git clone --depth 1 https://github.com/ZhangShenao/harness9

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/zhangshenao/harness9/cr.svg)](https://agentmods.dev/commands/zhangshenao/harness9/cr)
Your own site
<a href="https://agentmods.dev/commands/zhangshenao/harness9/cr"><img src="https://agentmods.dev/badge/commands/zhangshenao/harness9/cr.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 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,162 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.00020 $0.01162
Opus 5 $0.00010 $0.00581
Sonnet 5 $0.00004 $0.00232
Haiku 4.5 $0.00002 $0.00116

Measured 5d ago against content hash 70d91a9b7268, 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 5d 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.

.opencode/commands/cr.md · 119 lines

How it starts

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

Review Working Tree

Overview

Perform a static review of every staged, unstaged, and untracked change without changing repository state or executing project code. A request for quick approval may shorten prose, never the review.

Read-Only Contract

Start with status, before reading any diff:

git status --short

Classify paths before content inspection. Treat these as sensitive from the path alone:

  • .env and .env.*;
  • *.pem, *.key, *.p12, *.pfx, id_rsa, and id_ed25519;
  • names containing credential, secret, or token.

Mark every such path Critical without reading its contents. Never open, hash, grep, print, or include it in a content diff. Reference it as path:1 and state that the location is path-based. Redact values.

Run both diffs only after excluding every sensitive path:

git diff -- . ':(exclude)<sensitive-path>'
git diff --cached -- . ':(exclude)<sensitive-path>'

Repeat the exclusion pathspec for each sensitive path; with none, run plain git diff and git diff --cached. Inspect only non-sensitive untracked files. For other potentially sensitive configuration, default to metadata/path-only review. Inspect targeted content only when the method guarantees output contains field names and line numbers but no values.

Never call apply_patch; never edit, create, delete, format, stage, commit, or mutate files or Git state.

This Skill is static review only. Do not execute project code, tests, builds, scripts, Git hooks, package managers, generators, or commands with possible writes, network access, or external side effects in the current checkout. Dynamic verification requires separate user authorization and an isolated copy or sandbox outside /cr; report it as not run.

Review Dimensions

Review each changed file and its relevant callers/tests:

Dimension Check
Correctness Logic, boundary conditions, nil/type errors, error handling
Security SQL/XSS/command injection, unsafe defaults, secret exposure
Maintainability Responsibilities, naming, duplication, needless complexity
Performance N+1 work, unnecessary loops or large copies
Test coverage Critical paths, failure cases, regression risk
Dependency safety Necessity, provenance, and locked versions

Read the full file on GitHub · 119 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. 5d ago First seen · 119 lines · 20 tokens per session scan A 70d91a9b7268

Subscribe to this mod's changes

cr is a command published in the GitHub repository ZhangShenao/harness9 (137 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,162 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.