annotations
Edit radare2 annotations — comments, flag/function names, local variables, bookmarks — via r2xsql. Use when asked to add comments, rename functions/flags…
от radareorg★ 23 звезды на GitHub
Установить annotations в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
When to use
Pick this skill any time the task is a mutation: adding/editing/
removing a comment, renaming a function, deleting a flag, persisting
session state. For read-only annotation lookups, use data or
disassembly.
Persist analysis with a project
Analysis annotations land in r2's session memory and can be edited while the binary is opened read-only. Use SQL on the existing HTTP session for requested edits, then read back the affected rows. Do not start another host or rerun analysis to annotate a session that is already open.
On “save the database/project”, send native Ps over the same curl connection,
normally to the absolute <binary-path>.r2 beside the executable. Verify the
artifact and report its location. Reopen with r2 -p PROJECT without a separate binary or reanalysis.
Saving alone leaves the host running. The
session guide contains
save, verification, restore and shutdown recipes.
Without Ps, mutations vanish when the session exits. -w is needed for
writing binary bytes, not for analysis annotations or saving a project.
Writable tables
| Table | INSERT | UPDATE | DELETE |
|---|---|---|---|
funcs |
define a function (af, optionally afn) |
name (afn), prototype (afs), calling convention (afc) |
undefine (af-) |
locals |
— | name and type through native variable APIs | — |
comments |
set through native metadata APIs | set through native metadata APIs | remove (CC-) |
flags |
create (f) |
rename through the native flag API | remove (f-) |
bookmarks |
create in the bookmarks flagspace | rename through the native flag API | remove in the bookmarks flagspace |
io_maps |
create through native RIO APIs | — | remove through native RIO APIs |
types |
create an empty struct/union/enum through native type APIs | — | remove through native type APIs |
projects |
— (use radare2's Ps NAME) |
— | delete (P-), without an interactive confirmation prompt |
patches |
stage raw hex or assembly | commit all pending patches | undo the most recently staged pending patch |
bytes |
— | overwrite value directly |
— |
runtime_settings |
— | set value |
— |
Use UPDATE funcs SET name='parse_header' WHERE addr=... to rename a
function's analysis name. UPDATE flags SET name=... renames a flag in place;
it does not also rename the function. Names are validated before mutation.
funcs.prototype accepts a nonempty C signature. A trailing semicolon is
removed before literal command dispatch. funcs.calltype must be a name
reported by calling_conventions; the write is checked against the resulting
analysis state. Function and flag reads use the host's native analysis APIs.
The plugin uses its host's in-process libr backend. Operations backed by r2 commands use literal dispatch, which keeps supplied values out of radare2's command-expression parser. Native metadata, variable, flag-rename, type and IO-map operations pass values to C APIs instead.
Comment INSERT and UPDATE set text at an address. Without an existing comment,
UPDATE matches no row; use INSERT to create one. Reads preserve the CCj
representation: type is CCu, and control characters in text are escaped.
Bookmark writes save and restore the current flagspace; id is synthetic.
io_maps INSERT requires start_addr and end_addr with end_addr > start_addr;
paddr defaults to zero and perm to rwx. The current open file descriptor
is used. Map names may include spaces and metacharacters because they are
passed as data to native RIO APIs.
types INSERT creates only an empty named shell. For a complete declaration,
send radare2's td command directly through the same transport as the SQL.
For byte and assembly patches, see the data skill: committing is table-wide,
undo is restricted to the top pending patch, and direct bytes writes have
no patch-overlay undo. Ps saves analysis state; a file-byte patch requires
its own explicit commit/write operation.
Persistence
Saving and opening projects currently use r2 commands on the same HTTP
transport as SQL. There is no SQL save_database(); the former
r2xsql_project_save / r2xsql_project_open functions were removed. Use the
available native operations rather than inventing a SQL lifecycle API.
Ps /absolute/path/target.exe.r2 save the adjacent project
r2 -p /absolute/path/target.exe.r2 reopen before serving / first SQL query
Ps triage1 save a named project under dir.projects
Native projects support binary serialization and script compatibility. Use
P? / prj? to select the loader matching an existing artifact; explicit
command-script exports can be interpreted with -i SCRIPT. Do not assume
all project files are scripts or treat a project as a fresh binary.
Use forward slashes in native r2 paths on Windows. Verify requested names
and comments after reopening; preserve the checkpoint on restore fa
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read
FAQ
Что делает скилл annotations?
Edit radare2 annotations — comments, flag/function names, local variables, bookmarks — via r2xsql. Use when asked to add comments, rename functions/flags, rename or retype locals, or persist analysis state.
Как установить скилл annotations?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл annotations запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…