Headless ghidra
Headless Ghidra reverse-engineering skill family for reproducible, evidence-backed workflows and audit-ready Markdown outputs.
npx -y skills add ByteLandTechnology/headless-ghidra --skill headless-ghidraAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Entry skill for the Headless Ghidra YAML-first reverse-engineering pipeline. Use when the user asks to analyze, decompile, triage, resume, or iterate on a binary target with Ghidra/headless-ghidra. Reads artifacts/<target>/pipeline-state.yaml, routes P0–P4 phase skills, runs gate checks, and manages review pauses. Performs zero analysis work itself.
SKILL.md
7.3 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
Headless Ghidra — Global Orchestrator
This skill is the workflow coordinator for the skill family. It defines the
P0–P4 sequence, dispatch rules, and artifact hand-off points.
ghidra-agent-cli remains the tool reference for command syntax and YAML
artifact semantics.
Required Shared Tool Contract
ghidra-agent-cliis the mandatory shared interface for supported workspace, metadata, Ghidra, Frida, progress, validation, and gate operations.- Phase skills must name the exact
ghidra-agent-clisubcommands they use. - Lower-level shell scripts and Java helpers are backend details. They must not replace the CLI as the primary interface when the CLI already supports the action.
- All workflow artifacts must live under
artifacts/<target-id>/. - YAML artifacts must be created, updated, and validated by
ghidra-agent-cli. - The CLI must not automatically create git commits.
- Gate transitions require relevant artifacts to exist on disk and be ready for user review.
- All Ghidra project operations must go through
ghidra-agent-cli. If the CLI lacks a required capability, pause and ask the user before creating or running a new Ghidra script.
Pipeline
P0 Intake → P1 Baseline+Runtime → P2 Third-Party → [P3 Metadata Enrichment → P4 Function Substitution]*
| Phase | Skill | Purpose | Primary outputs |
|---|---|---|---|
| P0 | headless-ghidra-intake | Initialize target workspace, discover prerequisites, and define scope | pipeline-state.yaml, scope.yaml, targets/<id>/ghidra-projects/ |
| P1 | headless-ghidra-baseline | Run Ghidra import/analysis, export baseline YAML, and prepare runtime observations | baseline/*.yaml, runtime/run-manifest.yaml, runtime/run-records/*.yaml, runtime/hotpaths/call-chain.yaml |
| P2 | headless-ghidra-evidence | Identify and record third-party libraries and pristine sources | third-party/identified.yaml, third-party/pristine/<library>@<version>/, third-party/compat/<library>@<version>/ |
| P3 | headless-ghidra-discovery | Enrich names, signatures, types, constants, strings, and selected hotpath metadata | metadata/*.yaml, metadata/apply-records/ |
| P4 | headless-ghidra-batch-decompile | Substitute selected functions through metadata application and Ghidra decompilation | substitution/next-batch.yaml, substitution/functions/<fn_id>/ |
Shared Artifact Contract
All phases work inside this active workspace layout:
targets/<target-id>/ghidra-projects/
artifacts/<target-id>/
├── pipeline-state.yaml
├── scope.yaml
├── intake/
├── baseline/
├── runtime/
│ ├── project/
│ ├── fixtures/
│ ├── run-manifest.yaml
│ ├── run-records/
│ └── hotpaths/call-chain.yaml
├── third-party/
│ ├── identified.yaml
│ ├── pristine/<library>@<version>/
│ └── compat/<library>@<version>/
├── metadata/
│ ├── renames.yaml
│ ├── signatures.yaml
│ ├── types.yaml
│ ├── constants.yaml
│ ├── strings.yaml
│ └── apply-records/
├── substitution/
│ ├── template/
│ ├── next-batch.yaml
│ └── functions/<fn_id>/
└── gates/
The orchestrator treats pipeline-state.yaml as the current target-level state
record and relies on the phase-owned YAML artifacts above for hand-offs.
Orchestrator Responsibilities
- Detect or resume the active target.
- Read
artifacts/<target-id>/pipeline-state.yaml. - Dispatch the correct phase skill for the current stage.
- Run
ghidra-agent-cli gate check --phase ...at each transition. - Advance phase state only after the gate passes.
- Handle user dialogs such as resume/restart, optional Frida supplementation, batch confirmation, divergence review, and completion.
Gate Policy
- P0–P4 are the only primary pipeline transitions.
ghidra-agent-cli gate checkis the authoritative gate validation for all pipeline phases (P0–P4). The legacygate-check.shhas been removed.
Required ghidra-agent-cli Commands
ghidra-agent-cli context useghidra-agent-cli context showghidra-agent-cli context clearghidra-agent-cli workspace state showghidra-agent-cli workspace state set-phaseghidra-agent-cli gate checkghidra-agent-cli validateghidra-agent-cli progress compute-next-batchghidra-agent-cli progress show
Strict Prohibitions
- Must not execute analysis work itself.
- Must not edit baseline, evidence, decompilation, or verification artifacts directly except for explicit state updates it owns.
- Must not bypass
ghidra-agent-clifor supported state, progress, context, validation, or gate operations. - Must not accept alternate decompilation backends in place of Ghidra.
- Must not create git commits automatically.
- Must not create or run new Ghidra scripts when the CLI lacks a capability; pause and ask the user first.
Next Skill Routing
- P0 complete →
headless-ghidra-baseline - P1 complete →
headless-ghidra-evidence - P2 complete →
headless-ghidra-discovery - P3 complete →
headless-ghidra-batch-decompile - P4 complete for all selected functions → either loop back to P3 or finish
Independent Skills
The following skills operate outside the P0–P4 pipeline and can be invoked directly:
| Skill | Purpose | Invocation |
|---|---|---|
headless-ghidra-analyze-function | Thorough single-function analysis following the strict five-step recovery order: types → constants → vtables → function identity → decompilation. Use when you need complete analysis of one specific function with full type/constant/vtable context before decompilation results are interpreted. | Invoked when user asks to "analyze this function thoroughly", "decompile function at 0x... with full context", or requests complete per-function analysis. |
What ships with it: 56 files
442.1 KB alongside SKILL.md, 10 of them executable
examples/
- analysis-selection-playbook.ja-JP.md8.8 KB
- analysis-selection-playbook.md7.8 KB
- analysis-selection-playbook.zh-CN.md7.1 KB
- artifacts/sample-target/archive-intake-record.md3.8 KB
- artifacts/sample-target/archive-member-inventory.md3.7 KB
- artifacts/sample-target/archive-normalization-handoff.md1.6 KB
- artifacts/sample-target/archive-replay-command-record.md5.6 KB
- artifacts/sample-target/call-graph-detail.md2.1 KB
- artifacts/sample-target/command-manifest.md18.4 KB
- artifacts/sample-target/comparison-command-log.md4.1 KB
- artifacts/sample-target/decompiled-output.md3.8 KB
- artifacts/sample-target/evidence-candidates.md2.9 KB
- artifacts/sample-target/function-names.md1.1 KB
- artifacts/sample-target/imports-and-libraries.md1.2 KB
- artifacts/sample-target/input-inventory.md8.4 KB
- artifacts/sample-target/latest-version-validation.md43.5 KB
- artifacts/sample-target/reconstruction-log.md7.9 KB
- artifacts/sample-target/regenerate-project.shruns3.1 KB
- artifacts/sample-target/renaming-log.md3.2 KB
- artifacts/sample-target/signature-log.md3.2 KB
- artifacts/sample-target/strings-and-constants.md1.1 KB
- artifacts/sample-target/target-selection.md3.1 KB
- artifacts/sample-target/third-party-diff.md5.8 KB
- artifacts/sample-target/types-and-structs.md1.3 KB
- artifacts/sample-target/upstream-reference.md4.8 KB
- artifacts/sample-target/xrefs-and-callgraph.md1.2 KB
- ghidra-script-authoring.md6.4 KB
- ghidra-script-review-checklist.md3.2 KB
- README.ja-JP.md1.7 KB
- README.md1.5 KB
- README.zh-CN.md1.4 KB
- reverse-engineering-walkthrough.ja-JP.md9.0 KB
- reverse-engineering-walkthrough.md8.4 KB
- reverse-engineering-walkthrough.zh-CN.md7.9 KB
frida-scripts/
- call-tree-trace.jsruns975 B
- decomp-compare.jsruns1.7 KB
- dispatch-vtable-trace.jsruns888 B
- fuzz-input-gen.jsruns3.4 KB
- hotpath-coverage.jsruns982 B
- io-capture.jsruns1.2 KB
16 more files not listed here. See all 56 in the repository.