/r2sql:datafrom r2sql
Query radare2 data and memory — bytes, defined data, byte patterns, strings, imports, entry points, and binary metadata — via r2sql.
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 for non-code facts about the binary:
strings)bytes)data_items)byte_search)imports)entries)binary)types, types_members —
see the connect schema-catalog reference for the full column list)For code structure (functions/blocks/instructions) use disassembly.
For cross-references between code and data, use xrefs.
| table | source | columns |
|---|---|---|
bytes | omj + p8 + iSj | addr, value, is_initialized |
data_items | isj + izj | addr, name, data_type, size, value_repr, segment_name, is_string, is_initialized |
byte_search | /xj + p8 | addr, matched_hex, matched_bytes, size; hidden pattern/bounds |
strings | izj | addr, length, section, type, text |
imports | iij | addr, ordinal, bind, type, name, libname |
entries | iej + iEj | addr, size, type, bind, name |
binary | iIj + quick-counts | key, value (key-value pairs) |
types | tk* + tks | name, kind, size, format |
types_members | tk* + tkj | type/member names, kinds, layout, sizes, values |
-- find every string containing "password" (case-insensitive)
SELECT addr, text FROM strings WHERE text LIKE '%password%';
-- binary type / arch / bits at a glance
SELECT key, value FROM binary
WHERE key IN ('bintype','arch','bits','os','class','endian');
-- imports grouped by library
SELECT libname, COUNT(*) AS n
FROM imports
GROUP BY libname ORDER BY n DESC;
-- crypto API surface
SELECT name, libname FROM imports
WHERE name LIKE 'Crypt%' OR name LIKE '%AES%'
OR name LIKE '%RSA%' OR name LIKE 'BCrypt%';
-- network / IO surface
SELECT name, libname FROM imports
WHERE libname IN ('WS2_32.dll','WINHTTP.dll','WININET.dll','URLMON.dll');
-- entry points / exports (`entries`)
SELECT name, addr, type FROM entries ORDER BY name;
-- readable initialized bytes in a range
SELECT addr, value FROM bytes
WHERE addr >= 0x401000 AND addr < 0x401100 AND is_initialized = 1;
-- byte pattern (hex and `.` wildcard nibbles; optional `:mask`)
SELECT addr, matched_hex FROM byte_search
WHERE pattern = '4889' AND max_results = 20;
-- biggest strings
SELECT addr, length, type, text
FROM strings ORDER BY length DESC LIMIT 20;
SELECT key, value FROM binary ORDER BY key;
binary includes the raw iIj keys plus the func_count,
string_count, import_count, section_count quick-counts r2sql
computes at session start.
strings.type distinguishes ascii, utf16le, utf8, … — filter
on it if you only want printable ASCII.imports.addr is the IAT slot, not the resolved external. Use the
xrefs skill to find code that calls through that slot.entries combines loader entry points and exports; executables can therefore
have rows even when they export no symbols.bytes.value is NULL for uninitialized or unreadable mapped bytes.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub 0xeb/r2sql-skills --plugin r2sql11 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./decompilerGet 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)./disassemblyQuery radare2 code and control flow via r2sql — functions, blocks, CFGs, frames, instructions/operands, low IR, sections, segments, and live IO maps./functionsReference for the SQL helper functions and SQLite built-ins available in r2sql queries — string utilities, hex/int coercion, regex. Use when looking up how to format addresses, search by pattern, or coerce between numeric/text columns.