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.
npx skills add zhizhuodemao/ai-reverse-toolkit --skill ast-deobfuscategit clone --depth 1 https://github.com/zhizhuodemao/ai-reverse-toolkitWrote 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.
[](https://agentmods.dev/skills/zhizhuodemao/ai-reverse-toolkit/ast-deobfuscate)<a href="https://agentmods.dev/skills/zhizhuodemao/ai-reverse-toolkit/ast-deobfuscate"><img src="https://agentmods.dev/badge/skills/zhizhuodemao/ai-reverse-toolkit/ast-deobfuscate/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.
<a href="https://agentmods.dev/skills/zhizhuodemao/ai-reverse-toolkit/ast-deobfuscate"><img src="https://agentmods.dev/badge/skills/zhizhuodemao/ai-reverse-toolkit/ast-deobfuscate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.06096 |
| Opus 5.5 | $0.00013 | $0.02438 |
| Sonnet 5.5 | $0.00007 | $0.01219 |
| Haiku 4.5 | $0.00003 | $0.00610 |
Grade A, and why
ast-deobfuscate 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 565 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ast-deobfuscate
对 $ARGUMENTS 执行 AST 解混淆,最大化还原可读代码。
工具链: @babel/parser + @babel/traverse + @babel/generator + @babel/types
工作目录约定
project/
├── source/
│ └── original/ # 原始混淆文件(只读,不修改)
│ └── target.js
├── scripts/ # 解混淆脚本(每步一个,一次性,针对目标定制)
│ ├── step1_string_decrypt.js
│ ├── step2_expr_simplify.js
│ └── ...
├── intermediate/ # 中间产物(每步输出,可回退)
│ ├── target_step0.js # 格式化 + 去反调试
│ ├── target_step1.js # 字符串解密后
│ ├── target_step2.js # 表达式简化后
│ └── ...
└── source/
└── deobfuscated/ # 最终输出
└── target_deobf.js
原则: 每个步骤读取上一步的中间文件,输出新的中间文件。出错时可从任意中间文件重新开始。
环境初始化
解混淆脚本基于 Babel 工具链运行在 Node.js 中。首次执行前检查并安装依赖:
# 在项目根目录检查 package.json,没有则初始化
npm init -y
npm install @babel/parser @babel/traverse @babel/generator @babel/types
# 如需格式化
npm install prettier
执行策略
整体原则
本 skill 是百科全书,不是固定流水线。执行者根据实际代码灵活选择步骤:
- 进入计划模式: 先完成 Step 0 分析,然后进入计划模式,向用户展示分析结果和建议的步骤组合,获得确认后再执行
- 按需跳步: 没有字符串数组就跳过 Step 1,没有控制流平坦化就跳过 Step 4
- 随时调整: 任何步骤执行后发现新情况,都可以回退或插入额外步骤
- MCP 用于分析和验证: js-reverse MCP 用于获取源码、搜索特征、小规模验证方案可行性;大批量转换和验证通过 Node.js 脚本执行
MCP 使用时机
MCP 的定位是分析工具和验证探针,不是批量执行引擎。
| 阶段 | MCP 用法 |
|---|---|
| 分析阶段 | search_in_sources 搜索混淆特征;get_script_source 获取目标脚本 |
| 方案验证 | evaluate_script 执行几个解密调用,确认方案可行后再写批量脚本 |
| 中间验证 | evaluate_script 抽样对比解混淆前后的函数输出 |
| 控制流分析 | set_breakpoint + step_over 动态跟踪 switch-case 执行顺序 |
| 最终验证 | 在浏览器中用解混淆后的代码替换原始代码,验证功能正常 |
大批量字符串解密、表达式简化、死代码移除等转换工作,全部通过 Node.js 脚本 + Babel AST 完成。
Subagent 并行策略
可并行的任务组合:
- Step 0 中:特征识别 + 反调试代码搜索
- Step 2 中:Proxy 函数识别 + 对象字典识别(互不依赖)
- 验证阶段:多组测试数据可并行验证
技术手册
以下是各类解混淆技术的详细参考。根据 Step 0 的分析结果,选择需要的章节执行。
Step 0: 预分析与特征识别
目标: 了解混淆类型和程度,为后续步骤提供参考(非硬性路由)。
0.1 获取源码
本地文件: 直接读取 $ARGUMENTS
URL: 下载后保存到 source/original/
浏览器中(代码尚未下载到本地):
- 用 MCP list_scripts → get_script_source 获取
- 可用 search_in_sources 做关键词快速扫描:
"_0x" → 确认混淆前缀 "debugger" → 定位反调试
"push" + "shift" → 旋转 IIFE "split('|')" → 控制流平坦化
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.
- 2mo ago First seen · 565 lines · 0 tokens per session scan A af0453bfa27b
ast-deobfuscate is a skill published in the GitHub repository zhizhuodemao/ai-reverse-toolkit (472 stars, last pushed 7mo ago), licensed MIT. It adds 33 tokens to every session and 6,096 once invoked, about $0.0001 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.
ast-deobfuscate compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ast-deobfuscatezhizhuodemao/ai-reverse-toolkit | Skill | 472 | 7mo ago | MIT | A | 33 | Claude Code |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | yesterday | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | 3d ago | MIT | A | 71 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 319 | yesterday | Apache-2.0 | A | 112 | Claude Code |
| ci-fixersipyourdrink-ltd/bernstein | Skill | 1.2k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |
| incident-response-incident-responsermyndharis/antigravity-skills | Skill | 1.9k | 23d ago | MIT | A | 36 | Claude Code |
| triaging-web-analytics-supportPostHog/posthog | Skill | 41k | yesterday | none | A | 151 | Claude Code, Codex |