reverse-engineering-assistant
AGENTS.md848 starsChanged 13 months agoApache-2.0View on GitHub
ReVa (Reverse Engineering Assistant) is a Ghidra extension that provides a Model Context Protocol (MCP) server for AI‑assisted reverse engineering. It offers a collection of tool providers that expose Ghidra functionality (decompiler, strings, symbols, etc.) via a JSON‑based MCP interface.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Types: Prefer concrete generic types (List<>, Map<>) over raw collections.
- Distinctive: line 49
Documentation: Every public class and method must have a Javadoc comment describing purpose, parameters, and return values.
- Very specific: line 56
Always log the stack trace via DebugLogger.
- Distinctive: line 67
Unit tests: Use JUnit 4 only (no JUnit 5 annotations).
- Very specific: line 70
Ensure all tests pass before committing.
- Distinctive: line 76
Follow the guidance in .github/copilot-instructions.md for using the MCP SDK, Gradle (no wrapper), and Java 21.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project Overview
ReVa (Reverse Engineering Assistant) is a Ghidra extension that provides a Model Context Protocol (MCP) server for AI‑assisted reverse engineering. It offers a collection of tool providers that expose Ghidra functionality (decompiler, strings, symbols, etc.) via a JSON‑based MCP interface.
Build & Test Commands
Building the extension
# Set the Ghidra installation directory first
export GHIDRA_INSTALL_DIR=/path/to/ghidra
gradle # no wrapper – use the system `gradle` commandTesting
- Unit tests:
gradle test --info - Integration tests (require a headed GUI environment):
gradle integrationTest --info - Run a single unit test:
gradle test --tests "*MyTestClass.testMethod" --info - Run a single integration test:
gradle integrationTest --tests "*MyIntegrationTest" --info - Check (includes lint & both test suites):
gradle check
Project Structure
src/main/java/reva/– Core source codeutil/– Foundational utilities (AddressUtil,ProgramLookupUtil, etc.)plugin/– Ghidra plugin infrastructure and configurationserver/– Embedded Jetty server and MCP transporttools/– Tool providers (decompiler, functions, strings, symbols, …)resources/– Read‑only MCP resourcesservices/– Service‑layer abstractionsui/– Optional UI components
src/test/– Unit tests (no Ghidra runtime required)src/test.slow/– Integration tests (require Ghidra environment)
Development Guidelines
Code Style
- Java version: Target Java 21.
- Formatting: 4‑space indentation, no trailing whitespace. Imports sorted alphabetically, static imports after regular imports.
- Naming: Classes & enums
PascalCase; methods & variablescamelCase; constantsUPPER_SNAKE_CASE. - Types: Prefer concrete generic types (
List<>,Map<>) over raw collections; useOptionalfor nullable returns. - Documentation: Every public class and method must have a Javadoc comment describing purpose, parameters, and return values.
Error Handling
- Convert runtime exceptions (e.g.,
IllegalArgumentException) to structured JSON responses:{"success":false,"error":"<message>","details":{}} - Always log the stack trace via
DebugLogger.
Utilities (must‑use)
AddressUtil.formatAddress()– consistent address formatting.ProgramLookupUtil.getValidatedProgram()– safe program resolution.AbstractToolProviderhelper methods (getString,getInt,getOptional*).HighFunctionDBUtil.updateDBVariable()– persist changes inside a transaction.
Testing Practices
- Unit tests: Use JUnit 4 only (no JUnit 5 annotations).
- Integration tests: Set
java.awt.headless=falseand fork each test (forkEvery 1). - Validate program state changes with Ghidra APIs (
Function.getParameters(),DataType.isEquivalent()). - Ensure all tests pass before committing; the CI pipeline runs
gradle check.
Copilot / Cursor Rules
- Follow the guidance in .github/copilot-instructions.md for using the MCP SDK, Gradle (no wrapper), and Java 21.
- Cursor-specific rules, if any are added, should follow the conventions outlined above.
Additional Resources
- MCP Java SDK
- Ghidra documentation: start from
FlatProgramAPIorProgramPlugin. - Project README for high‑level overview and installation steps.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

