executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
re-ai-triageAI 模型分析第一入口(分流器):识别输入形态——模型文件走文件层逆向(re-ai-model)、 仅有 API 走行为层评估(re-ai-attack)、恶意行为走恶意分析。 触发词:AI模型分析、AI模型安全、模型文件、模型泄露、模型逆向、模型分析入口。
Independent GitHub snapshot · Automated classification · Original documentation governs
拿到 AI 相关目标后先判输入形态,命中即转对应技能:
| 输入形态 | 路径 |
|---|---|
| 拿到模型文件(.onnx / .pt / .pth / .safetensors / .tflite) | → [[re-ai-model]](文件层:格式解析 / 结构还原 / 权重提取 / 文件级水印) |
| 只有 API(无文件,黑盒接口) | → [[re-ai-attack]](行为层:extraction / fingerprint / privacy / robustness 评估;guard 授权前置) |
| 文件 + API 都有 | → 先 [[re-ai-model]](文件侧取证)→ 再 [[re-ai-attack]](行为侧验证) |
| 发现恶意行为(投毒 / 后门 / 恶意载荷 / 下载执行) | → 恶意分析(当前:[[re-ai-model]] 安全边界处理 + [[re-behavior]];未来独立 re-ai-malware 承接) |
| 模型被打包进可执行(PyInstaller/pyarmor 等) | → 先 [[re-binary-core]] 拆包 → 拆出的模型文件回本技能分流 |
本技能只做识别与分流,工具轻量:
file:Linux apt install file / dnf install file / pacman -S file(多数预装);验证 file --versionpython3 -c "import struct"(标准库)pip list 2>/dev/null | grep -iE 'torch|tensorflow|onnx'——确认本机可解析目标格式;缺失时由下游技能引导安装file <path> + xxd <path> | head -2 粗看,再转 [[re-ai-model]]。几种形态的可靠信号(都以字节为准,不靠扩展名;细节见 [[re-ai-model]] 步骤 1):
file 报 data;首字节是 ir_version 的 tag 0x08,第二个字节是版本号、随 ONNX 版本递增(不是常量 08);producer_name 按规范只 SHOULD 出现file 报 data——前 8 字节是小端头长度,其后才是 JSON 头(xxd -l 16 可见长度段与 {)file 报 Zip archive(PK\x03\x04 头),unzip -l 可见 data.pkl 等条目;老式是裸 pickle 流(无 PK 头,file 常误报 XENIX 8086 relocatable or i286 small model)——不直接 load,见 [[re-ai-model]] 坑 2file 报 data;字节 4–7 是文件标识符 ASCII TFL3RE_AUTH)RE_GOAL、RE_AUTH、输入形态标记),不在本技能做深度分析.pt 可能是 pickle 也可能是 zip 容器(torch 新格式)、.bin 可能是任意权重 dump——以 file 输出与魔数为准,不靠扩展名RE_AUTH,未知归属时先询问,不直接进入行为层