Source profileQuality 90/100Review permissions

magnus919/agent-skills/binary-analysis/SKILL.md

binary-analysis

Analyze unknown binary files through a deterministic CLI that wraps Ghidra's static-analysis engine. Use when you need to inspect a PE, ELF, or Mach-O file — triage suspicious binaries, map imported APIs, decompile functions, trace call paths, or produce structured evidence reports. Do not use for runtime analysis (debugging, dynamic tracing, sandbox execution), for modifying or patching binaries, or for binaries you already know everything about. The skill owns planning, hypothesis formation, a

Source repository stars
34
Declared platforms
0
Static risk flags
1
Last source update
2026-08-06
Source checked
2026-08-06

Decision brief

What it does—and where it fits

Analyze unknown binary files with a deterministic, non-interactive CLI backed by Ghidra's static-analysis engine. The skill teaches you how to reason about binaries: when to triage versus deep-dive, how to interpret canonical evidence, and how to produce auditable reports. All o…

Best for

  • A user provides a binary file (PE, ELF, Mach-O, firmware image) and asks what
  • A user asks for decompilation, disassembly, call-graph exploration, or
  • A user wants a structured triage report, suspicious-API analysis, or

Not for

  • Runtime or dynamic analysis — debugging, strace/dtrace, sandbox
  • Binary patching or modification — hex-editing, resource editing,

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/magnus919/agent-skills --skill "binary-analysis"
Safe inspection promptEditorial

Inspect the Agent Skill "binary-analysis" from https://github.com/magnus919/agent-skills/blob/a4db8e7d4350816f02515bac12d91c8050db1e58/binary-analysis/SKILL.md at commit a4db8e7d4350816f02515bac12d91c8050db1e58. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Core Workflow

    Every analysis session follows this sequence. Do not skip phases — each one produces evidence the next phase depends on.

    success: true, partial: false — proceed to Phase 4.success: true, partial: true — review diagnostics for gaps. Proceed withsuccess: false, partial: true — timeout. Extract what completed, report
  2. 02

    Phase 1: Environment Check

    If any component reports severity: "ERROR", run the bootstrap plan:

    If any component reports severity: "ERROR", run the bootstrap plan:Review the plan. If the user authorizes installation, run:Verify with binary version --json.
  3. 03

    Phase 2: Project Setup

    Create a project for every binary you analyze. Projects isolate analysis state and provide an audit trail.

    Create a project for every binary you analyze. Projects isolate analysis state and provide an audit trail.Use copy mode (default) for reproducibility. Use --reference only when the binary is large, read-only, or shared across projects, and explain the staleness risk to the user.
  4. 04

    Phase 3: Initial Analysis

    Run the standard analysis profile first. It covers the structural queries most triage workflows need.

    success: true, partial: false — proceed to Phase 4.success: true, partial: true — review diagnostics for gaps. Proceed withsuccess: false, partial: true — timeout. Extract what completed, report
  5. 05

    Phase 4: Evidence Collection

    Choose analyses based on the user's question. Run these in order, building evidence from broad to specific.

    Choose analyses based on the user's question. Run these in order, building evidence from broad to specific.For triage (broad survey):For structural understanding:

Permission review

Static risk signals and limitations

Runs scripts

medium · line 50

The documentation asks the agent to run terminal commands or scripts.

| **Agent (you)** | Form hypotheses about binary behavior. Choose which analyses to run and in what order. Synthesize CLI evidence into conclusions. Explain findings to the user in plain language. Write evidence-backed reports. | Invent fac

Runs scripts

medium · line 184

The documentation asks the agent to run terminal commands or scripts.

| **Never execute the target** | CLI refuses; no execution path exists | Static analysis only |

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score90/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars34SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
magnus919/agent-skills
Skill path
binary-analysis/SKILL.md
Commit
a4db8e7d4350816f02515bac12d91c8050db1e58
License
MIT
Collected
2026-08-06
Default branch
main
View the original SKILL.md

Binary Analysis — Agent Skill

Analyze unknown binary files with a deterministic, non-interactive CLI backed by Ghidra's static-analysis engine. The skill teaches you how to reason about binaries: when to triage versus deep-dive, how to interpret canonical evidence, and how to produce auditable reports. All observable operations happen through the binary CLI — you never call Ghidra APIs directly.

When to Use

Load this skill when any of the following conditions match:

  • A user provides a binary file (PE, ELF, Mach-O, firmware image) and asks what it does, what APIs it imports, or whether it is suspicious.
  • A user asks for decompilation, disassembly, call-graph exploration, or cross-reference analysis of a specific function or address.
  • A user wants a structured triage report, suspicious-API analysis, or capability map for an unknown binary.
  • A user asks to compare two binaries, verify export tables, or extract strings matching a pattern.
  • A user wants to set up the analysis toolchain (binary doctor, binary bootstrap) or manage analysis projects.

When Not to Use

