re-ai-model

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

A guide for examining machine-learning model files such as ONNX, PyTorch, Safetensors, and TFLite. It reconstructs network structure, extracts weights, and checks files for embedded markers or suspicious content.

In plain words
What is it for?
Use it to parse model formats, recover network structure, extract weights, inspect metadata and tensor patterns, and investigate possible file-level watermarks or poisoned models.
Why use it?
It helps inspect a model file safely and understand what it contains without immediately running unknown serialized data.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to parse model formats, recover network structure, extract weights, inspect metadata and tensor patterns, and investigate possible file-level watermarks or poisoned models.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dslsdzc/rev-skills/re-ai-model"><img src="https://agentmods.dev/badge/skills/dslsdzc/rev-skills/re-ai-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,160 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.00097 $0.04160
Opus 5 $0.00048 $0.02080
Sonnet 5 $0.00019 $0.00832
Haiku 4.5 $0.00010 $0.00416

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

Security

Grade A, and why

re-ai-model 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 10d 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-ai-model/SKILL.md · 161 lines

How it starts

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

AI 模型逆向(ONNX / PyTorch / Safetensors)

何时使用 / 何时不用

  • 用:拿到 .onnx / .pt / .pth / .safetensors / .tflite 等模型文件,要还原网络结构、提取权重
  • 用:文件级水印检测(东西藏在哪里:权重 pattern / metadata / tensor hash / embedding 异常——怀疑模型是从原版复制/微调而来时先查文件侧)
  • 用:模型文件本身是载荷——权重里藏数据、torch.save 打包恶意 pickle、后门/投毒模型(下载执行类样本)
  • 不用:行为级水印(模型表现出来是什么:trigger 触发响应 / 查询响应 / 黑盒指纹)与 API 行为层攻击(走 [[re-ai-attack]])
  • 不用:纯推理脚本/训练代码(那是源码,走 [[re-script-deob]])
  • 不用:模型被打包进可执行文件(PyInstaller/pyarmor 等)——先 [[re-binary-core]] 拆包,拆出的模型文件再回本技能
  • 边界:本技能定位 = 模型文件解析 / 结构分析 / 权重分析 / 文件级水印——恶意模型判定、投毒/后门行为侧、归属取证属取证域(未来独立 re-ai-malware 技能承接;当前此类需求暂在本技能范围,以安全边界(坑 2 pickle 隔离)处理,行为侧转 [[re-ai-attack]])
  • 注意:安全提示——不要直接 torch.load 未知 pkl 文件(pickle 反序列化可执行任意代码,见坑 2);一切对未知 pkl 的加载默认隔离环境([[platform-tips]] 沙箱最高原则),先读后跑;模型解析/权重提取为静态步骤,可免沙箱

工具准备

参考 [[platform-tips]]——模型文件 GB 级常见,静态分析按「静态优先(大型样本)」思路:先格式识别与结构解析,按需提取权重,不整载内存(坑 1)。

python3 —— 所有解析脚本基础

  • Linux: apt install python3 / dnf install python3 / pacman -S python
  • macOS: brew install python3;Windows: choco install python
  • 验证: python3 --version(本技能脚本均为 Python 3)

onnx(pip,Python 3.10+)—— ONNX 解析主力

  • pip install onnx(官方 PyPI;onnx 1.22 要求 Python 3.10+,自带 protobuf 依赖与 onnx.proto3 类型定义)
  • 验证: python3 -c "import onnx; print(onnx.__version__)"

netron(pip,Python 3)—— 模型可视化

  • pip install netron(官方 PyPI,无 Python 版本上界);桌面独立版可选: macOS brew install --cask netron、Windows winget install netron、Linux snap snap install netron
  • 验证: netron --help 有输出(pip show netron 查版本)
  • 用法: netron model.onnx(本地起 http 服务并开浏览器可视化;--no-browser 无头模式)

torch(pip,Python 3.9+)—— PyTorch 模型加载

  • Linux/Windows: pip install torch(默认 PyPI 轮子为带 CUDA 全量包,数 GB;仅 CPU 分析用 pip install torch --index-url https://download.pytorch.org/whl/cpu
  • macOS: pip install torch(官方 wheel 为 CPU/arm64)
  • 验证: python3 -c "import torch; print(torch.__version__)"
  • 安全注:torch.load 底层是 pickle——不要直接 load 未知 pkl 文件;PyTorch 2.6+ 默认 weights_only=True,旧版本/显式 weights_only=False 仍有任意代码执行风险;未知模型先 unzip -l/xxd 粗查(坑 2),在隔离环境用 weights_only=True 加载,能转 safetensors 就转

Read the full file on GitHub · 161 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. 10d ago First seen · 161 lines · 97 tokens per session scan A 747359183e3d

Subscribe to this mod's changes

re-ai-model is a skill published in the GitHub repository dslsdzc/rev-skills (52 stars, last pushed 12d ago), licensed Apache-2.0. It adds 97 tokens to every session and 4,160 once invoked, about $0.0005 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

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens

esm

Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel…

synthetic-sciences/openscience · 86 tokens