agentleFS
th3vib3coderth3vib3coder/RevEng/skills/ghidra-headless/SKILL.md

ghidra-headless

Skill4 starsChanged 6 months agoMITView on GitHub

Ghidra and PyGhidra headless reverse engineering workflow for static binary analysis. Use when the user asks to import binaries into Ghidra, run analyzeHeadless, export function/import/string summaries, use PyGhidra scripts, or plan repeatable Ghidra analysis without GUI interaction.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer python3 scripts/re_tool_check.py --json and inspect the adapters.ghidra and adapters.reva records.

    line 13
  2. Very specific:

    Use python3 scripts/ghidra_smoke.py --json-out ghidra-smoke.json for a discovery-only smoke report.

    line 15
  3. Distinctive:

    Create or reuse a headless project outside the analyzed sample directory.

    line 16
  4. Very specific:

    Use analyzeHeadless with -import, -scriptPath, and -postScript when appropriate.

    line 17
  5. Very specific:

    Use scripts/ghidra_export_summary.py as a PyGhidra/Ghidra script to export program metadata, functions, imports, exports, strings, xrefs, …

    line 18
  6. Distinctive:

    Run a real smoke only after operator approval and with a benign local file:

    line 28
  7. Distinctive:

    Do not execute the analyzed binary.

    line 36
  8. Distinctive:

    Do not assume decompiler output is source-equivalent.

    line 37
  9. Very specific:

    If a requested Ghidra step would execute code, debug a live process, run malware, or contact external infrastructure, respond with PAUSE …

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ghidra Headless

Guide repeatable static analysis with a local Ghidra installation. The plugin does not install Ghidra and does not execute analyzed samples.

Workflow

  1. Confirm Ghidra or PyGhidra is installed locally.
    • Prefer python3 scripts/re_tool_check.py --json and inspect the adapters.ghidra and adapters.reva records.
    • Adapter discovery is PATH lookup only; it does not authorize running Ghidra.
    • Use python3 scripts/ghidra_smoke.py --json-out ghidra-smoke.json for a discovery-only smoke report.
  2. Create or reuse a headless project outside the analyzed sample directory.
  3. Use analyzeHeadless with -import, -scriptPath, and -postScript when appropriate.
  4. Use scripts/ghidra_export_summary.py as a PyGhidra/Ghidra script to export program metadata, functions, imports, exports, strings, xrefs, call graph, CFGs, compact graph summaries, and warnings.

Example shape:

python3 scripts/ghidra_export_summary.py --json-out ghidra_summary.json

This script exits cleanly with a diagnostic outside a Ghidra/PyGhidra runtime.

Run a real smoke only after operator approval and with a benign local file:

python3 scripts/ghidra_smoke.py --run --sample sample.bin --json-out ghidra-smoke.json --export-json ghidra_summary.json

Safety

  • Do not execute the analyzed binary.
  • Do not assume decompiler output is source-equivalent.
  • State tool versions and project paths when available.
  • If a requested Ghidra step would execute code, debug a live process, run malware, or contact external infrastructure, respond with PAUSE and require explicit sandbox approval.

Output

Return a Markdown summary and attach the JSON path. Include limitations when Ghidra is unavailable or when only syntax validation was possible.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.