A Practical, Cautious Guide
How to Reverse Engineer an App with Claude Code
Anthropic's Claude Code and the open source tool REA are named here to describe them accurately. Nightschool AI is independent, not affiliated with or endorsed by Anthropic or by REA's creators.
A post about a tool called REA that lets an AI agent study software it did not write has been spreading this week, and it names Anthropic's Claude Code specifically as one of the agents it connects to. This guide is for two kinds of readers at once: people who are simply curious what reverse engineering is and why anyone does it, and developers who want to try REA safely with Claude Code on something they actually own. It walks through what reverse engineering means, what REA is and what it can read, the real legal line between studying software and copying it, a safety checklist worth running before you install anything with this much reach, the install steps and the Node.js version REA's own README asks for today, a two-session clean-room workflow, and the honest limits of the whole approach. None of this is legal advice, and having a careful process is not a reason to stop checking the output yourself.
Reverse engineering software means studying how it behaves without its original source code, usually to understand it, make something else work alongside it, keep it usable, or find a security problem. REA is an open source MCP server and CLI that lets an agent such as Claude Code read a program's structure and hand back concrete evidence, a file, a function, a call, instead of a guess. Install it only from its official repository, use it only on software you own or are authorized to examine, keep a build session separate from the one that studied the original, and talk to a lawyer before shipping anything built this way.
Published
Free lesson · no account neededMeet ClaudeWhy Claude?6 minStart the free lessonKey Takeaways
- Reverse engineering means studying finished software to understand how it works, usually without its source code, for reasons like security research, interoperability, preservation, or just understanding something undocumented.
- REA is an open source MCP server and CLI, published at github.com/morluto/rea under the MIT license, that lets an agent like Claude Code inspect binaries and applications and return evidence: a file, a function, a call.
- Studying how software works is treated differently, legally, from copying its protected code or assets. Two Ninth Circuit decisions, Sega v. Accolade and Sony v. Connectix, are often cited on this point, but neither is a blanket rule.
- REA's own disclaimer rules out helping circumvent DRM, license checks, or anti-cheat systems, and says its output grants no rights to the original program. Only examine software you own, wrote, or are authorized to study.
- A two-session clean-room workflow, a spec session and a separate build session that reads only the resulting spec, supports a later clean-room argument. It is a practice, not a legal guarantee, and it is no substitute for a lawyer.
Copy and Paste
Prompts You Can Use Today
Sanity-check the setup on code you already know
REA is installed and set up with you now. Open the small app I wrote myself at the path I give you, and for each file, tell me what functions it has, what each one calls, and anything that looks like it handles input from outside the program. Only report what REA's own output actually shows, and say so if something looks uncertain.
Running this on your own tiny app first tells you whether the setup actually worked before you point REA at anything bigger.
A spec-only first session
Study this application using REA and write a plain-language specification of what it does: its interfaces, the data formats it reads and writes, and the behavior of each major function, entirely in your own words. Do not quote or paste the original code, pseudocode, or binary output directly into the specification. Stop once the specification is written. Do not start building anything yet.
This is the first half of the two-session workflow below. Save the output to a plain file before you close the session.
A build session that never sees the original
Here is a specification document written during a separate reverse-engineering session. Build a new, independent implementation that satisfies everything in this specification. You have not seen the original application, its binary, or its source, and you should not ask to see it. If anything in the specification is ambiguous, tell me instead of guessing what the original program did.
Start this in a fresh session with only the spec file attached, not the transcript from the first session.
A legal gut-check before you go further
I'm about to reverse engineer a piece of software using REA. Before I start, list what you would want to know to judge whether this is something I'm actually authorized to do: who owns the software, whether a license or terms of service already addresses this, and whether DRM, a license check, or anti-cheat software is involved anywhere. Flag anything that sounds like it needs an actual lawyer rather than your best guess.
Treat the answer as a list of questions to go verify, not as a legal clearance.
Read REA's own disclaimer before a real session
Open REA's DISCLAIMER.md from its own repository and summarize, in plain language, what kinds of reverse engineering the project says it will not help with, and what it says about the rights a person gets from using its output. I want to confirm I'm not about to ask you to do something the tool's own rules already rule out.
Worth repeating after any update; a disclaimer can change along with the software.
A Field With a Long History
What Reverse Engineering Actually Means
Reverse engineering means studying a finished piece of software to understand how it works, usually without having its original source code or any of the design documents that went into it. You look at what it does, how it is put together, and what it talks to, and you work backward from that to a model of its behavior.
People do this for reasons that are mostly unglamorous and mostly legitimate. Security researchers reverse engineer programs to find a vulnerability before someone with worse intentions does. Developers reverse engineer file formats and network protocols so a new program can interoperate with an old one that nobody will document for them. Archivists and hobbyists reverse engineer old software to keep it running once the original hardware and the company behind it are both gone. And sometimes the reason is simply that a program you depend on does something undocumented, and you need to know what, before you can trust it or work around it.
None of this is new. Security researchers and software archivists have been doing it for decades with disassemblers and debuggers, long before any AI agent existed. What has changed is speed: an agent can read a disassembly listing or a decompiled method and summarize it in seconds, work that used to take a skilled person hours. That is a real capability gain, and it is exactly why the legal and ethical line later in this guide matters more now, not less, since the bottleneck that used to slow people down between curiosity and copying has mostly disappeared.
The rest of this guide is specific: it walks through one tool, called REA, that connects an agent like Claude Code to this kind of analysis, and the habits worth having in place before you point it at anything.
A New Entrant
What REA Is, and What It Can Read
REA describes itself as a way to reverse engineer software from app behavior down to native binaries. What it can actually see depends on the kind of target.
An MCP server and a CLI
REA is open source software published at github.com/morluto/rea, with REA's own code under the MIT license. It runs as a Model Context Protocol server an agent like Claude Code can call, and as a plain command you can run yourself from a terminal.
Native binaries
Per REA's own README, it can surface pseudocode, assembly, strings, symbols, calls, and references from a compiled binary, working through analysis backends such as Hopper, Ghidra, IDA, or Kuna.
JavaScript and Electron applications
For JavaScript and Electron targets, REA's README describes reading modules, imports, source maps, routes, IPC channels, and the relationships between a program and any native add-ons it loads.
.NET assemblies and Android APKs
For .NET assemblies, metadata and CIL instructions. For Android APKs, manifest declarations, classes, decompiled methods, and the references between them, again per the project's own README.
Beyond applications
The same README also lists websites, packet captures, firmware images, SQLite databases, Go and Rust binaries, and model files among the targets REA's analysis tools can be pointed at.
Evidence, not a guess
The design intent, per the README, is that a finding points back to something concrete, a file, a function, a call, so you can check it yourself rather than taking the agent's summary on faith.
Read This Before You Install Anything
The Legal Line: Studying Software vs. Copying It
The distinction that matters most here is the one between studying how something works and copying its protected expression. Reverse engineering to learn an interface, a file format, or a piece of behavior is, legally, a different act from lifting someone else's code or assets into a product of your own.
The practice built around that distinction is called clean-room design. One person or one session studies the original and writes a plain specification of what it does: its interfaces, its data formats, its behavior, in their own words, with no original code copied into the document. A separate person or session, who never saw the original, then builds a new implementation from only that specification. The point is that the final result can be shown to have come from a written description, not from the original work itself.
Two older US court decisions get cited often on this point, and they are worth knowing about, though neither is a general license to reverse engineer anything. Sega Enterprises Ltd. v. Accolade, Inc., decided by the Ninth Circuit in 1992, involved a company that reverse engineered a game console's lockout system so its own games would run on that console. The court held that the intermediate copying involved in that reverse engineering, done to reach unprotected functional elements needed for the games to work on the hardware at all, was fair use on the specific facts of that case. Sony Computer Entertainment, Inc. v. Connectix Corp., decided by the same court in 2000, reached a similar conclusion when a company reverse engineered a console's startup software to build an emulator for a different kind of computer, again treating the copying along the way as fair use in service of an independently written, interoperable product.
Treat both of those as historical context, not as advice for your situation. They are two specific appellate decisions about specific facts, fair use is decided case by case, other countries draw these lines differently, and later laws aimed at circumventing copy protection narrow this considerably for software tied to DRM. Anyone planning to build on this kind of work, especially anything meant to ship or be sold, should talk to an actual lawyer before relying on any of it.
REA draws its own line independently of what a court might eventually decide about any particular case. Per the project's DISCLAIMER.md, REA does not support and will not help with circumventing DRM, license checks, anti-cheat systems, or other technical protection measures, or with copying proprietary software or its protected code and assets, and the project says plainly that analysis output does not grant any rights to the original program. The practical rule that follows: only analyze software you own, wrote yourself, or are otherwise authorized to examine.
Before You Install Anything
Install Safely, Not Just Quickly
A tool that can read binaries and run analysis backends deserves the same caution you would give any software with this much reach into your system.
Install only from the official source
The project lives at github.com/morluto/rea and ships to npm as the rea-agents package. Type that name yourself rather than following a link in a video description, a forum post, or a chat message.
Watch for copycats
A project that gets attention this quickly attracts imitators. A repository or package calling itself something close to REA's name, hosted somewhere else, is a reason to stop and check, never a shortcut.
Run unknown binaries in a VM
If you point an analysis backend at a binary you did not write and do not fully trust, do that work inside a virtual machine or another disposable environment, not on the machine you use for everything else.
Pin a version
Install a specific version rather than always pulling the newest one, and read what changed before you move to a new one. The npm registry listed 6.8.0 as the latest published version of rea-agents as of this writing.
Read the disclaimer once, for real
DISCLAIMER.md is short. Read the whole thing before your first real session with it, not after something has already gone sideways.
Getting It Running
Installing REA Into Claude Code
Node.js version matters here. REA's own README states its requirement exactly as: Node.js 22.x (>=22.23.4), 24.x (>=24.22.1), or 26.12.1+, plus npm. Check that against the live README before you install, since this kind of requirement changes between releases.
The setup command is npx rea-agents setup. Per the README, it walks you through choosing which agents to register REA with, shows you the changes it proposes to make before you approve them, and keeps backups of your existing configuration. Restart your agent afterward so it picks up the new MCP server; REA's own instructions say this plainly.
For a persistent command-line install rather than a one-off npx run, the README describes npm install --global rea-agents, followed by rea --help to see what is available. From a global install, rea update moves you to a new version on your own schedule instead of automatically, and running npx rea-agents@latest setup afterward refreshes the agent registration to match.
Before pointing REA at anything you do not fully own, try it on a tiny application you wrote yourself first. With REA set up, ask Claude Code to open that small app and describe what it sees, function by function, and compare that against what you already know you wrote. That one exercise confirms the setup actually worked, and it gives you a feel for how REA's evidence, a file, a function, a call, reads in practice before you lean on it for anything that matters.
A Safer Shape For The Work
A Two-Session Clean-Room Workflow
Put the clean-room idea from earlier into a concrete shape using two separate Claude Code sessions. The first is a spec session: point REA at the software you are authorized to study, and ask the agent to write a plain-language specification of its interfaces, its data formats, and the behavior of its major functions, entirely in its own words, with no original code or pseudocode copied verbatim into the document.
The second is a build session, started fresh, with no memory of the first. Give it only the specification file, nothing else: not the original binary, not the first session's transcript, not REA's raw output. Ask it to build a new, independent implementation that satisfies the specification, and to tell you when something in that specification is ambiguous rather than quietly guessing what the original program must have done.
Keeping these as genuinely separate sessions, not two phases of one long conversation, is the part that matters. A single session that both studied the original and then wrote the replacement has blurred exactly the boundary clean-room design exists to keep sharp, since there is no way to show, after the fact, that the second half did not lean on the first.
Be clear-eyed about what this buys you. A disciplined two-session workflow is a practice that supports a later clean-room argument if anyone ever asks how something was built. It is not a legal guarantee on its own, and it does not replace getting an actual lawyer to look at anything you plan to ship or sell.
Set Expectations
Honest Limits of This Workflow
REA and the process in this guide reduce risk; neither one removes it. Keep these limits in mind once you have something open.
It can miss things on large applications
A big application has more surface area than one analysis pass is likely to cover. Treat a clean run as a sample of what is there, not proof that nothing was missed.
Treat output as leads, not conclusions
Evidence pointing at a file, a function, or a call is a place to go look, not a settled fact on its own. Verify anything you plan to actually rely on by reading the real output yourself.
It uses a lot of context
Detailed binary and bytecode analysis produces a lot of text quickly. Expect a session's context to fill fast on anything beyond a small app, and plan a two-session workflow with that in mind.
Both the software and the law keep changing
REA's commands, its Node.js requirement, and what it can read will all change between versions, and the legal picture around reverse engineering shifts too. Re-check both before leaning on anything you read today.
A second set of eyes still helps
For anything beyond a personal experiment, a human reviewer who understands both the code and the legal line is worth more than one more careful prompt.
Practice Narrow, Checkable Prompting Before You Try This For Real
Before you point any reverse-engineering tool at something you do not fully own, it helps to already have the habit of giving an agent a narrow task and checking its output against reality yourself. Nightschool AI's free first lesson walks through exactly that kind of careful prompting with Anthropic's Claude Code.
Frequently Asked Questions
What does reverse engineering actually mean?
It means studying a finished piece of software to understand how it works, usually without having its original source code or design documents. People do it for security research, to make something interoperate with software they don't control, to keep old software usable, or simply to understand what an undocumented program is doing.
Is reverse engineering legal?
It depends heavily on what you study, how you study it, where you are, and what you do with what you learn. Studying how something works is treated differently from copying its protected code or assets. This guide is not legal advice; talk to an actual lawyer before relying on any of it for something real.
What is REA, the tool this guide covers?
REA is an open source MCP server and command-line tool, published at github.com/morluto/rea under the MIT license, that lets an agent such as Anthropic's Claude Code inspect binaries, applications, and other software and return evidence, such as a file, a function, or a call, rather than a plain-English guess.
What Node.js version does REA require?
Per REA's own README, as of this writing, it requires Node.js 22.x (>=22.23.4), 24.x (>=24.22.1), or 26.12.1+, plus npm. Check the live README before you install, since version requirements like this change between releases.
How do I install REA into Claude Code?
Run npx rea-agents setup, choose which agents to register it with, review the changes it proposes before approving them, and restart your agent afterward. For a persistent CLI instead, npm install --global rea-agents followed by rea --help, and rea update later to move versions deliberately.
What is a clean-room workflow, and why use two sessions?
A spec session studies the original software and writes a plain-language specification of its behavior, with no original code copied in. A separate build session, with no memory of the first and no access to the original, builds new code from only that specification. Keeping the two genuinely separate supports a later clean-room argument; one blended session does not.
What won't REA help with?
Per its own DISCLAIMER.md, REA does not support and will not help with circumventing DRM, license checks, or anti-cheat systems, or with copying proprietary software or its protected assets. It also says its output grants no rights to the original program, and that it should only be used on software you own, wrote, or are authorized to examine.
What are REA's honest limits?
It can miss things on large applications, so a clean run is a sample, not a guarantee. Its output is a lead worth checking, not a settled conclusion. Detailed analysis also produces a lot of text, so it can use up a session's context quickly, especially on anything beyond a small app.
Is this guide affiliated with Anthropic or with REA's creators?
No. This is an independent educational guide from Nightschool AI. It names Anthropic's Claude Code and the open source project REA only to describe how they actually work, with no affiliation, partnership, or endorsement from Anthropic or from REA's creators in either direction.
Practice the Habits Before You Reverse Engineer Anything Real
A narrow task, a specification you can actually check, and a healthy suspicion of your own first answer matter more here than any single tool.