Command Palette

Search for a command to run...

Назад к скиллам
скилл № 99579

connect

Start or resume binary analysis with radare2 and r2xsql. Use for fresh headless executables, saved projects, tandem with interactive r2 CLI/text or iaito GUI…

БесплатноБез исполняемых скриптов
radareorgот radareorg★ 23 звезды на GitHub

Установить connect в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

What r2xsql is now

r2xsql is a radare2 core plugin and nothing else. There is no r2xsql binary, no r2xsql server and no r2xsql port. The plugin registers two commands inside radare2 -- sql and sqlj -- in three forms:

Command Output
sql <SQL> a radare2 table, for a human at the console
sql,<tablequery> <SQL> the same table, shaped by r2's table query
sqlj <SQL> the JSON envelope, for a program

Help and discovery follow r2's conventions — sql? for the command, sql,? for the table-query language, sql.? for the subcommands:

Subcommand What
sql.? list the sql.* subcommands
sql.tables list the SQL tables this build exposes
sql.views list the SQL views this build exposes

sql.tables and sql.views are answered by querying sqlite_master, so they are always the real surface rather than a list that can go stale. The sql. namespace is subcommands only and never carries SQL — sql.SELECT 1 is refused with a message rather than executed.

sql renders through radare2's own table API, so it honours cfg.table.format, cfg.table.maxcol and scr.utf8 exactly like afl, or iz,. The sql, form hands your query to r_table_query, which is where :csv, :tsv, :json, :html, :r2, :quiet, */head/N and */page/N/M come from — none of it implemented by r2xsql. sql,? prints the query language's own help.

The table query is a suffix, before the SQL, and it ends at the first space:

sql,:csv SELECT name, size FROM funcs
sql,size/gt/100,:quiet SELECT name, size FROM funcs

That ordering is forced, not stylistic: the query language reserves , and /, and SQL is full of both, so a trailing query could not be told apart from the statement. is,/iz, solve it the same way.

Note that r2xsql's own WHERE / ORDER BY / LIMIT are strictly more capable than c/gt/N / c/sort/inc / */head/N. Reach for sql, for its output formats, not for filtering.

Because they are ordinary r2 commands, every transport radare2 already has carries them for free: the console, r2pipe, r2's HTTP server (=h), and MCP. That is the whole design — r2xsql does not need a transport of its own.

sqlj is not merely sql with different formatting, and sql,:json is not a substitute for it. It runs through run_script, so it executes multiple statements (one result object each), and it distinguishes SQL NULL from the empty string.

A radare2 table cannot do either. Its JSON serializer emits only numbers and strings — there is no null — and it omits any cell whose text is empty. So:

sql,:json SELECT NULL AS a, '' AS b, 'x' AS d   ->  [{"d":"x"}]
sqlj      SELECT NULL AS a, '' AS b, 'x' AS d   ->  rows: null,&quot;&quot;,&quot;x&quot;

a and b do not come back as null or empty from the table — they vanish, indistinguishable from a column that was never selected. Prefer sqlj for anything programmatic.

Rule 1: WRAP THE COMMAND IN DOUBLE QUOTES

This is the single most important thing in this file. Unwrapped queries fail silently — no error, no exception, an empty result.

radare2's command parser claims characters SQL uses constantly, and it claims them before the plugin ever runs:

  • any command containing > returns an empty string unless it starts with " (r2 reads it as "redirect output to a file");
  • any command containing | is piped to the shell under the same exemption, with r2's sandbox switched off for the duration.
# WRONG — returns nothing, and writes a file called `100`
sqlj SELECT name FROM funcs WHERE size > 100

# WRONG — `||` is SQL string concat; this reaches your shell
sqlj SELECT name || perm FROM sections

# RIGHT — wrap the whole command, closing quote last
"sqlj SELECT name FROM funcs WHERE size > 100"
"sqlj SELECT name || perm FROM sections"

Three details that bite:

  • The single-quote form does not work here. 'sqlj … bypasses the rest of r2's parser and so works at the console, but both guards above test for " specifically, so over HTTP it still returns an empty body. Test it by hand, ship it broken.
  • The closing quote must be last. Text after it is parsed normally, so "sql …" > out still redirects.
  • ~ and @ inside SQL '…' string literals are already safe — r2's parser treats ' as a quote — but > and | are not protected that way.

Prerequisite: a matching radare2

The plugin links radare2's libraries and carries R2_ABIVERSION, so it loads only into the radare2 build it was compiled against. A mismatch shows up as L refusing to load it.

r2pm -ci radare2                       # radare2's own package manager
git clone https://github.com/radareorg/radare2 && radare2/sys/install.sh
brew install radare2                   # macOS

Confirm the plugin is present and which version it is:

radare2 -q -c 'Lcj' /bin/ls | jq '.[] | select(.name=="r2xsql")'

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Bash
  2. 02Read
  3. 03Glob
  4. 04Grep

Вложенные файлы

  • references/deployment.md
  • references/schema-catalog.md
  • references/server-guide.md

FAQ

Что делает скилл connect?

Start or resume binary analysis with radare2 and r2xsql. Use for fresh headless executables, saved projects, tandem with interactive r2 CLI/text or iaito GUI sessions, HTTP endpoints, session reuse, saving and shutdown, and routing SQL analysis to domain skills.

Как установить скилл connect?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл connect запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить connect с