radareorg/radare2-skills/re-source
Claude Code and agent skill by radareorg/radare2-skills
- community
Checking that the SKILL.md file is still in the repository.
Recursive bottom-up annotation of a radare2 binary via r2xsql — walk from strings/imports up through callers, naming and commenting each layer until the binary reads like source. Use for reverse engineering campaigns that span multiple sessions.
Install
npx vskill@latest install radareorg/radare2-skills/re-sourceSKILL.md
When to use
Pick this skill when the user wants to incrementally rebuild meaning in a binary: turn sub_401000 into aes_init, write what each function does, and persist that across sessions so the next pass starts from a richer baseline.
For one-off analysis or open-ended triage, use the analysis skill. For the mechanics of writing comments/flags, use annotations.
Required: write + project
Persistence is required. Always:
so every comment/flag you add gets saved to the project on exit.
The re-source loop
- Anchor — pick an unambiguous data leaf:
- a unique string (
'license check failed') - a unique import (
CryptDecryptif it appears once) - a known constant (PE magic, RC4 sbox, …)
- Walk back —
xrefsto find the first caller, then the
caller's caller, … up to a function that's identifiable from its own surface (a public DLL export, an exception handler, a top-level dispatcher).
- Name and comment — every named anchor becomes a
UPDATE flags SET name = … and UPDATE comments SET text = ….
- Repeat with the next un-named anchor.
Walked example
Multi-pass workflow
Each pass over the binary makes the next pass cheaper:
- Pass 1: name 20-50 leaf functions from strings/imports.
- Pass 2: use the named functions as your new anchors — every
xrefs walk lands on a meaningful name instead of sub_*.
- Pass 3: start naming dispatchers and state machines based on
what their callees do.
Persist explicitly with Ps NAME before exiting; the plugin does not save automatically. Reopen with -p NAME to skip re-analysis and keep building.
Type reconstruction
types and types_members surface r2's type database — useful when the binary uses well-known struct shapes (Windows headers, Linux kernel structs). Apply types to memory with tl <TYPENAME> @ <addr> through the r2js skill (a raw r2 command, not a SQL write).
Caveats
- Renames stick only if you opened with
-w; otherwise they vanish
on exit and the next pass starts from sub_* again.
- The
xrefstable only sees what the analysis found. Runaaaa(with
-AA) for deeper static analysis before serious re-sourcing.
- Anchors degrade — a string like
'error'is too common to follow.
Pick unique anchors first; the rare ones give straight chains.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingr2xsql/re-source/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/radareorg/radare2-skills/re-source)