Leanrea Beats a 25MB AI Tool Package With an 8KB Text File
An 8 KB skill file beats a 25 MB MCP server at reverse engineering tasks, cutting cost 35% and wall time 38% at matching accuracy.
Takeaways
- leanrea is an 8 KB skill file that replaces the 25 MB REA MCP server
- Benchmarked 38% faster and 35% cheaper than REA at matching 74/75 accuracy
- Uses existing CLI tools like otool, nm, jadx, apktool directly instead of MCP wrappers
- REA loads 207 tool definitions costing 400.7k tokens before any work starts
- Install with
npx skills add aicodeking/leanrea, works across Claude Code, Codex, Cursor - Full benchmark details and raw per-run metrics available in the repo
Leanrea is an MIT-licensed project that puts reverse-engineering instructions for coding agents in a single 8 KB SKILL.md file. It targets workflows covered by REA, a 25 MB npm package that exposes 207 tools through the Model Context Protocol. The project author reports nearly equivalent accuracy with lower token use, latency, and API cost.
Model Context Protocol, or MCP, lets an AI client discover and invoke external capabilities through structured tool definitions. Those schemas can improve validation and interoperability, but they also consume context and add serialization work. REA’s tool definitions total 3.35 MB, according to the project’s benchmark. Clients may load them up front or retrieve them on demand, so the overhead varies by agent.
One file, direct commands
Leanrea assumes the agent has shell access and can run established utilities such as otool, nm, jadx, apktool, tshark, binwalk, and sqlite3. The skill identifies the quickest tool for each target and records operational details that a general-purpose model may overlook.
- Work on a copy of the target.
- Route by
fileoutput and magic bytes before choosing an analyzer. - Batch related probes into one shell call.
- Slice minified files instead of loading them end to end.
- Search extracted trees with
rg -uuso hidden directories such as.webpack/are included. - Label findings as seen, inferred, or unknown.
Four tasks, three configurations
The project’s published benchmark ran Claude Code in headless mode with Sonnet 5.5. Each task was repeated three times with Leanrea, REA, and a bare agent that received no additional skill.