# Lean Ctx Review

Review how the lean-ctx ctx_* MCP tools performed in the current session and file...

- Repository: https://github.com/yvgude/lean-ctx (3920 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add yvgude/lean-ctx --skill lean-ctx-review -g -a claude-code -y`
Codex: `npx skills add yvgude/lean-ctx --skill lean-ctx-review -g -a codex -y`
Cursor: `npx skills add yvgude/lean-ctx --skill lean-ctx-review -g -a cursor -y`
Gemini CLI: `npx skills add yvgude/lean-ctx --skill lean-ctx-review -g -a gemini-cli -y`

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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
```

The rest: https://github.com/yvgude/lean-ctx/blob/HEAD/skills/lean-ctx-review/SKILL.md
