/r2sql:grepfrom r2sql
Search radare2 named entities by pattern via r2sql. Use to find functions, flags, imports, exports, sections, or comments matching a name pattern across all kinds in a single query.
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 you don't yet know what kind of thing you're looking for — you have a name (or part of one) and want every place in the binary that matches.
For typed lookups (only functions / only strings / only imports),
prefer the dedicated disassembly / data skills. For finding
callers/callees use xrefs.
| table | source | columns |
|---|---|---|
grep | composite | kind, name, full_name, parent_name, addr, pattern* |
pattern is an input-only pseudo-column: it's empty on a plain
SELECT *, but WHERE pattern = '<glob>' filters by name (see below).
grep is a virtual composite over funcs, flags, imports,
entries, sections, and comments. kind is the source table
(singular: func, flag, import, export, section, comment).
full_name is the parent!name form for imports (e.g.
kernel32.dll!CreateFileW); for every other kind it equals name.
parent_name is the owning library for imports (from libname) and is
empty for all other kinds.
Pattern rules:
| WHERE clause | semantics |
|---|---|
WHERE pattern = 'Create%' | SQL LIKE prefix match |
WHERE pattern = '%Decrypt%' | SQL LIKE substring |
WHERE pattern = 'foo' | case-insensitive substring |
WHERE name LIKE '...' OR name = ... | explicit per-column predicates |
The pattern pseudo-column is the convenient one — r2sql matches it
(case-insensitively) against both name and full_name. A wildcard-free
value is treated as a substring; values containing %/_ are anchored
SQL-LIKE globs. The match runs inside r2sql's iterator, so the filter
is applied without materialising the full composite into the SQLite cache.
-- everything mentioning "decrypt"
SELECT kind, name, addr FROM grep WHERE pattern = '%decrypt%';
-- only function symbols starting with "sub_"
SELECT kind, name FROM grep
WHERE pattern = 'sub_%' AND kind = 'func';
-- imports + exports referencing crypto
SELECT kind, name, parent_name FROM grep
WHERE pattern = '%Crypt%' AND kind IN ('import','export');
-- every import from a specific library
SELECT addr, name FROM grep
WHERE kind = 'import' AND parent_name = 'kernel32.dll';
-- how many of each kind match?
SELECT kind, COUNT(*) AS n FROM grep WHERE pattern = '%http%' GROUP BY kind;
addr is 0 for entities that aren't location-bound (most aren't —
funcs, imports, etc. all have addresses, but a section's
start_addr may be 0 for headerless segments, so its grep row's
addr is 0 too).UPDATE/DELETE; route writes
through the typed tables (flags, comments) and use the
annotations skill.What SKILL.md sets; muted values are Claude Code's defaults
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.Other plugins' skills for the same job