green-repo

green-repo is a command for Claude Code from kensaurus/cursor-kenji. It costs 26 tokens per session (418 once invoked), scanned A, original, MIT.

A command for bringing an entire code repository to a verified-green state, meaning its type checks, lint checks, tests, and build all pass from a clean run. It includes fixing previously existing problems when that work is explicitly allowed.

In plain words
What is it for?
Useful for discovering the repository's checks, recording failures, fixing authorized issues, and rerunning every gate to confirm the repository passes.
Why use it?
It turns a scattered set of repository failures into a tracked repair process. It also separates real failures from flaky or environment-dependent ones before claiming success.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Useful for discovering the repository's checks, recording failures, fixing authorized issues, and rerunning every gate to confirm the repository passes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kensaurus/cursor-kenji/green-repo
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/kensaurus/cursor-kenji

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 green-repo

README.md
[![agentmods](https://agentmods.dev/badge/commands/kensaurus/cursor-kenji/green-repo.svg)](https://agentmods.dev/commands/kensaurus/cursor-kenji/green-repo)
Your own site
<a href="https://agentmods.dev/commands/kensaurus/cursor-kenji/green-repo"><img src="https://agentmods.dev/badge/commands/kensaurus/cursor-kenji/green-repo.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 418 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.00026 $0.00418
Opus 5 $0.00013 $0.00209
Sonnet 5 $0.00005 $0.00084
Haiku 4.5 $0.00003 $0.00042

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

Security

Grade A, and why

green-repo 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.

commands/green-repo.md · 36 lines

What it actually says

Green Repo

Drive the entire repository to a verified-green baseline: typecheck, lint, tests, and build all passing from a clean run. Use this only when fixing pre-existing debt is explicitly authorized — for a single plan use /complete-everything, and for one searchable pattern use /burndown-full.

Follow the workflow-green-repo skill end to end. In brief:

  1. Confirm scope and discover gates — whole repo vs. a package. Read package.json, Makefile, CI workflows, and AGENTS.md/CLAUDE.md for the real typecheck/lint/test/e2e/build commands. Capture the baseline.
  2. Enumerate every failure into .cursor/green-repo-state.md, separating real failures from flaky/environment-dependent ones. State the totals.
  3. Fix root causes in batches, ticking each immediately. Never skip, .only, @ts-ignore, or blanket-update snapshots to force green. Append newly surfaced failures and fix them in this run.
  4. Prove green from scratch — re-run every gate clean; zero unchecked failures outside justified, human-signed-off exceptions.
  5. Report the result, fixed count, quarantined items, and any real environment blockers.

Green is defined by a fresh from-scratch run of every gate, not by the failures you happened to notice.

The full playbook lives in the workflow-green-repo skill.

Related: complete-everything (one plan's connected scope), burndown-full (one searchable pattern), verification-before-completion (evidence levels), completion-judge (independent green verdict).

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 · 36 lines · 26 tokens per session scan A ecd09795418f

Subscribe to this mod's changes

green-repo is a command published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 10d ago), licensed MIT. It adds 26 tokens to every session and 418 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-31.