re-riscv

re-riscv is a skill for Claude Code from dslsdzc/rev-skills. It costs 88 tokens per session (4,350 once invoked), scanned A, original, Apache-2.0.

A guide to reverse-engineering programs and firmware built for RISC-V processors, including 32-bit and 64-bit systems. It covers compressed instructions, register-based addressing, calling conventions, system calls, and compiler fingerprints.

In plain words
What is it for?
Use it to inspect RISC-V Linux programs, MCU firmware, bare-metal images, ESP32-C3-class devices, system-call boundaries, and library patterns.
Why use it?
A disassembler can misread a RISC-V binary if the processor variant, instruction extensions, or byte order are wrong. This guide helps identify the architecture and interpret its code correctly.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to inspect RISC-V Linux programs, MCU firmware, bare-metal images, ESP32-C3-class devices, system-call boundaries, and library patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-riscv
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dslsdzc/rev-skills --skill re-riscv
Clone the repo
git clone --depth 1 https://github.com/dslsdzc/rev-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for re-riscv

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-riscv/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-riscv)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-riscv"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-riscv/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for re-riscv

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-riscv"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-riscv.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,350 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.04350
Opus 5 $0.00044 $0.02175
Sonnet 5 $0.00018 $0.00870
Haiku 4.5 $0.00009 $0.00435

Measured 7d ago against content hash 7082b66e8918, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

re-riscv scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/re-riscv/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RISC-V 架构逆向(RV32/RV64、RVC、gp 相对寻址)

何时使用 / 何时不用

  • 用:RV32/RV64 架构二进制——Linux 用户态程序、裸机固件、RISC-V MCU 固件(ESP32-C3 类 RV32IMC)
  • 用:压缩指令(RVC)混编代码流、gp 相对寻址恢复、RISC-V ABI 识别、ecall 系统调用/环境调用边界
  • 用:工具链与库函数指纹(glibc/musl/newlib 系、指令扩展特征)
  • 不用:ARM / x86 / MIPS 等其他架构(走 [[re-binary-core]] 通用底座,本技能只补 RISC-V 特有语义)
  • 不用:工具链极端定制且无头绪时,先走 [[re-fw-emulate]] 仿真兜底(能跑就先看行为,再回静态)
  • 不用:只需解包固件看内容([[re-fw-extract]])/ 分析文件系统与配置([[re-fw-rootfs]])/ 整体启动固件([[re-fw-emulate]])

工具准备

所有工具先验证再使用。静态分析可免沙箱;qemu 动态执行默认沙箱 + 网络隔离([[platform-tips]] 最高原则)。

反编译器(Ghidra / IDA 任选其一)

  • Ghidra(内置 RISC-V 处理器模块,RV32/RV64 + I/M/A/F/D/C 扩展,自动处理 RVC 压缩指令):
    • Linux: 官方 release 包(需 JDK);部分发行版仓库有 apt install ghidra / pacman -S ghidra
    • macOS: brew install --cask ghidra;Windows: 官方 zip
    • 验证: analyzeHeadless -help(headless 模式)或 GUI 导入 RISC-V ELF
  • IDA:商业版含 RISC-V 模块;Freeware 版架构支持范围以官方页面为准
  • 导入时确认 RV32/RV64 与端序——标准 RISC-V 小端、大端变体罕见,选错全部错位

readelf / file —— 架构与字节序确认(binutils)

  • Linux: binutils 自带(apt install binutils 等);macOS: brew install binutils 或 LLVM 系 readelf;Windows: WSL 内
  • 验证: readelf --version

