/bnsql:xrefsfrom bnsql
Analyze Binary Ninja cross-references: callers, callees, imports, data refs. Use the pre-computed callers/callees views for performance.
Ships in bnsql. 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.
| Surface | Description | Performance |
|---|---|---|
xrefs | from_addr, to_addr, type, is_code, from_func | Filter by to_addr = X or from_addr = X |
callers | Pre-computed view: who calls each function | Pure SQL, fast |
callees | Pre-computed view: what each function calls | Pure SQL, fast |
imports | Imported symbols by module | Filter by module for narrow scans |
string_refs | Strings and the functions that reference them | Pure SQL |
-- SLOW: 8000+ BN API calls on a medium binary
SELECT func_start(from_addr), to_addr FROM xrefs WHERE is_code = 1;
-- FAST: Pure SQL, milliseconds
SELECT func_addr, callee_addr FROM callees;
The xrefs table already provides a pre-computed from_func column. Use
that when you need the caller function without an extra UDF call:
SELECT from_func, to_addr FROM xrefs WHERE is_code = 1;
WITH caller_counts AS (
SELECT to_addr, COUNT(*) AS callers
FROM xrefs
WHERE is_code = 1
GROUP BY to_addr
)
SELECT f.name, hex(f.addr) AS addr, c.callers
FROM funcs f
JOIN caller_counts c ON c.to_addr = f.addr
ORDER BY c.callers DESC
LIMIT 10;
malloc?SELECT DISTINCT func_name AS caller_name
FROM callees
WHERE callee_name = 'malloc';
WITH cnt AS (
SELECT to_addr, COUNT(*) AS n
FROM xrefs WHERE is_code = 1
GROUP BY to_addr
)
SELECT f.name, COALESCE(c.n, 0) AS calls
FROM funcs f
LEFT JOIN cnt c ON c.to_addr = f.addr
WHERE COALESCE(c.n, 0) <= 10
ORDER BY calls DESC;
WITH has_callers AS (
SELECT DISTINCT to_addr FROM xrefs WHERE is_code = 1
)
SELECT f.name, hex(f.addr) AS addr
FROM funcs f
WHERE f.addr NOT IN (SELECT to_addr FROM has_callers);
SELECT module, COUNT(*) AS api_count
FROM imports
GROUP BY module
ORDER BY api_count DESC;
disassembly for the underlying instruction streamdecompiler for HLIL call sites via hlil_callsdata for string cross-references via string_refsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
11 skills in this plugin
/analysisBNSQL analysis workflows: triage, security audit, crypto/network detection, multi-table queries./annotationsEdit Binary Ninja databases: comments, renames, types, patches. Mutations require SELECT save() to persist (explicit-save model, v0.0.9+)./connectConnect to Binary Ninja databases and bootstrap sessions. Use when starting analysis, routing to other skills, or setting up CLI/HTTP/MCP connections./dataQuery Binary Ninja strings, bytes, and binary patterns. Use the byte_search table for fast byte-pattern search.npx claudepluginhub 0xeb/bnsql-skills --plugin bnsql