REA vs leanrea
Unofficial guide. This site is an independent community guide and is not affiliated with the REA project. For authoritative docs see the official REA website and the morluto/rea GitHub repository. Commands here are taken from the official README/docs (checked 2026-10-19); REA changes quickly, so verify against the official docs.
leanrea (aicodeking/leanrea, MIT, created 2026-10-17) is a single SKILL.md of about 8 KB. It tells an AI agent which ordinary command-line tools to use for each kind of reverse-engineering target (asar, rg, otool, nm, jadx, readelf…), and the agent runs them through its shell. REA is a full MCP server and CLI with its own analyzers and evidence records. leanrea is not affiliated with REA, and its README credits REA for most of its gotchas.
At a glance
| REA (rea-agents 6.5.0) | leanrea | |
|---|---|---|
| What it is | MCP server + CLI + skill | One skill file (instructions only) |
| Install | npx rea-agents setup (guide) | npx skills add aicodeking/leanrea, or copy the file into ~/.claude/skills/ |
| Size | 29 MB package on disk (our install) | 8,374-byte SKILL.md |
| Tools added to the agent | 207 MCP tools; tools/list is 3,346,603 bytes (our measurement) | 0 (uses the agent's shell) |
| Does the analysis | REA's own analyzers, plus Ghidra/Hopper/IDA for native code | Whatever CLI tools you have installed |
| Output | Structured evidence (digests, graph nodes, file/line, observed vs inferred) | Raw tool output; the skill asks the model to label claims seen/inferred/unknown |
| Works without an AI agent | Yes (rea CLI) | No; it's a prompt |
Our side-by-side test (same demo Electron app)
We used the three-file demo app from our use-cases walkthrough, packed into demo.asar (1,058 bytes). We ran leanrea's documented Electron "first move" commands ourselves, without an agent, next to REA's analyzer. Same box, Node 22, 2026-10-18.
leanrea's commands
$ npx -y @electron/asar extract demo.asar /tmp/re/asar && jq '{name,version,main}' /tmp/re/asar/package.json
{ "name": "demo-app", "version": "1.0.0", "main": "main.js" }
$ rg -uu -n -o --glob '!node_modules' '.{0,120}(ipcMain\.(handle|handleOnce|on|once)|…).{0,160}' /tmp/re/asar
/tmp/re/asar/main.js:3:ipcMain.handle('price:format', (_e, cents) => formatPrice(cents));
real 0m0.322s (output: 200 bytes)
REA
$ npx -y [email protected] analyze-javascript-application /abs/demo.asar
evidence_id: ev_d08d72c1a74a0c26718cd1911f2cfaa7e41f8e692f1963b10079cb76643e4243
subject:
name: demo.asar
digest:
sha256: 06fb46942da1ffc38feec0dbd4a2c2cbcb087d7122530de0133d7530189e78f0
format: asar
…
key: "main:handle:price:format:3:31-3:64"
…
real 0m1.820s (output: ~173 KB, 4,240 lines)
Result: both found the same price:format IPC handler at main.js line 3. The grep approach was about 6× faster here and its output was far smaller. REA's output adds a content digest, a module/IPC graph with typed edges, exact column ranges, and labels for what was observed versus inferred. That's useful as evidence, but most of those 173 KB are tokens an agent may never need.
What we didn't test: running either through an actual agent (Claude Code isn't installed on our test box), native binaries, or real-world apps. This demo is tiny, so don't extrapolate the timing to large bundles.
leanrea's benchmark claims (not reproduced by us)
The leanrea README reports a benchmark: Claude Code headless, Sonnet 5.5, macOS arm64, 4 tasks × 3 reps. Against REA's MCP server plus its skill, leanrea used 388 s vs 627 s of wall time, cost $2.17 vs $3.36, and scored 74/75 vs 75/75. The author's own caveats: only 3 reps, one model and one machine. Ghidra, Hopper and jadx weren't installed. REA was run with Claude Code's deferred tool search (its best case). Leanrea's gain over using no skill at all was smaller (about 19% faster).
Two of its claims match what we measured: REA advertises 207 tools, with a tools/list of about 3.35 MB. The README also says REA's Electron analyzer failed with artifact_integrity_mismatch on a real app until --integrity-policy record-and-continue was passed. That flag exists in rea analyze-javascript-application --help (default fail). We didn't hit the error on our unsigned demo.
When to use which
- leanrea: you already have a capable shell agent and the usual tools installed, you want minimal context/token overhead, and plain grep/otool output is enough for the question.
- REA: you want reproducible, hash-bound evidence; analyzers that go beyond grep (JS semantic graph, .NET metadata, Flutter/Dart AOT, APK, HAR, version comparison); a CLI that works without an agent; or a client that can't run shell commands.
- Both: nothing stops you from installing the skill alongside REA. If your client loads every MCP tool up front, cut REA's overhead with
REA_MCP_INPUT_SCHEMA_PROFILE=compact(details).
leanrea has existed for one day (419 stars, 81 forks on 2026-10-18). Stars aren't a quality signal. Read the 8 KB file before installing; it's plain text.
Related guides
- REA vs Ghidra vs IDA
- Best MCP servers for AI reverse engineering
- REA tools filling Claude Code context
- Use cases
Sources: aicodeking/leanrea README & BENCHMARK.md · morluto/rea
FAQ
What is leanrea?
An MIT-licensed 8 KB skill file that guides an AI agent to reverse engineer with plain CLI tools instead of REA's MCP server.
Does leanrea replace REA?
For agent-driven grep-and-inspect work it can; it has no analyzers, evidence records or standalone CLI of its own, which REA provides.
Is leanrea faster?
On our tiny Electron demo the grep path took 0.32 s vs 1.82 s for REA; the author's agent benchmark claims 38% less wall time, which we have not reproduced.