From bnsql
Edit Binary Ninja databases: comments, renames, types, patches. Mutations require SELECT save() to persist (explicit-save model, v0.0.9+).
How this skill is triggered — by the user, by Claude, or both
Slash command
/bnsql:annotationsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
BNSQL opens the database read-mostly. Mutations are applied in-memory but are
BNSQL opens the database read-mostly. Mutations are applied in-memory but are
not written to disk until SELECT save(); is called.
UPDATE funcs SET name = 'main' WHERE address = 0x401000;
SELECT save(); -- without this, the edit is lost on exit
This applies to every mutation: UPDATE/INSERT/DELETE on writable tables,
plus set_name() / set_comment() UDFs.
SELECT (precision before edit).set_* UDF).SELECT save(); to persist.| Surface | Operations | Columns |
|---|---|---|
funcs | INSERT/UPDATE/DELETE | name (rename); INSERT creates a function via BN API |
names | INSERT/UPDATE/DELETE | name (global rename) |
comments | INSERT/UPDATE/DELETE | comment |
hlil_vars | UPDATE | name, type, comment |
types, type_members, type_enum_values | INSERT/UPDATE/DELETE | Type system edits |
patches | INSERT/UPDATE/DELETE | Byte-level patches |
Plus UDFs: set_name(addr, name), set_comment(addr, text).
SELECT name FROM funcs WHERE address = 0x401000;
UPDATE funcs SET name = 'parse_packet' WHERE address = 0x401000;
SELECT name FROM funcs WHERE address = 0x401000;
SELECT save();
SELECT comment FROM comments WHERE address = 0x401000;
INSERT INTO comments(address, comment) VALUES (0x401000, 'Entry point dispatcher');
SELECT save();
Or via UDF:
SELECT set_comment(0x401000, 'Entry point dispatcher');
SELECT save();
UPDATE hlil_vars
SET name = 'packet_len'
WHERE func_addr = 0x401000 AND storage = 'rdi';
SELECT save();
UPDATE hlil_vars
SET type = 'PACKET_HEADER *'
WHERE func_addr = 0x401000 AND name = 'packet_len';
SELECT save();
sub_* functions matching a patternUPDATE funcs
SET name = 'handler_' || printf('%X', address)
WHERE name LIKE 'sub_%'
AND address IN (
SELECT to_ea FROM xrefs
WHERE from_ea = (SELECT address FROM funcs WHERE name = 'dispatcher_table')
);
SELECT save();
INSERT INTO patches(address, patched) VALUES (0x401050, X'90909090');
SELECT save();
Use SELECT * FROM patches to inventory current patches; the original
column preserves the pre-patch bytes for safe revert via DELETE.
Writes to hlil_vars, pseudocode, or names that affect a function
invalidate the decompiler cache for that function. The next read against
pseudocode / hlil_vars / hlil_calls for that function re-decompiles.
No manual refresh step is required.
decompiler for HLIL variable inspection before renametypes for type creationxrefs for finding the right targets before mutatingsave(): Edits succeed but vanish on exit. Always pair mutations
with SELECT save();.SELECT * FROM capabilities; for the live feature matrix.SELECT to confirm the target row exists.npx claudepluginhub 0xeb/bnsql-skills --plugin bnsqlSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.