Do not load this skill for:

  • Runtime or dynamic analysis — debugging, strace/dtrace, sandbox execution, process monitoring. This skill is static-analysis only (V1).
  • Binary patching or modification — hex-editing, resource editing, repackaging. The analysis harness is read-only by design.
  • Binaries you already fully understand — if the user is asking for documentation or explanation of known code, use a general-purpose skill.
  • Source-code analysis — C, C++, Rust, or assembly source files. Use a language-specific or general code-analysis skill instead.
  • Network forensics or packet capture — PCAP analysis, protocol reverse engineering at the wire level. Use a network-focused skill.
  • Live memory forensics — process memory dumps, heap analysis. Static analysis of memory-mapped regions from files is in scope; live-process introspection is not.

What the Agent Owns vs What the CLI Owns

This boundary is the most important concept in the skill. Crossing it produces unreliable evidence, wasted context, or both.

LayerResponsibilityMust NOT
Agent (you)Form hypotheses about binary behavior. Choose which analyses to run and in what order. Synthesize CLI evidence into conclusions. Explain findings to the user in plain language. Write evidence-backed reports.Invent facts not present in CLI output. Claim certainty where the CLI reports partial results or low confidence. Skip diagnostic warnings.
CLIParse arguments, manage project lifecycle, run Ghidra analysis, serialize canonical entities, emit JSON envelopes, enforce safety limits.Interpret results, draw conclusions, or produce narrative prose.

Rule of thumb: If a fact appears in a CLI JSON response under data, it is deterministic evidence you can cite. If you are tempted to infer something not directly supported by that evidence, flag it as an agent inference and note the confidence gap.

Core Workflow

Every analysis session follows this sequence. Do not skip phases — each one produces evidence the next phase depends on.

Phase 1: Environment Check

binary doctor --json

If any component reports severity: "ERROR", run the bootstrap plan:

binary bootstrap --plan --json

Review the plan. If the user authorizes installation, run:

binary bootstrap --apply --json

Verify with binary version --json.

Phase 2: Project Setup

Create a project for every binary you analyze. Projects isolate analysis state and provide an audit trail.

binary project create <project-name> --json
binary import <path-to-binary> --project <project-name> --json

Use copy mode (default) for reproducibility. Use --reference only when the binary is large, read-only, or shared across projects, and explain the staleness risk to the user.

Phase 3: Initial Analysis

Run the standard analysis profile first. It covers the structural queries most triage workflows need.

binary analyze --project <project-name> --json

Check the response:

  • success: true, partial: false — proceed to Phase 4.
  • success: true, partial: true — review diagnostics for gaps. Proceed with bounded results, noting limitations.
  • success: false, partial: true — timeout. Extract what completed, report what did not.
  • success: false, partial: false — hard failure. Check diagnostics for the failure reason. The project is now FAILED; run binary project clean to reset.

Phase 4: Evidence Collection

Choose analyses based on the user's question. Run these in order, building evidence from broad to specific.

For triage (broad survey):

binary triage --project <project-name> --json
binary suspicious-apis --project <project-name> --json
binary capability-map --project <project-name> --json

For structural understanding:

binary metadata --project <project-name> --json
binary sections --project <project-name> --json
binary entrypoints --project <project-name> --json
binary imports --project <project-name> --json
binary exports --project <project-name> --json
binary strings --project <project-name> --contains "<pattern>" --json

For function-level deep-dive:

binary functions --project <project-name> --json
binary decompile --project <project-name> <function-selector> --json
binary disassemble --project <project-name> <target> --json
binary xrefs --project <project-name> <entity-selector> --json
binary callers --project <project-name> <function-selector> --json
binary callees --project <project-name> <function-selector> --json
binary callgraph --project <project-name> <function-selector> --depth 3 --json

For path analysis:

binary trace --project <project-name> --from <source> --to <target> --json

Phase 5: Report and Handoff

Generate a durable report before explaining results to the user:

binary export-report --project <project-name> --type triage --format markdown --json

Read the report. Synthesize findings into a clear explanation. Always mark agent inferences separately from CLI evidence. Example:

## CLI Evidence (deterministic)
- The binary imports VirtualAlloc, WriteProcessMemory, and CreateRemoteThread
  (suspicious-apis, risk_score 8, rule_id: process-injection)
- Entry point at 0x401000, 3 sections (.text, .rdata, .data)

## Agent Assessment (inference)
- The API combination suggests process injection capability. This is a
  heuristic, not a confirmed behavior. The binary would need to be executed
  (out of scope for static analysis) to confirm.

Safety Boundaries

The CLI enforces these boundaries automatically. You must never attempt to bypass them, even if a user asks.

BoundaryEnforcementWhy
Never execute the targetCLI refuses; no execution path existsStatic analysis only
Never load target as a libraryNot implemented; no dlopen/LoadLibrary pathPrevents unintended code execution
Never expose a network listenerNo HTTP, MCP, or socket serversThe CLI is a local tool
Never upload hashes or samplesNo telemetry, no outbound callsPrivacy and security
Path containmentAll project paths validated for traversalPrevents workspace escape
Output size limitsDefault 64 MB, max 256 MB JSONPrevents context exhaustion
Memory limitsConfigurable per-operation ceilingPrevents OOM during large analyses
Timeout enforcementDefault 300s, configurable per-commandBounded operations
Result count limitsPaginated with default 100, max 1000Prevents unbounded output
Graph depth limitsCallgraph capped at depth 10Prevents infinite recursion

