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.
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.
npx skills add yvgude/lean-ctx --skill lean-ctx-reviewgit clone --depth 1 https://github.com/yvgude/lean-ctxWrote 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.
[](https://agentmods.dev/skills/yvgude/lean-ctx/lean-ctx-review)<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once 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 |
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.
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.
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:
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.
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.
- 2d ago First seen · 141 lines · 73 tokens per session scan A eedf71a12172
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.
Other skills, from other repositories
pn-rust-scaffolding
Scaffolds new Rust API projects (Axum, Actix-web) or handlers. Use when setting up a Rust backend; covers Cargo workspace layout, Axum/Actix patterns, error handling, and idiomatic Rust conventions.
firebase-messaging
Use when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).
firebase-cloud-functions
Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.
snip
You are an expert at writing declarative YAML filters for snip, a CLI proxy that reduces LLM token consumption by filtering shell output.
karpathy-llm-wiki
Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.
Agent Browser Automation
Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.