ghidra-headless

ghidra-headless is a skill for Claude Code, Codex from Asaiuta/reverse-workbench-skill. It costs 107 tokens per session (978 once invoked), scanned A, original, MIT.

A repeatable, command-line workflow for using Ghidra to inspect executable files, firmware, and other compiled binaries. Ghidra is a reverse-engineering tool that can recover readable code-like output and program structure.

In plain words
What is it for?
Use it to export decompiled code, functions, strings, symbols, and call relationships for later analysis with tools such as IDA, radare2, or Frida.
Why use it?
It creates consistent first-pass analysis results without opening each binary manually, while leaving important conclusions for deeper review and testing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to export decompiled code, functions, strings, symbols, and call relationships for later analysis with tools such as IDA, radare2, or Frida.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asaiuta/reverse-workbench-skill/ghidra-headless
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Asaiuta/reverse-workbench-skill --skill ghidra-headless
Clone the repo
git clone --depth 1 https://github.com/Asaiuta/reverse-workbench-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ghidra-headless

README.md
[![agentmods](https://agentmods.dev/badge/skills/asaiuta/reverse-workbench-skill/ghidra-headless/github.svg)](https://agentmods.dev/skills/asaiuta/reverse-workbench-skill/ghidra-headless)
Your own site
<a href="https://agentmods.dev/skills/asaiuta/reverse-workbench-skill/ghidra-headless"><img src="https://agentmods.dev/badge/skills/asaiuta/reverse-workbench-skill/ghidra-headless/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ghidra-headless

Your own site · 80×15
<a href="https://agentmods.dev/skills/asaiuta/reverse-workbench-skill/ghidra-headless"><img src="https://agentmods.dev/badge/skills/asaiuta/reverse-workbench-skill/ghidra-headless.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.00978
Opus 5 $0.00053 $0.00489
Sonnet 5 $0.00021 $0.00196
Haiku 4.5 $0.00011 $0.00098

Measured 5d ago against content hash ce65afe86c72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ghidra-headless scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ghidra-analyze.ps1, scripts/ghidra-analyze.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ghidra-headless/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ghidra 无头批量分析

该模块将项目内经过验证的 Ghidra Java 导出脚本纳入全局工具链。它用于可复现的初筛和证据导出,不替代对关键函数的手工反汇编、动态验证或跨反编译器交叉确认。

入口与依赖

  1. 先运行 archive-file-triage/ 对未知输入记录类型、大小和 SHA-256。
  2. 读取 ../tool-index.md,以其中的 analyzeHeadless 实际路径为准;不得猜测 Ghidra 安装路径。
  3. 若工具缺失,按 skills/scripts/bootstrap-reverse.ps1ghidra-mcp/Ghidra 能力流程安装或配置后再执行。

资源:

scripts/ghidra-analyze.ps1                 Windows 原生包装器
scripts/ghidra-analyze.sh                  Linux/WSL 包装器
scripts/ghidra_scripts/ExportAll.java      聚合导出
scripts/ghidra_scripts/ExportDecompiled.java
scripts/ghidra_scripts/ExportFunctions.java
scripts/ghidra_scripts/ExportStrings.java
scripts/ghidra_scripts/ExportCalls.java
scripts/ghidra_scripts/ExportSymbols.java

标准工作流

初筛优先使用 ExportAll.java,把结果写入任务专属目录:

$skill = ".\skills\ghidra-headless"   # 相对于技能根目录
& (Join-Path (Resolve-Path $skill) "scripts\ghidra-analyze.ps1") `
  -Script ExportAll.java `
  -OutputDirectory .\artifacts\sample `
  -Binary .\sample.exe

按需导出单项产物:

& "$skill\scripts\ghidra-analyze.ps1" -Script ExportStrings.java -OutputDirectory .\artifacts\sample -Binary .\sample.exe
& "$skill\scripts\ghidra-analyze.ps1" -Script ExportFunctions.java -OutputDirectory .\artifacts\sample -Binary .\sample.exe

对架构判断错误或裸固件,可显式指定 processor,例如 -Processor 'ARM:LE:32:v7';仅在已经确认格式且需要加速时使用 -NoAnalysis

标准产物

ExportAll.java 会按输入基名产生下列可归档产物(具体扩展名以脚本输出为准):

<name>_summary.txt
<name>_decompiled.c
<name>_functions.json
<name>_strings.json 或 <name>_strings.txt
<name>_symbols.json
<name>_calls.json
<name>_interesting.txt
ghidra_analysis.log
ghidra_output.log

先读 *_summary.txt*_interesting.txt,再根据字符串、导入、函数和调用关系锁定关键函数。重要结论应带文件路径、函数名/地址与原始证据;反编译结果只是近似 C,不应单独作为最终结论。

后续路由

  • 需要 CLI 深挖、脚本化反汇编或快速交叉验证 → radare2/
  • 需要 IDA 数据库、反编译或 MCP → ida-reverse/
  • 需要调试、Hook、内存或行为验证 → reverse-engineering/tools-dynamic.md
  • 输入是固件 → 先进入 firmware-pentest/;输入是 APK 中的 .so → 回到 apk-reverse/ 的 Native 分支。

输出要求

报告输入哈希、Ghidra 实际路径、包装器命令、processor/cspec、产物目录、关键函数/地址、结论与仍需动态验证的假设。

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 78 lines · 107 tokens per session scan A ce65afe86c72

Subscribe to this mod's changes

ghidra-headless is a skill published in the GitHub repository Asaiuta/reverse-workbench-skill (2 stars, last pushed 25d ago), licensed MIT. It adds 107 tokens to every session and 978 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.