binutils 交叉工具链 —— RISC-V 反汇编/符号表(objdump)

  • Debian/Ubuntu: apt install binutils-riscv64-linux-gnu(提供 riscv64-linux-gnu-objdump;编译链加 gcc-riscv64-linux-gnu,gcc 依赖带入 binutils 包)
  • Fedora: dnf install binutils-riscv64-linux-gnu gcc-riscv64-linux-gnu(cross-binutils / cross-gcc 源包,提供 riscv64-linux-gnu-objdump;官方仓库无 riscv64-unknown-elf 裸机工具链,裸机反汇编用 riscv64-linux-gnu-objdump,RVC 支持一致)
  • Arch: pacman -S riscv64-elf-binutils riscv64-elf-gcc(裸机,提供 riscv64-unknown-elf-objdump)或 pacman -S riscv64-linux-gnu-binutils riscv64-linux-gnu-gcc(用户态)
  • macOS: brew install riscv64-elf-binutils riscv64-elf-gcc(homebrew-core,提供 riscv64-unknown-elf-objdump);Windows/WSL: WSL 内 Linux 版
  • 验证: riscv64-unknown-elf-objdump --version(Debian/Ubuntu/Arch/brew)、riscv64-linux-gnu-objdump --version(Fedora);objdump 对 RVC 混编流自动识别(2/4 字节)

qemu-riscv64 / qemu-riscv32 —— RISC-V 用户态仿真(动态验证)

  • Linux: apt install qemu-user / dnf install qemu-user / pacman -S qemu-user
  • macOS: brew install qemu(含用户态);Windows/WSL: WSL 内 Linux 版
  • 64 位为 qemu-riscv64、32 位为 qemu-riscv32-L <rootfs> 指定动态库/链接器来源,-strace 跟踪系统调用
  • 验证: qemu-riscv64 --versionqemu-riscv32 --version
  • 裸机 RISC-V(无 OS)qemu-user 不适用——用 qemu-system-riscv64/32(Debian trixie 起 / Ubuntu 25.10 起独立包 apt install qemu-system-riscv,Ubuntu 24.04 及更早、Debian bookworm 在 qemu-system-misc 内;Fedora / Arch dnf install qemu-system-riscv / pacman -S qemu-system-riscv-machine virt 或板级模型(-s -S 接 gdb),或 [[re-emulation]] 用 Unicorn 逐指令

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 132 lines · 88 tokens per session scan A 7082b66e8918

Subscribe to this mod's changes

re-riscv is a skill published in the GitHub repository dslsdzc/rev-skills (52 stars, last pushed 12d ago), licensed Apache-2.0. It adds 88 tokens to every session and 4,350 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

Youngmaidainon/Agent-Level-Up · 95 tokens

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

reverse-engineering-arm-binaries

Reverse engineers ARM/AArch64 malware by identifying the architecture and instruction set state (ARM/Thumb), parsing ELF/Mach-O ARM headers, and orienting analysis around the ARM calling convention. Activates for requests to reverse ARM binaries, analyze AArch64 malware, or handle ARM/Thumb instruction-set decoding.

meltedinhex/analyst-ai-pack · 69 tokens

deobfuscating-powershell-obfuscated-malware

Systematically deobfuscates multi-layer PowerShell malware using AST analysis, dynamic tracing, and tools like PSDecode and PowerDecode to reveal hidden payloads and C2 infrastructure. Use during incident response or malware analysis when a PowerShell script is obfuscated with encoding, string manipulation, or…

Youngmaidainon/Agent-Level-Up · 90 tokens

conducting-malware-incident-response

Respond to malware infections across enterprise endpoints by identifying the malware family, determining infection vectors, assessing spread, and executing containment, analysis, eradication, and recovery procedures aligned to MITRE ATT&CK. Use when responding to a confirmed or suspected malware infection, including…

Youngmaidainon/Agent-Level-Up · 78 tokens

analyzing-network-covert-channels-in-malware

Detect and analyze covert communication channels used by malware, including DNS tunneling, ICMP exfiltration, steganographic HTTP, and other protocol abuse used for C2 and data exfiltration. Use when investigating suspicious DNS/ICMP/HTTP traffic patterns, hunting for hidden C2 channels in network captures, or…

Youngmaidainon/Agent-Level-Up · 90 tokens