Evidence Standards

All CLI evidence follows a confidence hierarchy. Use these standards when citing evidence in reports or explanations.

Evidence Categories (triage output)

CategoryDefinitionExample
ObservationDirect deterministic fact from the backend. No confidence field."Section .text is executable, size 4096 bytes"
HeuristicRule-derived interpretation with explicit confidence."Suspicious API: VirtualAlloc (risk_score: 8, confidence: HIGH)"
UnknownExplicit unresolved question at a specific address."Indirect call target at 0x402080 could not be resolved"

Confidence Levels

LevelMeaningWhen to cite
HIGHBackend is certain about this resultCite as fact
MEDIUMBackend has reasonable confidenceCite with qualification ("likely")
LOWBackend made a best-guessCite only with explicit caveat
UNKNOWNBackend could not determinePresent as an open question

Agent Inferences

When you synthesize multiple CLI observations into a conclusion, label it explicitly as an agent inference. Never present an inference as a CLI fact. Use language like:

  • "Based on the combination of X and Y, the agent assesses that..."
  • "The CLI reports Z as a heuristic (confidence: MEDIUM). The agent interprets this as consistent with..."
  • "The CLI could not determine W. The agent notes this is an open question."

Reference Routing

References are loaded on demand — do not read them all at startup. Use this table to route your current task to the right reference file.

ReferenceWhen to Load
references/installation.mdSetting up Ghidra, Java, or PyGhidra. Running binary doctor or binary bootstrap. Dependency troubleshooting.
references/cli-reference.mdNeed the complete command reference with flags, exit codes, and examples. Unfamiliar with a specific command or flag.
references/triage-workflow.mdPerforming a triage on an unknown binary. Need the step-by-step triage methodology and interpretation guide.
references/function-analysis.mdDecompiling, disassembling, or tracing a function. Understanding decompiler output or call-graph analysis.
references/binary-formats.mdIdentifying or interpreting PE, ELF, or Mach-O format characteristics. Understanding section flags, entry point conventions, or format-specific quirks.
references/security.mdInterpreting suspicious-API results, capability maps, or security rule matches. Understanding risk scoring and rule priorities.
references/evidence-and-confidence.mdWriting reports that distinguish CLI evidence from agent inferences. Building an evidence-backed argument.
references/packed-and-obfuscated.mdSuspicious that a binary is packed, compressed, or obfuscated. High entropy sections, missing imports, or small import tables.
references/firmware.mdAnalyzing firmware images. Need firmware-specific load address conventions, filesystem extraction patterns, or boot-loader analysis.
references/troubleshooting.mdCLI returns unexpected errors, timeouts, or partial results. Ghidra fails to start. Project state is stuck.
references/reporting.mdGenerating reports with binary export-report. Choosing report types and formats. Interpreting report structure.

Reporting Expectations

Every analysis session must produce at least one of these outputs before the agent considers the task complete:

  1. Triage report — for unknown binaries. Covers observations, heuristics, unknowns, and an agent assessment section clearly separated from CLI evidence.
  2. Focused analysis — for targeted questions about a specific function, import, or behavior. Answers the user's question with CLI evidence first, agent interpretation second.
  3. Capability summary — for "what does this binary do" questions. Maps functional areas with evidence sources and confidence levels.

Reports must:

  • Separate CLI evidence (deterministic) from agent assessment (interpretation).
  • Cite confidence levels for every heuristic claim.
  • Include provenance: project ID, binary SHA-256, adapter and backend versions.
  • Note partial results, timeouts, or diagnostic warnings — do not hide limitations.

Verification Matrix

Before presenting results to the user, verify:

CheckHow
CLI commands all returned success: true or documented partial: trueCheck success and partial in each response envelope
No diagnostic warnings were silently ignoredReview diagnostics array in every response
Evidence citations are traceable to CLI outputEvery factual claim matches a field in a data block
Agent inferences are explicitly labeledSearch your output for unqualified claims
Project state is cleanRun binary project status --project <name> --json
Report was generated and reviewedReport file exists in project reports/ directory

Exit Criteria

Stop and report results when:

  • A triage report has been generated and the user's question is answered with evidence-backed findings.
  • A focused analysis has produced the specific information requested (decompiled function, call path, import list) with provenance.
  • Three non-converging diagnostic passes have been attempted for the same issue. Report the evidence gathered and the blocker.
  • The binary format is unsupported (exit code 5). Report the format limitation.
  • A hard dependency is missing and the user declines to install it. Report the gap.

Do not stop after a single structural query unless it fully answers the user's question. Static analysis is iterative — broad survey, then deep-dive.

Alternatives

Compare before choosing

Computed 10023,881

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10014,540

prowler-cloud/prowler

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance

Computed 10014,306

wanshuiyin/Auto-claude-code-research-in-sleep

citation-audit

Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.

Computed 9832,785

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.