Technology Selection
dotnet/skills
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework (MAF), GitHub Copilot SDK, ONNX…
AI 模型文件逆向与静态分析:ONNX/PyTorch/Safetensors/TFLite 格式解析、 网络结构还原、权重提取、文件级水印分析(权重 pattern/metadata/tensor hash/embedding 异常)。
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dslsdzc/rev-skills re-ai-model --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/re-ai-model .claude/skills/re-ai-model && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .claude/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-modelType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dslsdzc/rev-skills re-ai-model --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/re-ai-model .agents/skills/re-ai-model && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .agents/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dslsdzc/rev-skills re-ai-model --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/re-ai-model .cursor/skills/re-ai-model && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .cursor/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dslsdzc/rev-skills.git --path .claude/skills/re-ai-model--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dslsdzc/rev-skills re-ai-model --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/re-ai-model .gemini/skills/re-ai-model && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .gemini/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dslsdzc/rev-skills re-ai-modelInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/re-ai-model .github/skills/re-ai-model && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .github/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dslsdzc/rev-skills --skill re-ai-model -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dslsdzc/rev-skills re-ai-model --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dslsdzc/rev-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/re-ai-model .opencode/skills/re-ai-model && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "re-ai-model" agent skill from https://github.com/dslsdzc/rev-skills/tree/main/.claude/skills/re-ai-model into .opencode/skills/re-ai-model/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "re-ai-model", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
re-ai-modelAI 模型文件逆向与静态分析:ONNX/PyTorch/Safetensors/TFLite 格式解析、 网络结构还原、权重提取、文件级水印分析(权重 pattern/metadata/tensor hash/embedding 异常)。
Re AI Model is an agent skill from dslsdzc/rev-skills. AI 模型文件逆向与静态分析:ONNX/PyTorch/Safetensors/TFLite 格式解析、 网络结构还原、权重提取、文件级水印分析(权重 pattern/metadata/tensor hash/embedding 异常)。 触发词:模型文件、权重提取、ONNX解析、safetensors、pth分析、pt文件、模型结构还原、文件级水印
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Deep learning and Embeddings. It works with ONNX, Python, PyTorch and TensorFlow. The repository describes itself as: 122 个逆向工程 AI 技能(可发布、跨平台):恶意软件分析 / 软件逆向 / 固件嵌入式 / 协议逆向 / 移动应用 / 脱壳反混淆 / 软件破解 / 漏洞挖掘 / 托管代码 / 取证情报 / CTF。 The licence is Apache-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit bd21db8. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3pipbrewaptdnfchocowingetFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
download.pytorch.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Re AI Model loads about 2.4k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 536 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from dslsdzc/rev-skills at commit bd21db8, republished under its Apache-2.0 licence (© dslsdzc). 536 words, ~2,361 tokens.
.claude/skills/re-ai-model/SKILL.md (or your agent's skills folder).参考 [[re-analyze/platform-tips]]——模型文件 GB 级常见,静态分析按「静态优先(大型样本)」思路:先格式识别与结构解析,按需提取权重,不整载内存(坑 1)。
apt install python3 / dnf install python3 / pacman -S pythonbrew install python3;Windows: choco install pythonpython3 --version(本技能脚本均为 Python 3)pip install onnx(官方 PyPI;当前 onnx 要求 Python 3.10+,具体版本以 PyPI Requires-Python 为准;自带 protobuf 依赖与 onnx.proto3 类型定义)python3 -c "import onnx; print(onnx.__version__)"pip install netron(官方 PyPI,无 Python 版本上界);桌面独立版可选: macOS brew install --cask netron、Windows winget install netron、Linux snap snap install netronnetron --help 有输出(pip show netron 查版本)netron model.onnx(本地起 http 服务并开浏览器可视化;--no-browser 无头模式)pip install torch(默认 PyPI 轮子为带 CUDA 全量包,数 GB;仅 CPU 分析用 pip install torch --index-url https://download.pytorch.org/whl/cpu)requires-python;torchvision 同步为 >=3.10)——3.9 环境要装需 pin 到仍支持 3.9 的旧版(2.8.x 及更早)。torch / torchvision / Python 的具体组合以官方 compatibility matrix 为准,别按「3.9+」泛化pip install torch(官方 wheel 为 CPU/arm64)python3 -c "import torch; print(torch.__version__)"weights_only=True,旧版本/显式 weights_only=False 仍有任意代码执行风险;未知模型先 unzip -l/xxd 粗查(坑 2),在隔离环境用 weights_only=True 加载,能转 safetensors 就转pip install safetensors;验证: python3 -c "import safetensors; print(safetensors.__version__)"pip install protobuf(当前 7.x 要求 Python >=3.10,6.x 起下限已在抬升;3.8/3.9 需 pin 对应旧版本。onnx 已自带依赖、通常无需单独装)apt install protobuf-compiler、Fedora dnf install protobuf-compiler、Arch pacman -S protobuf、macOS brew install protobufprotoc --version;python3 -c "import google.protobuf; print(google.protobuf.__version__)"按顺序执行,每步产物(模型哈希/结构摘要/权重清单)存档 sha256 + 路径([[re-ioc]] 证据链)。
模型格式识别(onnx / safetensors / pytorch pkl / tflite):
file model.bin && sha256sum model.bin > model.sha256 && xxd model.bin | head -20x08 + 变长值;值随 ONNX 版本递增:IR 8 对应 ONNX 1.10,当前发布已到 IR 13——所以第二个字节不是常量 08,不能拿 08 08 12 当识别特征);producer_name(tag 0x12,长度前缀)按规范只 SHOULD 出现,不保证紧跟其后;onnx.checker.check_model 可验证合法性struct.unpack("<Q", data[:8])),随后是 JSON 头(张量名/形状/dtype/偏移)file 显示 Zip archive(PK\x03\x04 头)——unzip -l model.pt 看条目(state_dict 含 data.pkl;torch.jit.script 含 data.pkl/constants.pkl/bytecode.pkl);老式纯 pkl 是裸 pickle 流(无 PK 头)——不直接 load,先 xxd/strings 粗看(坑 2)TFL3(对应 schema 的 __model_identifier 字段),xxd/strings 可见;结构解析可用 Netron(支持 .tflite 可视化),权重提取分支思路同 onnx(flatbuffers 解析,超出本技能深度时标注"结构化 dump 为准")结构解析(图/层/算子):
netron model.onnx --no-browser # 可视化(有图形界面再开浏览器)
python3 - <<'PY'
import onnx
m = onnx.load("model.onnx")
print("producer:", m.producer_name, m.producer_version) # 框架/优化器指纹(见坑 3)
g = m.graph
print("inputs:", [(i.name, [d.dim_value for d in i.type.tensor_type.shape.dim]) for i in g.input])
print("nodes:", len(g.node), "initializers:", len(g.initializer), "outputs:", [o.name for o in g.output])
for n in g.node[:20]:
print(n.op_type, n.name, list(n.input), "->", list(n.output))
PYtorch.jit.load 得 ScriptModule 可打印 model.graph(TorchScript 结构);torch.load 的 state_dict 只有张量没有网络结构——结构在训练/推理脚本里,需配合源码还原(见跨域 [[re-script-deob]])权重提取(张量 dump):
mkdir -p weights
# ONNX:逐 tensor 惰性落地(大模型见坑 1)
# 注意:这不是"流式"——to_array() 对使用 external data 的 tensor 会先把该张量【完整】读进 ndarray,
# 只是"一次一个张量"而不是"一次整个模型";显存/内存峰值取决于最大的那个张量
python3 - <<'PY'
import onnx, numpy as np
m = onnx.load("model.onnx", load_external_data=False) # 只载图结构,不载外部权重
for init in m.graph.initializer:
# base_dir 默认为空字符串——外部权重不在 CWD 时必须显式指定其所在目录
arr = onnx.numpy_helper.to_array(init, base_dir=".") # 该张量在此处被完整 materialize
np.save(f"weights/{init.name.replace('/', '_')}.npy", arr)
print(init.name, arr.shape, arr.dtype)
del arr # 及时释放,为下一张量让出内存
PY
# Safetensors:惰性按张量读取(不整载内存)
python3 - <<'PY'
from safetensors import safe_open
with safe_open("model.safetensors", framework="numpy") as f:
print(len(f.keys()), "tensors")
for k in list(f.keys())[:10]:
t = f.get_tensor(k); print(k, t.shape, t.dtype)
PY
# PyTorch state_dict(weights_only 安全加载,见坑 2)
python3 - <<'PY'
import torch
sd = torch.load("model.pth", weights_only=True)
for k, v in list(sd.items())[:10]:
print(k, tuple(v.shape) if hasattr(v, "shape") else type(v))
PY模型水印/指纹检测(嵌入权重):
模型窃取判定(架构相似度):
python3 - <<'PY'
import onnx
from difflib import SequenceMatcher
m1 = onnx.load("suspect.onnx"); m2 = onnx.load("original.onnx")
s1 = [n.op_type for n in m1.graph.node]; s2 = [n.op_type for n in m2.graph.node]
print("op-seq similarity:", SequenceMatcher(None, s1, s2).ratio()) # 算子序列相似度
# 层对齐后逐层权重余弦/L2 距离:见步骤 4 的每层距离矩阵
PYm.metadata_props(ONNX metadata 藏字符串/代码)、zip 条目中多余文件(坑 2 相关)、权重中形状/数值分布特异的异常张量onnx.load/torch.load 吃满内存卡死,netron 打开超时,np.save 批量写盘满;原因——权重数 GB,一次性整体加载到内存;对策——分析前先 du -sh/sha256sum 存档;ONNX 用 onnx.load(..., load_external_data=False) 只载图结构,再逐 tensor 取值——注意 numpy_helper.to_array() 对该 tensor 是完整读出(不是流式),所以峰值取决于最大的张量,且用 external data 时要显式给 base_dir(默认空字符串,权重不在 CWD 时直接失败);Safetensors 用 safe_open 惰性按张量读;PyTorch 大模型 torch.load(..., mmap=True);处理对象是"结构摘要 + 定向张量",不是整个文件AttributeError/ModuleNotFoundError;原因——pickle 协议可注入任意代码(__reduce__/__setstate__),torch.load 底层就是 pickle,恶意模型是投毒载荷载体;对策——安全提示:未知模型绝不直接 torch.load;先 unzip -l/xxd/strings 粗查(zip 头 PK vs 裸 pickle、条目有无可疑模块名),用 weights_only=True(PyTorch 2.6+ 默认)加载,需要全功能加载时在隔离环境([[re-sandbox]])执行;可转 safetensors 的样本直接转(纯数据无代码执行)m.producer_name/m.producer_version 识别优化器与版本(融合 ConvBN 的特征:BN 层消失且 scale 并入 conv 权重);架构比较前先规范化算子序列(按算子类别抽象,忽略名字与常量差异);可用 onnx-simplifier/onnxruntime graph_optimization_level 对比优化前后 diff 还原原始层© dslsdzc, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/re-ai-model of dslsdzc/rev-skills.
Open the folder on GitHubat commit bd21db8
Re AI Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Re AI Model this skilldslsdzc/rev-skills | 130 | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Technology Selectiondotnet/skills | 5.6k | 1 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Local Asrysyecust/lecture-to-notes | 273 | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Formattingbrendanhasz/probflow | 175 | — | ~381 | Automated safety check: Pass | MIT | |
| Migrate Workflow Ec2 To Osdcpytorch/test-infra | 113 | — | ~2k | Automated safety check: Pass | Custom licence | |
| Embedded AI Deploymentmatlab/agent-skills-playground | 183 | — | ~3.4k | Automated safety check: Pass | Custom licence |
dotnet/skills
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework (MAF), GitHub Copilot SDK, ONNX…
ysyecust/lecture-to-notes
把本地长视频/音频转写成文字稿 + 可选字幕,纯本地(不上传云端),用 sherpa-onnx X-ASR Zipformer transducer 模型(int8 量化、中英双语、自动标点)。已在 macOS Apple Silicon(int8 + AMX,~100× 实时)、Linux ARM64(CPU,~32× 实时)与 Windows(PowerShell…
brendanhasz/probflow
Ensure consistent code formatting using the uv package manager and pre-commit.
pytorch/test-infra
Step-by-step playbook for migrating a pytorch/pytorch .github/workflows/.yml from EC2 to OSDC (ARC) runners — covers both dial-up and 100% opt-in patterns, with the inputs that must be plumbed…
matlab/agent-skills-playground
Deploy AI models to embedded hardware using MathWorks tools (MATLAB, Simulink, Embedded Coder).
Orchestra-Research/AI-Research-SKILLs
Scales PyTorch, TensorFlow and Hugging Face training from a single GPU to multi-node clusters with Ray Train, including Ray Tune sweeps and checkpoint recovery.
dslsdzc/rev-skills
Captures an analyzable sample from a live system when the target leaves no file on disk, by finding abnormal executable memory and the execution context that reached it.
dslsdzc/rev-skills
Guides static analysis of an Android APK with jadx and apktool: reading the manifest, Java code, resources and permissions, and recognizing hardening or obfuscation.
dslsdzc/rev-skills
威胁归因方法论:钻石模型、基础设施图谱、置信度分级与归因报告. An agent skill from dslsdzc/rev-skills.
dslsdzc/rev-skills
ELF 格式解析:ehdr/phdr/shdr、GOT/PLT、initarray、符号恢复. An agent skill from dslsdzc/rev-skills.
dslsdzc/rev-skills
函数式语言运行时逆向(Haskell/OCaml):闭包/堆对象模型、调用约定、数据流优先策略. An agent skill from dslsdzc/rev-skills.
dslsdzc/rev-skills
Frida 动态插桩(桌面+移动统一). An agent skill from dslsdzc/rev-skills.
Categories
AI 模型文件逆向与静态分析:ONNX/PyTorch/Safetensors/TFLite 格式解析、 网络结构还原、权重提取、文件级水印分析(权重 pattern/metadata/tensor hash/embedding 异常)。. Re AI Model is an agent skill from dslsdzc/rev-skills.
Re AI Model fits situations like: tasks that involve Deep learning; tasks that involve Embeddings.
Run `npx skills add dslsdzc/rev-skills --skill re-ai-model -a claude-code`. Or copy the skill folder (.claude/skills/re-ai-model in dslsdzc/rev-skills) into .claude/skills/re-ai-model in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dslsdzc/rev-skills --skill re-ai-model -a codex`. Or copy the skill folder (.claude/skills/re-ai-model in dslsdzc/rev-skills) into .agents/skills/re-ai-model in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dslsdzc/rev-skills --skill re-ai-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/re-ai-model, .gemini/skills/re-ai-model, .github/skills/re-ai-model and .opencode/skills/re-ai-model in your project.
Going by SKILL.md and its folder, Re AI Model needs the command-line tools its instructions call (python3, pip, brew, apt, dnf and choco). Our summary lists: Python 3.
SKILL.md names 1 domain. In commands or code: download.pytorch.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Re AI Model is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Re AI Model: Technology Selection (dotnet/skills, 5.6k stars), Local Asr (ysyecust/lecture-to-notes, 273 stars), Formatting (brendanhasz/probflow, 175 stars) and Migrate Workflow Ec2 To Osdc (pytorch/test-infra, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dslsdzc (a GitHub user) maintains it in dslsdzc/rev-skills, which has 130 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 5, 2026.
Source: dslsdzc/rev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.