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-cli is the mandatory shared interface for supported workspace,
metadata, Ghidra, Frida, progress, validation, and gate operations.
- Phase skills must name the exact
ghidra-agent-cli subcommands 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 check is the authoritative gate validation for all
pipeline phases (P0–P4). The legacy gate-check.sh has been removed.
Required ghidra-agent-cli Commands
ghidra-agent-cli context use
ghidra-agent-cli context show
ghidra-agent-cli context clear
ghidra-agent-cli workspace state show
ghidra-agent-cli workspace state set-phase
ghidra-agent-cli gate check
ghidra-agent-cli validate
ghidra-agent-cli progress compute-next-batch
ghidra-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-cli for 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. |
1---2name: headless-ghidra3description: 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.4---56# Headless Ghidra — Global Orchestrator78This skill is the workflow coordinator for the skill family. It defines the9P0–P4 sequence, dispatch rules, and artifact hand-off points.10`ghidra-agent-cli` remains the tool reference for command syntax and YAML11artifact semantics.1213## Required Shared Tool Contract1415- `ghidra-agent-cli` is the mandatory shared interface for supported workspace,16 metadata, Ghidra, Frida, progress, validation, and gate operations.17- Phase skills must name the exact `ghidra-agent-cli` subcommands they use.18- Lower-level shell scripts and Java helpers are backend details. They must not19 replace the CLI as the primary interface when the CLI already supports the20 action.21- All workflow artifacts must live under `artifacts/<target-id>/`.22- YAML artifacts must be created, updated, and validated by `ghidra-agent-cli`.23- The CLI must not automatically create git commits.24- Gate transitions require relevant artifacts to exist on disk and be ready for25 user review.26- All Ghidra project operations must go through `ghidra-agent-cli`. If the CLI27 lacks a required capability, pause and ask the user before creating or running28 a new Ghidra script.2930## Pipeline3132```text33P0 Intake → P1 Baseline+Runtime → P2 Third-Party → [P3 Metadata Enrichment → P4 Function Substitution]*34```3536| Phase | Skill | Purpose | Primary outputs |37| ----- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |38| P0 | [`headless-ghidra-intake`](../headless-ghidra-intake/SKILL.md) | Initialize target workspace, discover prerequisites, and define scope | `pipeline-state.yaml`, `scope.yaml`, `targets/<id>/ghidra-projects/` |39| P1 | [`headless-ghidra-baseline`](../headless-ghidra-baseline/SKILL.md) | 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` |40| P2 | [`headless-ghidra-evidence`](../headless-ghidra-evidence/SKILL.md) | Identify and record third-party libraries and pristine sources | `third-party/identified.yaml`, `third-party/pristine/<library>@<version>/`, `third-party/compat/<library>@<version>/` |41| P3 | [`headless-ghidra-discovery`](../headless-ghidra-discovery/SKILL.md) | Enrich names, signatures, types, constants, strings, and selected hotpath metadata | `metadata/*.yaml`, `metadata/apply-records/` |42| P4 | [`headless-ghidra-batch-decompile`](../headless-ghidra-batch-decompile/SKILL.md) | Substitute selected functions through metadata application and Ghidra decompilation | `substitution/next-batch.yaml`, `substitution/functions/<fn_id>/` |4344## Shared Artifact Contract4546All phases work inside this active workspace layout:4748```text49targets/<target-id>/ghidra-projects/5051artifacts/<target-id>/52├── pipeline-state.yaml53├── scope.yaml54├── intake/55├── baseline/56├── runtime/57│ ├── project/58│ ├── fixtures/59│ ├── run-manifest.yaml60│ ├── run-records/61│ └── hotpaths/call-chain.yaml62├── third-party/63│ ├── identified.yaml64│ ├── pristine/<library>@<version>/65│ └── compat/<library>@<version>/66├── metadata/67│ ├── renames.yaml68│ ├── signatures.yaml69│ ├── types.yaml70│ ├── constants.yaml71│ ├── strings.yaml72│ └── apply-records/73├── substitution/74│ ├── template/75│ ├── next-batch.yaml76│ └── functions/<fn_id>/77└── gates/78```7980The orchestrator treats `pipeline-state.yaml` as the current target-level state81record and relies on the phase-owned YAML artifacts above for hand-offs.8283## Orchestrator Responsibilities84851. Detect or resume the active target.862. Read `artifacts/<target-id>/pipeline-state.yaml`.873. Dispatch the correct phase skill for the current stage.884. Run `ghidra-agent-cli gate check --phase ...` at each transition.895. Advance phase state only after the gate passes.906. Handle user dialogs such as resume/restart, optional Frida supplementation,91 batch confirmation, divergence review, and completion.9293## Gate Policy9495- P0–P4 are the only primary pipeline transitions.96- `ghidra-agent-cli gate check` is the authoritative gate validation for all97 pipeline phases (P0–P4). The legacy `gate-check.sh` has been removed.9899## Required ghidra-agent-cli Commands100101- `ghidra-agent-cli context use`102- `ghidra-agent-cli context show`103- `ghidra-agent-cli context clear`104- `ghidra-agent-cli workspace state show`105- `ghidra-agent-cli workspace state set-phase`106- `ghidra-agent-cli gate check`107- `ghidra-agent-cli validate`108- `ghidra-agent-cli progress compute-next-batch`109- `ghidra-agent-cli progress show`110111## Strict Prohibitions112113- Must not execute analysis work itself.114- Must not edit baseline, evidence, decompilation, or verification artifacts115 directly except for explicit state updates it owns.116- Must not bypass `ghidra-agent-cli` for supported state, progress, context,117 validation, or gate operations.118- Must not accept alternate decompilation backends in place of Ghidra.119- Must not create git commits automatically.120- Must not create or run new Ghidra scripts when the CLI lacks a capability;121 pause and ask the user first.122123## Next Skill Routing124125- P0 complete → `headless-ghidra-baseline`126- P1 complete → `headless-ghidra-evidence`127- P2 complete → `headless-ghidra-discovery`128- P3 complete → `headless-ghidra-batch-decompile`129- P4 complete for all selected functions → either loop back to P3 or finish130131## Independent Skills132133The following skills operate outside the P0–P4 pipeline and can be invoked directly:134135| Skill | Purpose | Invocation |136| ----- | ------ | --------- |137| [`headless-ghidra-analyze-function`](../headless-ghidra-analyze-function/SKILL.md) | 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. |