lean-review

lean-review is a skill for Claude Code from Snowflake-Labs/cocoplus. It costs 44 tokens per session (1,302 once invoked), scanned A, original, MIT.

A review tool that scans the current uncommitted Git changes and labels code that may be unnecessary, replaceable, premature, or larger than needed.

In plain words
What is it for?
Use it before committing to inspect the diff for unused code, unnecessary abstractions, native alternatives, and opportunities to shrink the change.
Why use it?
It catches over-engineering while changes are still being reviewed, before it becomes part of a commit.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it before committing to inspect the diff for unused code, unnecessary abstractions, native alternatives, and opportunities to shrink the change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/snowflake-labs/cocoplus/lean-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.

Any agent
npx skills add Snowflake-Labs/cocoplus --skill lean-review
Clone the repo
git clone --depth 1 https://github.com/Snowflake-Labs/cocoplus

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 lean-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/lean-review/github.svg)](https://agentmods.dev/skills/snowflake-labs/cocoplus/lean-review)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/lean-review"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/lean-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 lean-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/snowflake-labs/cocoplus/lean-review"><img src="https://agentmods.dev/badge/skills/snowflake-labs/cocoplus/lean-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,302 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.00044 $0.01302
Opus 5 $0.00022 $0.00651
Sonnet 5 $0.00009 $0.00260
Haiku 4.5 $0.00004 $0.00130

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

Security

Grade A, and why

lean-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 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.

.cortex/skills/cocolean/lean-review.skill.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.

Objective

You are executing $lean review — a diff-scoped over-engineering audit. Scan the uncommitted git diff and apply five CocoLean classification tags to each introduced construct. The audit is scoped to the current diff only — not the entire codebase. Feedback must be actionable at the moment of highest receptivity: before the commit.

Before proceeding, verify that .cocoplus/ exists. If not, output: "CocoPlus is not initialized. Run $pod init first." Then stop.

Step 1 — Run Deterministic Diff Scanner

invoke cocolean/lean-review-engine

The script reads git diff (unstaged and staged changes), applies AST-level pattern matching, and outputs a JSON finding list. Read the JSON output.

If no uncommitted changes exist, output: "No uncommitted changes found. $lean review operates on the current diff — stage or modify files first." Then stop.

Step 2 — Classify Findings by Tag

Apply the five CocoLean classification tags in severity order:

Tier 1 — Existence-level (surface first):

  • delete — Code with no callers, no tests, and no declared future use in spec.md or discuss.md. It should not exist yet. Severity: blocking if it touches a trust boundary; important otherwise.

  • yagni — Abstractions, configuration flags, extension points, or generalization layers added speculatively for requirements not in the current spec. "You Aren't Gonna Need It." Severity: nit if no security risk; important if it expands the attack surface or adds untested code paths.

Tier 2 — Correctness-level (surface second):

  • stdlib — Logic that reimplements functionality already present in Snowflake built-in functions or standard SQL. Include the specific replacement construct in the finding. Severity: important.

  • native — A custom AI function performing a task more correctly expressed as a native Snowflake object (materialized view, stream, task, dynamic table, policy, alert). Include the recommended native object type. Severity: important.

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 · 44 tokens per session scan A 79a585e51168

Subscribe to this mod's changes

lean-review is a skill published in the GitHub repository Snowflake-Labs/cocoplus (720 stars, last pushed 5d ago), licensed MIT. It adds 44 tokens to every session and 1,302 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-03.

Related

Other skills, from other repositories

understand-pr

Guided interactive PR review — understand the history and context before forming opinions.

mastra-ai/mastra · 18 tokens

flag-cleanup

Weekly reusable-session feature-flag cleanup for {{targetrepo}}. Inventories every feature flag, classifies each as fully rolled out, long dead, partial rollout, or active experiment, removes the flag and the dead branch it guards on an isolated branch when the suite is green, and opens a PR — never touching a flag…

kortix-ai/suna · 74 tokens

github-commenting

How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules. Load before posting or fixing any PR comment.

juspay/neurolink · 41 tokens

prepare-pr

End-to-end drives working-tree changes to a review-ready pull request — commit, sync base, squash to one commit, open/update the PR — then KEEPS RUNNING IN-SESSION (poll CI + code-review bots in 5-min rounds, up to 10) fixing every legitimate Critical/High finding and build failure until the PR is review-ready (never…

kirodotdev/KiroCrew · 0 tokens

pr-description

Write a short, visual, evidence-backed GitHub PR description and open or update the PR with it. Use whenever the user asks to open a PR, write or rewrite a PR description, 'describe this change', or run gh pr create — even if they don't say 'description'. Gathers real proof first (screenshots for UI, terminal…

petekp/claude-code-setup · 120 tokens

commit-changes

Stage, commit, and amend changes with conventional commit messages. Covers reviewing changes, selective staging, writing descriptive commit messages using HEREDOC format, and verifying commit history. Use when saving a logical unit of work to version control, creating a commit with a conventional message, amending the…

pjt222/agent-almanac · 72 tokens