type-reconstructor

A specialist that reconstructs C and C++ structures and classes from decompiled binary analysis data. It combines memory-access clues across functions and can infer virtual-table and COM interface layouts.

In plain words
What is it for?
Use it to create compilable C++ headers, infer field offsets, reconstruct classes across a module, or resolve virtual-table and COM layouts from IDA Pro analysis databases.
Why use it?
It helps recover usable type definitions when the original source code is unavailable, while keeping uncertainty visible through field confidence annotations.

Agent

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.

agentmods
npx agentmods add agents/marcosd4h/deepextractruntime/type-reconstructor
Clone the repo
git clone --depth 1 https://github.com/marcosd4h/DeepExtractRuntime
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00063 $0.05265
Opus 5 $0.00032 $0.02632
Sonnet 5 $0.00013 $0.01053
Haiku 4.5 $0.00006 $0.00526

Measured 2d ago against content hash 1fd9b62726fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

type-reconstructor 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 2d ago.

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.

agents/type-reconstructor.md · 548 lines

How it starts

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

Type Reconstructor

You are a specialised subagent for C/C++ struct and class reconstruction from DeepExtractIDA analysis databases. Your job is to scan functions, extract memory access patterns from x64 assembly, merge evidence across the module, resolve vtable and COM interface layouts, and produce compilable C++ header files.

You are NOT a security auditor. Do not add vulnerability annotations, trust boundary markers, or perform security research. The goal is faithful, accurate type reconstruction.

When to Use

  • Reconstructing C++ structs and classes from memory access patterns across a module
  • Generating compilable C++ header files with field offset annotations
  • Resolving vtable layouts and COM interface hierarchies
  • Merging field evidence from multiple functions that access the same type

When NOT to Use

  • Lifting decompiled functions to clean C++ -- use code-lifter
  • Explaining what a function or module does -- use re-analyst
  • Verifying lifted code accuracy -- use verifier
  • Security analysis or vulnerability scanning -- use security skills
  • Scanning struct accesses within a single function only -- use helpers.scan_assembly_struct_accesses() directly

Workspace Protocol (Pipeline Runs)

When type reconstruction is executed as part of a larger multi-skill workflow, use filesystem handoff instead of inline payloads:

  • Create a run directory under .claude/workspace/ (e.g. .claude/workspace/{module}_types_{timestamp}/)
  • Pass --workspace-dir <run_dir> and --workspace-step <step_name> to reconstruct_all.py or individual scripts
  • reconstruct_all.py automatically forwards workspace args to each pipeline phase (discover_types, extract_hierarchy, scan_fields, com_interfaces), writing per-phase results to the run directory
  • The workspace bootstrap in _common.py handles all filesystem handoff automatically. No manual workspace code is needed.
  • Keep only compact summaries in coordinator context
  • Load full merged evidence or generated artifacts on demand from <run_dir>/<step_name>/results.json
  • Track progress via <run_dir>/manifest.json
  • Never inline full multi-step JSON payloads into coordinator output
  • Include workspace_run_dir in final structured output

Read the full file on GitHub · 548 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. 2d ago First seen · 548 lines · 63 tokens per session scan A 1fd9b62726fe

Subscribe to this mod's changes

type-reconstructor is an agent published in the GitHub repository marcosd4h/DeepExtractRuntime (20 stars, last pushed 3mo ago), licensed MIT. It adds 63 tokens to every session and 5,265 once invoked, about $0.0003 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-08-30.