4B2A

Ghidra Reconstruct — AI skill for Claude Code

AI community

GhidraReconstruct is a universal, platform-agnostic AI agent skill md designed to transform raw, messy Ghidra pseudo-C output into clean, standard, and fully compilable C code.

How to install Ghidra Reconstruct

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 4B2A/ghidra-reconstruct and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ghidra Reconstruct does

GhidraReconstruct is a universal, platform-agnostic AI agent skill md designed to transform raw, messy Ghidra pseudo-C output into clean, standard, and fully compilable C code.

Alternatives in AI

  • WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
  • Skill Seekers Roadmap — Transform Skill Seekers into the easiest way to create Claude AI skills from any knowledge source - documentat 11.1k ★
  • Opengap — A framework-agnostic, git-native standard for defining AI agents 2.9k ★

README

GhidraReconstruct V1.2

**GhidraReconstruct** is a universal, platform-agnostic AI agent skill (`.md`) designed to transform raw, messy Ghidra pseudo-C output into clean, standard, and fully compilable C code—**preserving 100% of the original binary logic**.

Optimized for **Claude Code, Cursor, Cline, OpenAI Codex,** and LLM web interfaces.


🚀 Why Use GhidraReconstruct?

  • Zero Logic Alteration: Strictly forces the LLM to preserve bitwise operations, loops, and conditional flow.
  • Compilability Focused: Strips away compiler artifacts (in_FS_OFFSET, __stack_chk_fail) and maps undefinedX primitives to standard types.
  • Token & Cost Optimized: Short, punchy, and explicit instructions prevent the model from wasting tokens on conversational preambles or explanations.

🛠️ How to Use

  1. Copy the GhidraReconstruct.md file into your project's root directory (or append it to your .cursorrules / agent system instructions).
  2. Feed your exported Ghidra pseudo-C file to your AI agent.
  3. Trigger the skill with a simple prompt:

    *"Read the exported Ghidra C file and apply the `GhidraReconstruct` skill rules to rewrite it into a perfectly compilable C file."*


📦 The Skill (`GhidraReconstruct.md`)

# SKILL: Universal Ghidra Pseudo-C Code Reconstructor

## YOUR ROLE
You are a Senior Reverse Engineering and Compiler Expert with 25 years of legendary experience.

## YOUR OBJECTIVE
Your sole task is to read the raw pseudo-C code exported from Ghidra and reconstruct it into clean, readable, and perfectly compilable standard C code that performs **THE EXACT SAME FUNCTIONALITY** as the compiled binary.

## STRICT EXECUTION RULES
1. **Preserve Logic Identity:** Retain 100% of the original mathematical logic, bitwise operations, if-else/switch conditions, and loop structures. The output behavior must mirror the original binary perfectly.
2. **Strip Ghidra Artifacts:** Safely eliminate compiler-generated stac