Agent skill

Lean Ctx Review

by yvgude in yvgude/lean-ctx

Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems.

Apache-2.0Auto-check passedAgent Workflows

Install Lean Ctx Review

skills CLI
$ npx skills add yvgude/lean-ctx --skill lean-ctx-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yvgude/lean-ctx lean-ctx-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yvgude/lean-ctx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lean-ctx-review .claude/skills/lean-ctx-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lean-ctx-review
GitHub stars
3.9k
Token cost
~1.6k tokens
SKILL.md length
879 words
Files
2 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems.

  • Works in 4 steps: Extract → Triage → Reproduce → …
  • The user asks to review/audit lean-ctx tool performance
  • SKILL.md covers 1. Extract, 2. Triage, 3. Reproduce and 4. File
  • Runs Python scripts from its folder; calls gh, python3 and git

What it does

Lean Ctx Review is an agent skill from yvgude/lean-ctx. Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems. Use when the user asks to review/audit lean-ctx tool performance, says "lean-ctx review", asks why ctx tools failed or fell back to native tools, or wants to report a lean-ctx bug.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/scan_session.py`).

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol and Rust. The repository describes itself as: LeanCTX — Context Gateway for AI Systems. Control what your AI can see. Open-source Engine for context selection, supported controls, and evidence. The licence is Apache-2.0.

When your agent uses it

  • The user asks to review/audit lean-ctx tool performance
  • Says lean-ctx review
  • Asks why ctx tools failed
  • Fell back to native tools

Example prompts

  • “lean-ctx review”
  • “/lean-ctx-review”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Extract
  2. Triage
  3. Reproduce
  4. File

What it can do on your machine

Read from SKILL.md and the folder at commit 6194b1f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • gh
    • python3
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lean Ctx Review loads about 1.6k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 879 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from yvgude/lean-ctx at commit 6194b1f, republished under its Apache-2.0 licence (© yvgude). 879 words, ~1,606 tokens.

Download SKILL.mdSave it as .claude/skills/lean-ctx-review/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
lean-ctx-review
description
Review how the lean-ctx ctx_* MCP tools performed in the current session and file upstream issues for confirmed problems. Use when the user asks to review/audit lean-ctx tool performance, says "lean-ctx review", asks why ctx_* tools failed or fell back to native tools, or wants to report a lean-ctx bug.

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):

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

bash
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:

  • Does the sanctioned alternative achieve the same thing? If the block is bypassable through a route the message itself recommends, it constrains syntax, not capability. Sometimes that is deliberate (structured input parses reliably where a shell string does not) — decide which, do not assume.
  • Does the stated reason match the observed rule? Vary one axis at a time. A guard blaming payload size that actually keys on path, or blaming a pipe on a command that is piped, is misdiagnosing itself.
  • Does the message contradict itself? A rejection that also states the rejected form is allowed is a finding on its own, whichever way the policy should go.

A wrong diagnostic is a real bug even when the block is correct: it sends the next caller down a route that cannot work.

Not a finding
  • Words inside returned content. A file containing http.StatusConflict, a git rebase printing CONFLICT (content):, gh returning "mergeable":"CONFLICTING", a test run printing not found. The tool returned exactly what was asked for. Judge the tool's own behaviour, never the payload's vocabulary.
  • Self-reference. Any result that quotes a previous scan, this skill, or a transcript will echo every error word in it.
  • Guard blocks — only after they survive the probe above. Inline env overrides (GIT_EDITOR=), shell redirects (>/>>), non-allowlisted commands, paths outside the project root. "It offered an alternative and the alternative worked" is not enough to clear one: that is true of a guard whose reason is wrong, whose rule is different from its description, or that contradicts itself. Clear it only once the stated rationale holds up.
  • Malformed tool input. InputValidationError on __unparsedToolInput is the caller's own JSON serialization — commonly a raw tab or newline inside a string — rejected before lean-ctx ever ran.
  • My own wrong arguments, a genuinely missing file, a failing build.
Show full SKILL.md (293 more words)Show less
Confirmable

The tool did something wrong or unhelpful given correct input:

  • wrong, lossy, or truncated output where the mode promises otherwise
  • content injected into output documented as verbatim, or anything that breaks a documented output format (e.g. corrupting batch-read separators)
  • a crash, hang, or schema mismatch against the documented parameters
  • a documented mode behaving differently than described
  • a retry that only succeeded after dropping to native tools
  • a wrong or self-contradicting diagnostic, even where the block itself is right — naming the wrong cause sends the next caller down a route that cannot work, and costs more than the block did
  • a regression against a closed issue: a shipped fix says the form is supported, and it is not

3. Reproduce

No minimal repro, no issue. Re-run the exact tool and arguments. If it passes, try to isolate the trigger; if you cannot, do not file — report the observation to the user instead, saying plainly that it did not reproduce and what you tried. Guessing at internals is worse than silence.

lean-ctx --version for the version line.

Zero confirmed findings is a valid and common result. Say so and file nothing.

4. File

Only for confirmed findings, one issue per distinct problem. You searched the tracker during triage; widen it here if the finding shifted:

bash
gh issue list --repo yvgude/lean-ctx --search "<keywords>" --state all

Skip if already reported — and read the close text before re-filing, since a closed issue may have already conceded the point you are about to raise. When a finding contradicts a closed fix, cite it and frame the issue as the gap in that fix. Otherwise:

bash
gh issue create --repo yvgude/lean-ctx --title "..." --body-file <file>

Body: what happened, expected, minimal repro (exact tool + args), version, OS. No speculation about internals. End every issue body with the Claude Code attribution footer. Report the issue html_url back to the user.

© yvgude, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/lean-ctx-review of yvgude/lean-ctx.

  • SKILL.md
  • scripts/scan_session.py

Open the folder on GitHubat commit 6194b1f

Compare with similar skills

Lean Ctx Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lean Ctx Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lean Ctx Review this skillyvgude/lean-ctx3.9k—~1.6kAutomated safety check: PassApache-2.0
Foremergenaw103/foremerge538—~2.4kAutomated safety check: PassApache-2.0
Embedded DebuggerAdancurusul/embedded-debugger-mcp202—~1.4kAutomated safety check: PassMIT
Agnixagent-sh/agnix445—~874Automated safety check: PassApache-2.0
Agnixagent-sh/agnix445—~563Automated safety check: PassApache-2.0
Iphone Useleeguooooo/iphone-use150—~2.9kAutomated safety check: PassCustom licence

Similar skills

  • Foremerge

    naw103/foremerge

    Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server.

    538 GitHub stars~2.4k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Embedded Debugger

    Adancurusul/embedded-debugger-mcp

    Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp.

    202 GitHub stars~1.4k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    445 GitHub stars~874 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agnix

    agent-sh/agnix

    A skill your agent uses when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'.

    445 GitHub stars~563 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Iphone Use

    leeguooooo/iphone-use

    A skill your agent uses when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or…

    150 GitHub stars~2.9k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Linggen

    linggen/linggen-memory

    Linggen — durable cross-host memory plus browser control, over two local MCP servers: ling-mem for memory, the Linggen engine for browser, X and agents.

    109 GitHub stars~8.6k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check: notes

Categories

Questions about Lean Ctx Review

What does Lean Ctx Review do?

Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems. Lean Ctx Review is an agent skill from yvgude/lean-ctx. Review how the lean-ctx ctx MCP tools performed in the current session and file upstream issues for confirmed problems.

When should I use Lean Ctx Review?

Lean Ctx Review fits situations like: the user asks to review/audit lean-ctx tool performance; says lean-ctx review; asks why ctx tools failed; fell back to native tools.

How do I install Lean Ctx Review in Claude Code?

Run `npx skills add yvgude/lean-ctx --skill lean-ctx-review -a claude-code`. Or copy the skill folder (skills/lean-ctx-review in yvgude/lean-ctx) into .claude/skills/lean-ctx-review in your project. Claude Code loads it when a task matches its description.

How do I install Lean Ctx Review in Codex?

Run `npx skills add yvgude/lean-ctx --skill lean-ctx-review -a codex`. Or copy the skill folder (skills/lean-ctx-review in yvgude/lean-ctx) into .agents/skills/lean-ctx-review in your project. Codex loads it when a task matches its description.

Can I use Lean Ctx Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yvgude/lean-ctx --skill lean-ctx-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lean-ctx-review, .gemini/skills/lean-ctx-review, .github/skills/lean-ctx-review and .opencode/skills/lean-ctx-review in your project.

What does Lean Ctx Review need to run?

Going by SKILL.md and its folder, Lean Ctx Review needs Python for the scripts in its folder and the command-line tools its instructions call (gh, python3 and git). Our summary lists: Python 3.

Does Lean Ctx Review access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Lean Ctx Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Lean Ctx Review use?

Lean Ctx Review is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lean Ctx Review use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lean Ctx Review?

Skills that share tags, products or a category with Lean Ctx Review: Foremerge (naw103/foremerge, 538 stars), Embedded Debugger (Adancurusul/embedded-debugger-mcp, 202 stars), Agnix (agent-sh/agnix, 445 stars) and Agnix (agent-sh/agnix, 445 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lean Ctx Review?

yvgude (a GitHub user) maintains it in yvgude/lean-ctx, which has 3,872 GitHub stars. The repository was last updated on October 10, 2026.

Source: yvgude/lean-ctx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.