lean-ctx-review

lean-ctx-review is a skill for Claude Code, Codex from yvgude/lean-ctx. It costs 73 tokens per session (1,538 once invoked), scanned A, original, Apache-2.0.

A session-review skill for examining how lean-ctx context tools behaved in a Claude Code session and preparing reports for confirmed upstream problems.

In plain words
What is it for?
Use it to inspect session transcripts, identify failed or repeated context-tool calls, and file issues when the evidence supports a bug.
Why use it?
It separates recorded tool failures, retries, and fallback use from personal guesses about what went wrong.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to inspect session transcripts, identify failed or repeated context-tool calls, and file issues when the evidence supports a bug.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yvgude/lean-ctx/lean-ctx-review
About the project

LeanCTX is a local Rust program that controls the repository context an AI coding agent receives, including selecting, compressing, remembering, and tracking information. Developers use it alongside coding agents to reduce repeated context and manage what those agents read and execute, while the catalogue entries provide related rules, skills, and instructions.

yvgude/lean-ctx · 3,728 stars · on GitHub · leanctx.com

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 yvgude/lean-ctx --skill lean-ctx-review
Clone the repo
git clone --depth 1 https://github.com/yvgude/lean-ctx

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/yvgude/lean-ctx/lean-ctx-review.svg)](https://agentmods.dev/skills/yvgude/lean-ctx/lean-ctx-review)
Your own site
<a href="https://agentmods.dev/skills/yvgude/lean-ctx/lean-ctx-review"><img src="https://agentmods.dev/badge/skills/yvgude/lean-ctx/lean-ctx-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,538 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 10
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00073 $0.01538
Opus 5 $0.00036 $0.00769
Sonnet 5 $0.00015 $0.00308
Haiku 4.5 $0.00007 $0.00154

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

Security

Grade A, and why

lean-ctx-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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scan_session.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/lean-ctx-review/SKILL.md · 141 lines

How it starts

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

lean-ctx session review

Upstream repo: yvgude/lean-ctx (https://github.com/yvgude/lean-ctx).

Reads a Claude Code session transcript, so it applies to agents that write ~/.claude/projects/*/*.jsonl. Other harnesses need their own extractor; the triage rules below are harness-independent.

1. Extract

Run from this skill's directory (needs python3):

python3 scripts/scan_session.py

Defaults to the newest transcript under ~/.claude/projects/*/ — the live Claude Code session. Pass a path to review a different one. -d N dumps call #N in full.

The script reports facts, not verdicts: every ctx_* call in order, which results the harness flagged is_error, which calls repeated identical arguments, which asked for raw/fresh output, and how many native Read/Grep/Bash calls happened. It deliberately does not guess which of those is a problem — that judgment is yours, below.

Transcripts run to megabytes, so read the table, not the raw JSONL.

2. Triage

Start from is_error. In practice every genuine tool failure carries it. Then read the call list for the softer signals: identical retries, raw/fresh re-reads, native calls clustered right after a ctx_* call, or a sequence that only completed once ctx_* was abandoned.

Before absolving anything, do these two things

Skipping them is how this review returns a false "nothing to report". Both cost one command each.

Search the tracker for the guard or tool you are about to excuse. Do this during triage, not at step 4. A closed issue defines intended behaviour: if a shipped fix says a form is supported and you just watched it fail, that is a regression and one of the most valuable things this review finds. It also stops you re-filing a settled design decision.

gh issue list --repo yvgude/lean-ctx --search "<guard or tool keyword>" --state all

Probe the stated rationale — never accept a message's self-description. An error explains itself, and that explanation can be wrong. Three checks, each one command:

Read the full file on GitHub · 141 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 141 lines · 73 tokens per session scan A eedf71a12172

Subscribe to this mod's changes

lean-ctx-review is a skill published in the GitHub repository yvgude/lean-ctx (3,728 stars, last pushed yesterday), licensed Apache-2.0. It adds 73 tokens to every session and 1,538 once invoked, about $0.0004 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-05.

Related

Other skills, from other repositories