re-nim

re-nim is a skill for Claude Code from dslsdzc/rev-skills. It costs 56 tokens per session (2,820 once invoked), scanned A, original, Apache-2.0.

A guide to analysing programs compiled with Nim, including their strings, error handling, and memory-management structures. Nim is a programming language that can produce native executables containing recognisable runtime code.

In plain words
What is it for?
Use it to inspect Nim executables, mixed Nim and C programs, string handling, exception paths, and garbage-collection or ownership behaviour.
Why use it?
It helps distinguish Nim-generated code from other native code and interpret structures that ordinary decompilers may show unclearly.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to inspect Nim executables, mixed Nim and C programs, string handling, exception paths, and garbage-collection or ownership behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dslsdzc/rev-skills/re-nim
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-nim
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-nim

README.md
[![agentmods](https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-nim/github.svg)](https://agentmods.dev/skills/dslsdzc/rev-skills/re-nim)
Your own site
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-nim"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-nim/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-nim

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-nim"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-nim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,820 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.00056 $0.02820
Opus 5 $0.00028 $0.01410
Sonnet 5 $0.00011 $0.00564
Haiku 4.5 $0.00006 $0.00282

Measured 9d ago against content hash 9d0ee6d8f667, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

re-nim 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 9d 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-nim/SKILL.md · 114 lines

How it starts

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

Nim 逆向

何时使用 / 何时不用

  • 用:Nim 产物(NimMain / GC 符号、NimString 结构特征),需要还原字符串逻辑、异常路径、GC/所有权关系
  • 用:Nim/C 混合产物中区分 Nim 侧代码(按符号来源分组后 Nim 侧进本技能路径)
  • 不用:纯 C/C++ 产物(走 [[re-cpp-abi]] / [[re-binary-core]] 通用路径)
  • 不用:只需函数逻辑(直接反编译技能)

工具准备

readelf / llvm-nm(符号与节分析)

  • 安装与验证见 [[re-cpp-abi]] 工具准备
  • Nim 产物以 ELF 为主(Linux 默认 C 后端);macOS 用 llvm-nm

Ghidra / IDA(反编译底座)

  • 安装与验证见 [[re-ghidra]] / [[re-ida]];Nim 符号(NimMain/NimStringV2 等)导入后直接可读

nim 编译器(可选,对照编译)

  • Linux: apt install nim / dnf install nim / pacman -S nim;macOS: brew install nim;Windows: choosenim/官方安装器
  • 验证: nim -v;用途: 同版本编译对照产物,验证字符串布局/GC 符号形态(版本差异见 [[layout]])

xxd + Python struct(字节级核对)

  • 系统自带(xxd);Python 3 自带 struct
  • 用途: 符号/布局输出异常时按偏移直接解析 NimString 与对象结构(示例见 [[examples]])

操作步骤

按顺序执行,每步产物存档(路径 + sha256,见 [[re-triage]])。

  1. 产物识别

    readelf -s sample | grep -iE 'NimMain|nimGC|NimString' | head   # ELF;Mach-O 用 llvm-nm
    readelf -s sample | grep -iE 'nimIncRef|nimDecRef|rawNewString|eqStrings' | head
    
    • Nim 特征:NimMain(入口链)、GC 符号(refc 的 nimGC_* / orc 的 nimIncRefCyclic 等)、NimStringV2/NimStringDesc 结构类型
    • 注意:release 构建下 GC 符号常被内联/消除(见坑 1),靠 NimMain 与字符串函数兜底
    • 入口链:C mainNimMainNimMainInnerNimMainModule(模块初始化)→ 业务 main
    • 模块初始化顺序按依赖拓扑(import 关系):NimMainModule 内的初始化段先跑被依赖模块——在初始化段断点/下钻时按调用序对照 import 链
  2. 字符串与序列结构(先判 GC 模式)

    • orc/arc(2.x 默认 orc):NimStringV2 = {len: int, p: ptr NimStrPayload}NimStrPayload = {cap: int, data: 内联字符数组}——字符串是"len + 堆上 payload 指针",cap 高位带字面量标记位(见 [[layout]])
    • refc(旧默认):NimStringDesc = {len, reserved, data[]}——字符内联在结构体里
    • 定位:rawNewString(1.x 与 2.x 均为此 importc 名)分配调用点 → 结构布局 → 字符串操作函数(eqStrings 等)
    • 分析:字符串比较点是关键逻辑(校验/协议/命令分发)——eqStrings 调用点即字符串相等判断
    • 序列(seq)与 string 同构:v2 布局同为 len + payload 指针(payload 带 cap),refc 同为 len/reserved + 内联——按同一判别表处理
    • 内存视图(v2 布局,64 位):
      栈/对象内:  len(int64) | p(ptr) ───────────────┐
      堆上 payload:  cap(int64, bit62=字面量标记) | data[cap+1] ←┘
      
      字符串本体只有 16 字节句柄,内容在独立堆块——分析对象结构时按句柄跳转,别在对象里找字符数据

Read the full file on GitHub · 114 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 114 lines · 56 tokens per session scan A 9d0ee6d8f667

Subscribe to this mod's changes

re-nim is a skill published in the GitHub repository dslsdzc/rev-skills (54 stars, last pushed 14d ago), licensed Apache-2.0. It adds 56 tokens to every session and 2,820 once invoked, about $0.0003 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

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

plurigrid/asi · 40 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

26zl/cybersec-toolkit · 40 tokens

analyzing-golang-malware-with-ghidra

Use when reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries. Use when reverseing engineer go-compiled malware using ghidra with specialized scripts for.

oyi77/1ai-skills · 60 tokens

analyzing-windows-prefetch-with-python

Parse Windows Prefetch (.pf) files with the windowsprefetch Python library to reconstruct application execution history, run counts, and accessed file/volume lists. Use when investigating renamed or masquerading binaries, verifying program execution timelines, or hunting for suspicious execution patterns in incident…

Youngmaidainon/Agent-Level-Up · 66 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

autohandai/community-skills · 40 tokens