🔍 Reverse Engineer

An Agent Skill that points an AI coding agent at a repo nobody on the team understands and gets
back the thing you'd want from a senior engineer who spent a week reading it: documentation,
architecture and flow diagrams, a versioned stack inventory, a vulnerability and bottleneck audit,
a severity-ranked code review, and a sequenced plan for upgrading and optimizing it.
The premise it's built on: a repo lies to you in a specific way. The README describes what someone
intended two years ago, the directory names describe the original design, and only the code
describes what actually runs. Documentation produced by skimming names reproduces the intention —
which is already written down — and misses the reality, which is the part you needed. So the skill
is organized around actually reading the code, and every claim it makes carries a file.ext:line
citation that a human can go check.
📦 Install
Claude Code — as a plugin, or drop the skill in directly:
/plugin marketplace add arjunprabhulal/reverse-engineer-skills
/plugin install reverse-engineer-skills@reverse-engineer-skills
# or
cp -r skills/reverse-engineer ~/.claude/skills/
Any harness — through the skills CLI:
npx skills add arjunprabhulal/reverse-engineer-skills
Google Antigravity — reads a flat .agents/skills/ layout:
cp -r skills/reverse-engineer ~/.gemini/config/skills/
🚀 Use it
Point it at a repo and ask in whatever words are natural:
we inherited this service and nobody's opened it — figure out what it does and write it up
draw me the architecture of ~/work/billing-api as mermaid diagrams
is our stack outdated? what should we upgrade and what's going to break
this API got slow over the last few months, find what's dragging it down
review this whole project before we sign the acquisition
It writes to docs/reverse-engineering/ in the target repo unless you say otherwise.
📄 What it produces
docs/reverse-engineering/
├── README.md index + navigation
├── 00-executive-summary.md top findings, stack at a glance, coverage
├── 01-architecture.md context + component diagrams, deployment topology
├── 02-tech-stack.md every dependency: version, status, where it's used
├── 03-modules.md per-module walkthrough from the read
├── 04-flows.md sequence + data-flow diagrams for key paths
├── 05-data-model.md ER/class diagram, schema notes
├── 06-security.md vulnerabilities, ranked by exploitability
├── 07-performance.md bottlenecks, structural vs. suspected
├── 08-code-review.md findings by severity
└── 09-recommendations.md upgrade + optimization plan, sequenced
Findings carry stable IDs (SEC-01, PERF-03, REV-07, UP-02) and cross-reference each other,
so when the recommendation says a fix unblocks a vulnerability, you can find it.
⚙️ How it works
Six phases, each with its own reference the agent loads when it gets there:
| Phase | What happens |
|---|
| Recon | Census the repo, pin every version from lockfiles, find the true entry points (including the workers and cron jobs the README forgot), read CI and IaC for real topology, mine git history for churn hot spots — then write a read order |
| Read | Files in dependency order, not alphabetically. Per-file notes: purpose, public surface, callers, side effects, error handling, and anything surprising, each tagged with a line number |
| Diagram | Architecture, data flow, sequence, data model — drawn from the call graph collected during the read, not from the folder tree |
| Audit | Dependency CVEs via real tooling, code-level vulnerability classes, bottlenecks by layer, review findings by severity |
| Recommend | Upgrades ordered runtime → framework → libraries → tooling, each naming the breaking changes this codebase hits, with prerequisites sequenced in |
| Write | The document set above |
🚫 Three things it refuses to do
Silently downgrade coverage. A 400k-LOC monorepo can't be read line by line, so the skill picks
a strategy from the census and states it: which files were read fully, which were sampled and by
what rule, which were skipped. A stated 40% coverage is actionable; an implied 100% that was
really 40% is a liability, because every silence in the report reads as a clean bill of health.