re-fp-runtime

re-fp-runtime is a skill for Claude Code from dslsdzc/rev-skills. It costs 74 tokens per session (3,103 once invoked), scanned A, original, Apache-2.0.

A reverse-engineering skill for programs compiled from Haskell or OCaml, two functional programming languages. It focuses on how these programs store closures, which package code with captured data, and heap objects at runtime.

In plain words
What is it for?
Use it to recognize Haskell and OCaml binaries, analyze closures, heap objects, evaluation order, pattern matching, bytecode, symbols, and runtime structures with tools such as Ghidra, IDA, readelf, or OCaml utilities.
Why use it?
Functional-language compilers can make ordinary control-flow analysis difficult, so following data and runtime structures can reveal more than relying only on a decompiler’s output. The skill also helps identify which runtime produced a binary.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to recognize Haskell and OCaml binaries, analyze closures, heap objects, evaluation order, pattern matching, bytecode, symbols, and runtime structures with tools such as Ghidra, IDA, readelf, or OCaml utilities.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-fp-runtime"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-fp-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,103 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.00074 $0.03103
Opus 5 $0.00037 $0.01551
Sonnet 5 $0.00015 $0.00621
Haiku 4.5 $0.00007 $0.00310

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

Security

Grade A, and why

re-fp-runtime 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-fp-runtime/SKILL.md · 110 lines

How it starts

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

函数式运行时逆向(Haskell / OCaml)

何时使用 / 何时不用

  • 用:Haskell/OCaml 产物(GHC RTS 符号、OCaml block 头特征),需要还原闭包/堆对象、求值顺序、模式匹配分支
  • 用:OCaml 原生/字节码产物判别与字节码分析(ocamlrun 脚本头特征)
  • 不用:命令式语言产物(各归各技能:C++ → [[re-cpp-abi]]、Go → [[re-go]]、Rust → [[re-rust]])
  • 不用:只需函数逻辑且控制流完整(函数式产物控制流打散,直接反编译收益低,见步骤 4)

工具准备

readelf / llvm-nm(符号分析)

  • 安装与验证见 [[re-cpp-abi]] 工具准备

ghc 工具链(Haskell 侧,可选)

  • Linux/macOS: GHC 安装包(apt install ghc / brew install ghc / ghcup);Windows: ghcup(winget install ghcup 或官网安装器);验证: ghc --version
  • 用途: 同版本编译对照产物,验证 closure/info table 形态(GHC 版本差异大)

ocamlobjinfo / ocamlopt(OCaml 侧,可选)

  • Linux/macOS: OCaml 工具链(apt install ocaml / brew install ocaml);Windows: opam(winget install OCaml.opam)或官网安装器;验证: ocamlobjinfo 处理任意 .cmx 输出 CRC 与导入表
  • 用途: 字节码产物/对象文件结构分析(ocamlobjinfo 可读 .cmo/.cmx/字节码可执行文件)

Ghidra / IDA(反编译底座)

  • 安装与验证见 [[re-ghidra]] / [[re-ida]]

file / xxd / Python struct(字节级核对)

  • 系统自带(file/xxd);Python 3 自带 struct
  • 用途: 字节码产物判别(ocamlrun 脚本头)、closure 首字段/block 头字节验证(示例见 [[examples]])

操作步骤

按顺序执行;逆向着重数据流而非控制流(函数式产物控制流被打散,见坑 4)。每步产物存档(路径 + sha256,见 [[re-triage]])。

  1. 运行时识别
    readelf -s sample | grep -iE 'ghc|stg_|RTS|HsMain|_closure|_info' | head   # GHC 特征
    readelf -s sample | grep -iE 'caml_' | head                                # OCaml 特征
    file sample                                                              # 字节码产物判别(脚本头)
    
    • GHC:main(C RTS 入口)+ RTS 运行时符号(stg_*/hs_*)+ 业务符号 Main_main_closure/Main_main_info模块_名字_closure/info 形态)
    • OCaml 原生:maincaml_maincaml_startup_commoncaml_start_programcaml<模块>__entrycaml_startup/caml_startup_pooled 是供 C 嵌入调用的等价入口(签名同为 void (char_os **argv),区别在 pooling 标志与异常行为),勿误当主链;caml_* 运行时符号(caml_alloc/caml_apply2/3 等)
    • 字节码 vs 原生caml_start_program 仅存在于 native 运行库(4.14.2 libasmrun.a 实测),是 native 特征;字节码判据用 caml_interprete(仅 libcamlrun.a 有);字节码产物判别用 fileocamlrun script executable)/xxd 头(#!...ocamlrun\n 脚本头 + T/C 魔数 + 分节)
    • 入口链各版本一致:runtime/main.c 定义 main 并调用 caml_main(argv)caml_main 定义于 startup_byt.c/startup_nat.c;原生链 main → caml_main → caml_startup_common → caml_start_program,4.14.2 实测地址见 [[examples]]);字节码运行库入口为 caml_main → caml_startup_aux → caml_interprete
    • 判别速查:GHC = stg_* 机械符号群 + 模块_名_closure/info 对;OCaml 原生 = caml_* 群 + caml<模块>__<名>_<id>;OCaml 字节码 = #!ocamlrun 脚本头

Read the full file on GitHub · 110 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 · 110 lines · 74 tokens per session scan A 51fa5e377527

Subscribe to this mod's changes

re-fp-runtime is a skill published in the GitHub repository dslsdzc/rev-skills (50 stars, last pushed 11d ago), licensed Apache-2.0. It adds 74 tokens to every session and 3,103 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-08-30.

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

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

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