Skip to content

meltedinhex/analyst-ai-pack / skills/automating-analysis-with-r2pipe

automating-analysis-with-r2pipe

Verified

Automates 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.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.6 KB
references/api-reference.mdmarkdown1.3 KB
scripts/analyst.pyscript2.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
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall