Detailed Analysis
A developer identifying a systemic inefficiency in Claude Code's context-loading behavior has released an open-source CLI tool called **reap** (hosted at github.com/thousandflowers/skillreaper), designed to audit and prune unused skills, MCP server configurations, and custom rules that are automatically loaded into every session. The core observation driving the project is that Claude Code, Anthropic's agentic coding assistant, loads the full inventory of a user's configured capabilities at session initialization regardless of whether those capabilities will actually be used. In the author's own usage data, 187 items were loaded per session while only 4 were actively invoked — a disparity that translated to roughly 8,000 wasted tokens per session. The tool offers three primary commands: `reap` to surface the unused items, `reap prune` to move them into a reversible quarantine directory, and `reap restore --all` to undo any changes, with the entire process occurring locally with no telemetry.
The engineering choices behind reap reflect deliberate thinking about portability and safety in developer tooling. The author selected Go over Python or Bash to produce a single, zero-dependency static binary compatible with both macOS and Linux, eliminating environment setup friction that would reduce adoption. The parsing layer handles Claude Code's dual storage formats — JSONL files in older versions and SQLite databases in newer ones — using Go's native concurrency primitives to scan session transcripts in parallel for `tool_use` blocks and command invocations. The quarantine mechanism is the most safety-conscious component: rather than deleting files, `reap prune` moves them to a hidden directory and writes a versioned JSON manifest, making the operation fully reversible and protecting users from accidental loss of custom agent configurations they may have spent significant time building.
The token waste problem reap addresses is a direct consequence of how prompt caching economics interact with large, static context payloads. Anthropic's prompt caching system rewards stable, reused prefixes with reduced token costs, but that benefit degrades when the prompt is padded with infrequently accessed skill descriptions that shift or never match cached states. For power users who have accumulated large libraries of MCP servers and custom rules over time, the marginal cost per session compounds quickly. Reap essentially introduces a usage-driven pruning layer that the Claude Code runtime itself does not currently provide, positioning it as a maintenance tool for the growing ecosystem of users who have heavily customized their agentic setups.
The project sits within a broader pattern of the developer community building meta-tooling around Anthropic's agentic products as those products mature. Claude Code, since its release, has attracted a class of technically sophisticated users who construct elaborate tool ecosystems around it, and those users are now encountering second-order problems — context bloat, cost management, session reproducibility — that the core product has not yet addressed. Reap is one of several community-built utilities emerging to fill these gaps, and its architectural transparency (publishing the parsing logic and quarantine design openly) positions it as a reference implementation for others building in the local LLM tooling space. The fact that a meaningful efficiency gain is achievable through simple usage-log analysis suggests that Claude Code's current initialization behavior may itself become a target for upstream optimization by Anthropic as the agentic product line scales.
Read original article →