Manages breakpoints and patches bytes in Ghidra via ghidrasql. Use for listing, adding, modifying, or deleting breakpoints and single-byte patches.
Ships in ghidrasql. 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.
Read when SKILL.md points to them.
ghidrasql exposes Ghidra's breakpoint metadata table and a single-byte patch path through bytes.value. This is not an active debugger control plane — Ghidra itself is not a runtime debugger in the JTAG sense — but it covers static breakpoint definition for tooling that consumes the project (e.g. running it under a real debugger later) and direct byte patching.
Use this skill when the user asks to:
bookmarks (lightweight notes that often double as patch markers)Route to:
disassembly for context around a breakpoint or patch siteannotations to document a patch via a comment or bookmarkanalysis for triage that uncovered the patchstep, no continue, no register read/write.breakpoints.type value reflecting the kind, but ghidrasql does not exercise it.bytes writes one byte at a time. For multi-byte patches, batch UPDATEs in a single transaction-like script.breakpoints is a writable virtual table. 11 columns:
| Column | Type | Writable? |
|---|---|---|
addr | int | – (key) |
enabled | int | UPDATE |
type | int | UPDATE |
type_name | text | – (computed from type) |
size | int | UPDATE |
flags | int | – |
pass_count | int | – |
condition | text | UPDATE |
group | text | UPDATE |
loc_type | int | – |
loc_type_name | text | – (computed from loc_type) |
INSERT signature (positional argv):
INSERT INTO breakpoints (addr, enabled, type, size, condition, "group")
VALUES (0x401234, 1, 0, 1, '', 'review');
Required: addr. Defaults: enabled = 1, type = 0, size = 1, condition = '', group = ''.
Common queries:
-- List every breakpoint with its decoded type and location names
SELECT printf('0x%X', addr) AS at, enabled, type_name, size, condition, "group", loc_type_name
FROM breakpoints
ORDER BY addr;
-- Disable a breakpoint without removing it
UPDATE breakpoints SET enabled = 0 WHERE addr = 0x401234;
-- Add a conditional breakpoint
UPDATE breakpoints
SET condition = 'EAX == 0',
"group" = 'crashes'
WHERE addr = 0x401234;
-- Delete
DELETE FROM breakpoints WHERE addr = 0x401234;
To discover the actual type and loc_type integer values used by Ghidra on this binary, consult type_name / loc_type_name:
SELECT DISTINCT type, type_name FROM breakpoints;
SELECT DISTINCT loc_type, loc_type_name FROM breakpoints;
Empty until at least one breakpoint exists — set one through the GUI or via INSERT first.
bytes.value is the single writable byte column. Each UPDATE patches one address:
-- Single-byte patch (NOP an instruction byte)
UPDATE bytes SET value = 0x90 WHERE addr = 0x401234;
-- Verify
SELECT printf('0x%X', addr) AS at, value, ascii, is_printable
FROM bytes
WHERE addr = 0x401234;
Multi-byte patch (NOP a 5-byte instruction):
UPDATE bytes SET value = 0x90 WHERE addr = 0x401234;
UPDATE bytes SET value = 0x90 WHERE addr = 0x401235;
UPDATE bytes SET value = 0x90 WHERE addr = 0x401236;
UPDATE bytes SET value = 0x90 WHERE addr = 0x401237;
UPDATE bytes SET value = 0x90 WHERE addr = 0x401238;
If an intermediate durable checkpoint is deliberately wanted, issue
SELECT save_database(); separately. It is not part of the patch operation.
There is no separate WriteBytes / PatchBytes SQL surface — bytes.value is the path.
Only initialized bytes are patchable. bytes now surfaces every mapped
byte, including uninitialized-block bytes where value is NULL and
is_initialized = 0; an UPDATE against such a byte is rejected (no backing
storage until the block is initialized). Patch targets should carry
is_initialized = 1.
To find bytes that have been patched (i.e. differ from the original image), join bytes against itself by source_kind:
-- Discover what source_kind values exist on this binary
SELECT DISTINCT source_kind FROM bytes WHERE source_kind IS NOT NULL LIMIT 10;
Document each patch with a bookmark so the patch survives rediscovery:
INSERT INTO bookmarks (addr, type, category, comment)
VALUES (0x401234, 'Note', 'patch', 'NOPed magic check at the entry to authValidate');
bytes is a streaming windowed generator. Keep the guard WHERE addr = X (or a tight range) on every UPDATE so only the requested window is streamed; an unconstrained scan still visits every mapped byte.SELECT save_database(); is an optional periodic checkpoint. Do not
flush after every byte mutation.--readonly --shutdown discard so accidental UPDATEs cannot persist.UPDATE bytes returned without error but the byte didn't change. Re-read the same address and check program_revision(). SQL rows do not survive statement close, so continued disagreement is in the underlying program/debugger state. If the address is in a non-writable segment (e.g. .rdata mapped read-only), Ghidra accepts the write into its program model but a runtime debugger may refuse to apply it.SELECT * FROM funcs WHERE addr <= 0xN AND end_addr > 0xN;); breakpoints set on data are often dropped by Ghidra.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/dataQuery strings, bytes, data items, memory blocks, and relocations through ghidrasql./ghidrasql:debuggerfrom ghidrasql
npx claudepluginhub 0xeb/ghidrasql-skills --plugin ghidrasqlOther plugins' skills for the same job