/r2sql:decompilerfrom r2sql
Get pseudocode for radare2 functions via r2sql. Use when asked for a higher-level view of a function than raw disassembly. Runtime-gated by an installed decompiler plugin (r2ghidra / r2dec / built-in pdc).
Ships in r2sql. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Pick this skill when the user wants readable pseudocode for a
function (or wants to grep across pseudocode for many functions). For
raw assembly use the disassembly skill.
The pseudocode table is only registered if a decompiler is
available. At session bootstrap r2sql probes in this order:
| probe | provided by | r2sql command |
|---|---|---|
pdg? | r2ghidra (recommended) | pdg @ <addr> |
pdd? | r2dec | pdd @ <addr> |
pdc? | r2 built-in | pdc @ <addr> |
The first probe that succeeds wins. The pseudocode table is registered only
when a decompiler is detected, so check for it:
SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'pseudocode';
-- one row ⇒ a decompiler is available; empty ⇒ none installed
If no decompiler is installed, SELECT … FROM pseudocode returns
no such table: pseudocode. Install r2ghidra via:
r2pm -ci r2ghidra
| table | columns |
|---|---|
pseudocode | func_addr, text |
Always filter by func_addr — decompiling every function in a binary
on demand is prohibitively slow. The table uses filter_eq pushdown
on func_addr, so a single-function query is one r2 command, not a
full enumeration.
-- pseudocode for one function
SELECT text FROM pseudocode WHERE func_addr = 0x401000;
-- pseudocode for every function whose name starts with 'aes_'
SELECT f.name, p.text
FROM funcs f
JOIN pseudocode p ON p.func_addr = f.addr
WHERE f.name LIKE 'aes_%';
-- grep for a literal across all decompiled functions (expensive!)
SELECT f.name, f.addr
FROM funcs f JOIN pseudocode p ON p.func_addr = f.addr
WHERE p.text LIKE '%memcpy%'
LIMIT 50;
--project NAME to keep the analysis warm, but the
pseudocode itself is re-rendered per query.// Not yet implemented
for thunks, leaf functions, or anything r2's analysis can't handle.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 0xeb/r2sql-skills --plugin r2sqlOther plugins' skills for the same job
11 skills in this plugin
/analysisTriage and audit radare2 binaries via r2sql — find suspicious behavior, surface crypto/network/persistence APIs, hunt high-complexity functions, and run multi-table queries that combine code, data, and xrefs./annotationsEdit radare2 annotations — comments, flag/function names, local variables, bookmarks — via r2sql. Use when asked to add comments, rename functions/flags, rename or retype locals, or persist analysis state./connectConnect to radare2 sessions via r2sql and bootstrap analysis. Use when starting a new SQL session, routing to other skills, or setting up CLI/HTTP/MCP connections.