Skip to content
Back to search

leanrea

One 8 KB skill that replaces REA (Reverse Engineer Anything): plain CLI tools, no MCP. Benchmarked: 38% faster, 35% cheaper.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/aicodeking--leanrea/badge.svg)](/listings/aicodeking--leanrea)

HTML

<a href="/listings/aicodeking--leanrea"><img src="/api/listings/aicodeking--leanrea/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add aicodeking/leanrea

This uses the [skills CLI](https://skills.sh). It finds the `leanrea` skill and asks which agents to install it for: Claude Code, Codex, Cursor, Gemini CLI, OpenCode and the others it supports.

Common variants:

npx skills add aicodeking/leanrea -g                    # install for your user, in every project
npx skills add aicodeking/leanrea -a claude-code -y     # Claude Code only, no prompts
npx skills add aicodeking/leanrea -g -a '*' -y          # every supported agent, user level
npx skills update leanrea                               # pull the latest version later

Manual install, if you prefer:

git clone https://github.com/aicodeking/leanrea
mkdir -p ~/.claude/skills && cp -R leanrea/leanrea ~/.claude/skills/

If an agent has no skills support, paste `leanrea/SKILL.md` into its rules or system prompt; it is plain text.

Use it:

/leanrea How does the search feature in Foo.app work? Show the evidence.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 113 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # leanrea
  2. **One 8 KB skill file that does what [REA](https://github.com/morluto/rea) does: no MCP server, no 207 tools, no setup.**
  3. REA (Reverse Engineer Anything) puts an MCP layer between your agent and tools it can already use: asar, otool, nm, `go version -m`, jadx, apktool, Ghidra, tshark, binwalk, sqlite3. leanrea drops that layer. It tells the agent which command is fastest for each kind of target, gives it ready-to-paste recon commands, and lists the traps that REA's code handles for you. The agent then runs the real tools itself.
  4. | | REA 6.5.0 | leanrea |
  5. |---|---|---|
  6. | What gets installed | 25 MB npm package + MCP server | one `SKILL.md` |
  7. | Instructions | 23.5 KB skill + 48.8 KB references | 8 KB |
  8. | Tools added to the agent | 207 (3.35 MB of definitions) | 0 (uses Bash) |
  9. | Context for "Reply OK", all tools loaded | 400.7k tokens, $1.60 | 34.5k tokens, $0.09 |
  10. ## Benchmark
  11. Claude Code headless (`claude -p`), Sonnet 5.5, macOS arm64. 4 reverse-engineering tasks × 3 reps × 3 arms, with the arms run side by side. Answers are graded against hand-made keys.
  12. | arm | total wall time | cost | turns | tokens | score |
  13. |---|---|---|---|---|---|
  14. | **leanrea** | **388 s** | **$2.17** | **55** | **2.40 M** | 74/75 |
  15. | no skill | 479 s | $2.21 | 81 | 3.11 M | 67/75 (one refusal) |
  16. | REA (MCP + its skill) | 627 s | $3.36 | 124 | 5.93 M | 75/75 |
  17. Against REA, leanrea had **38% less wall time, 35% lower cost, 56% fewer turns and 60% fewer tokens, at the same accuracy**. Its one partial miss named an older IPC channel instead of the v2 one (both channels exist).
  18. The tasks:
  19. - **electron**: trace a feature through a real Electron app's app.asar (native function → main-process class → IPC channels).
  20. - **native**: inventory the exports, a TCC permission check and the single-instance lock of that app's native addon (`.node`).
  21. - **go**: toolchain and dependency versions of a stripped `gh` binary.
  22. - **deep**: from disassembly alone, the exact socket path format, wire protocol and peer authentication of that lock.
  23. The same operation run through REA's CLI vs the raw command:
  24. | operation | REA | raw |
  25. |---|---|---|
  26. | Go build info | 0.56 s | `go version -m`: 0.06 s |
  27. | Mach-O overview | 3.32 s | otool + dyld_info + nm: 0.04 s |
  28. | Electron app analysis (real desktop app) | fails on asar integrity until you pass a flag, then **47.9 s and 140 MB of JSON** | asar extract + `rg -uu`: 4.8 s, 24 KB |
  29. Full tables, the context-overhead runs and caveats: [bench/BENCHMARK.md](bench/BENCHMARK.md). Raw per-run metrics: [bench/results/final.jsonl](bench/results/final.jsonl).
  30. **Caveats:**
  31. - Only 3 reps per cell, one model, one machine.
  32. - REA was tested in its best case: Claude Code's deferred tool search loads MCP tools on demand. Agents that load every tool pay the 400k-token row.
  33. - Ghidra, Hopper and jadx weren't installed, so the native tasks ran on Xcode tools for both arms.
  34. - The plain model is already good at this. leanrea's gain over no skill (about 19% faster, 32% fewer turns) is smaller than its gain over REA.
  35. ## Install
  36. ```sh
  37. npx skills add aicodeking/leanrea
  38. ```
  39. This uses the [skills CLI](https://skills.sh). It finds the `leanrea` skill and asks which agents to install it for: Claude Code, Codex, Cursor, Gemini CLI, OpenCode and the others it supports.
  40. Common variants:
  41. ```sh
  42. npx skills add aicodeking/leanrea -g # install for your user, in every project
  43. npx skills add aicodeking/leanrea -a claude-code -y # Claude Code only, no prompts
  44. npx skills add aicodeking/leanrea -g -a '*' -y # every supported agent, user level
  45. npx skills update leanrea # pull the latest version later
  46. ```
  47. Manual install, if you prefer:
  48. ```sh
  49. git clone https://github.com/aicodeking/leanrea
  50. mkdir -p ~/.claude/skills && cp -R leanrea/leanrea ~/.claude/skills/
  51. ```
  52. If an agent has no skills support, paste `leanrea/SKILL.md` into its rules or system prompt; it is plain text.
  53. Use it:
  54. ```
  55. /leanrea How does the search feature in Foo.app work? Show the evidence.
  56. ```
  57. ## What's in the skill
  58. - **Rules:**
  59. - Work on a copy.
  60. - Route by `file` and magic bytes first.
  61. - Slice minified files instead of reading them.
  62. - Batch probes into one shell call.
  63. - Search extracted trees with `rg -uu`, because bundlers hide code in dot-folders like `.webpack/`.
  64. - Mark each claim as seen, inferred or unknown.
  65. - **Router:** the fastest command for each target type:
  66. - Electron/asar (IPC, preload, `contextBridge`, fuses)
  67. - minified web bundles and source maps
  68. - Hermes/bytenode
  69. - Mach-O (exports, imports, entitlements, ObjC/Swift)
  70. - native disassembly, ELF/PE
  71. - Go buildinfo, Rust cargo-auditable, .NET, Android APKs, the Flutter snapshot hash
  72. - WASM, SQLite, plists, pcap/HAR, firmware
  73. - websites and runtime tracing
  74. - **First moves:** one paste-and-run command each for native binaries and Electron apps. Each gets the whole inventory in a single tool call.
  75. - **Speed patterns:** start from strings and imports, find a string's function through the otool literal-pool comments, read call sequences rather than every instruction, and diff inventories before diffing code.
  76. ## Reproduce the benchmark
  77. Needs macOS with the target Electron app installed (see `bench/setup.sh`), `gh` from Homebrew, Node, and Claude Code logged in.
  78. ```sh
  79. cd bench
  80. ./setup.sh # installs rea-agents@6.5.0, copies the targets into bench/work (gitignored)
  81. ./run_all.sh # 36 runs, about $8 on Sonnet
  82. ./ctx.sh # context-overhead probe
  83. python3 mcp_list.py node work/rea-install/node_modules/rea-agents/scripts/rea.mjs --mcp # REA tool count + size
  84. ```
  85. The answer keys in `tasks.json` match the app versions used here and a `gh` built with go1.27.1. Other versions need new keys.
  86. ## Credit
  87. REA is an impressive, well-documented project by the morluto team. Most of the gotchas in this skill came from reading their code and docs. leanrea isn't affiliated with REA. It is just a test of whether a model with plain tools and a short note can do the same work faster.
  88. MIT licensed.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.