re-ai-model

re-ai-model is a skill for Claude Code from dslsdzc/rev-skills. It costs 97 tokens per session (4,570 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,570 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.04570
Opus 5.5 $0.00039 $0.01828
Sonnet 5.5 $0.00019 $0.00914
Haiku 4.5 $0.00010 $0.00457

Measured 1mo ago against content hash 40f8a3e467f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 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 的加载默认隔离环境([[re-analyze/platform-tips]] 沙箱最高原则),先读后跑;模型解析/权重提取为静态步骤,可免沙箱

工具准备

参考 [[re-analyze/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 要求 Python 3.10+,具体版本以 PyPI Requires-Python 为准;自带 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.10)—— PyTorch 模型加载

  • Linux/Windows: pip install torch(默认 PyPI 轮子为带 CUDA 全量包,数 GB;仅 CPU 分析用 pip install torch --index-url https://download.pytorch.org/whl/cpu)
  • Python 版本下限:当前 torch 2.x 要求 Python >=3.10(PyPI requires-python;torchvision 同步为 >=3.10)——3.9 环境要装需 pin 到仍支持 3.9 的旧版(2.8.x 及更早)。torch / torchvision / Python 的具体组合以官方 compatibility matrix 为准,别按「3.9+」泛化
  • 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 · 167 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. 1mo ago Changed 40f8a3e467f1
  2. 2mo ago Changed · +1 lines ff13a51e0f67
  3. 2mo ago Changed · +4 lines 0c51bcbfeec5
  4. 2mo ago Changed · +1 lines 518e62d8c294
  5. 3mo 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 (275 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 97 tokens to every session and 4,570 once invoked, about $0.0004 per session on Opus 5.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

re-ai-model compared with skills from other repositories

re-ai-model next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
re-ai-modeldslsdzc/rev-skillsSkill2751mo agoApache-2.0A97Claude Code
analyzing-golang-malware-with-ghidraYoungmaidainon/Agent-Level-UpSkill43mo agoMITA95Claude Code, Codex
deepspot-mK-Dense-AI/scientific-agent-skillsSkill59ktodayMITA70Claude Code
torchdrugK-Dense-AI/scientific-agent-skillsSkill59ktodayMITA64Claude Code
nemo-mbridge-perf-expert-parallel-overlapNVIDIA/skillsSkill4.2ktodayApache-2.0A56Claude Code
pick-a-pii-modelmaziyarpanahi/openmedSkill5.9ktodayApache-2.0A64Claude Code
esmsynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A86Claude Code, Codex