meltedinhex/analyst-ai-pack / skills/automating-analysis-with-r2pipe
automating-analysis-with-r2pipe
VerifiedAutomates radare2/rizin analysis through r2pipe to script function enumeration, string and import extraction, and cross-reference queries across samples programmatically. Activates for requests to automate radare2 with r2pipe, script rizin analysis, or batch-extract functions and xrefs from binaries.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.6 KB |
| references/api-reference.md | markdown | 1.3 KB |
| scripts/analyst.py | script | 2.3 KB |
references/api-reference.md
View on GitHub# API Reference: Automating Analysis With r2pipe
## Overview
`scripts/analyst.py` drives radare2/rizin static analysis through r2pipe: it runs `aaa` and collects
functions (`aflj`), imports (`iij`), and strings (`izj`) as JSON. r2pipe is optional; `check`
reports availability. It drives static analysis commands only and does not run the sample in a
debugger.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| r2pipe | latest | radare2/rizin automation (optional; summary requires it) |
| radare2/rizin | latest | the analysis engine |
| (stdlib) | — | shutil, JSON |
## Core functions
### `check()`
Reports r2pipe availability and which r2/rizin binary is on PATH.
### `summary(path)`
Returns function count/list, imports, and strings via JSON commands.
## Key r2 commands used
- `aaa` — analyze all.
- `aflj` — list functions (JSON).
- `iij` — imports (JSON).
- `izj` — strings in data sections (JSON).
## Usage
```bash
python scripts/analyst.py check
python scripts/analyst.py summary sample.bin
```
## Sources
- r2pipe documentation — https://github.com/radareorg/radare2-r2pipe
- radare2 command reference (The radare2 book) — https://book.rada.re/
- JSON command suffix (`*j`) convention from radare2 documentation
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |