ast-deobfuscation

ast-deobfuscation is a skill for Codex from guccig4366/xbsReverseSkill. It costs 146 tokens per session (1,058 once invoked), scanned A, a copy of ast-deobfuscation, MIT.

A workflow for simplifying deliberately hard-to-read JavaScript by analyzing its abstract syntax tree, the structured representation of source code. It targets patterns such as encoded strings, fake branches, and rearranged control flow.

In plain words
What is it for?
Detecting obfuscation patterns, decoding string tables, simplifying dispatchers, and restoring normal control flow. It can run staged pipelines and compare the result with a reference output.
Why use it?
It helps turn obfuscated JavaScript into code that can be inspected and analyzed while limiting changes to patterns that are understood. It also supports separate handling for site-specific patterns.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Detecting obfuscation patterns, decoding string tables, simplifying dispatchers, and restoring normal control flow. It can run staged pipelines and compare the result with a reference output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guccig4366/xbsreverseskill/ast-deobfuscation
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 guccig4366/xbsReverseSkill --skill ast-deobfuscation
Clone the repo
git clone --depth 1 https://github.com/guccig4366/xbsReverseSkill

Made for: Codex.

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 ast-deobfuscation

README.md
[![agentmods](https://agentmods.dev/badge/skills/guccig4366/xbsreverseskill/ast-deobfuscation.svg)](https://agentmods.dev/skills/guccig4366/xbsreverseskill/ast-deobfuscation)
Your own site
<a href="https://agentmods.dev/skills/guccig4366/xbsreverseskill/ast-deobfuscation"><img src="https://agentmods.dev/badge/skills/guccig4366/xbsreverseskill/ast-deobfuscation.svg" alt="Measured on agentmods" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,058 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.
Origin 100% copy Near-identical to another mod 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.00146 $0.01058
Opus 5 $0.00073 $0.00529
Sonnet 5 $0.00029 $0.00212
Haiku 4.5 $0.00015 $0.00106

Measured 8d ago against content hash 400141d1d12e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ast-deobfuscation 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 8d ago.

The scan reads SKILL.md. This mod also ships 22 executable files (scripts/collect-residue-metrics.js, scripts/compare-with-reference.js, scripts/detect-patterns.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to ast-deobfuscation — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

ast-deobfuscation/SKILL.md · 58 lines

What it actually says

AST 反混淆

优先使用分层入口,而不是继续把站点特有逻辑堆进通用脚本。

工作流

  1. 先运行 scripts/detect-patterns.js <input.js> [hint] 做模式检测。
  2. 只读取命中的站点或混淆家族规则文档。
  3. 运行 scripts/run-pipeline.js <input.js> <output-dir> [hint] 执行选中的流水线。
  4. 对照参考产物或原始混淆症状,判断是否还需要新增专用适配脚本。

设计规则

  • 通用脚本只保留低风险、可复用的改写,例如结构标准化、虚假分支清理、dispatcher 内联、控制流拍平和 if -> switch
  • 一旦某个模式明显是站点特有的,就同时补齐四部分:规则文档、检测器命中项、专用适配脚本、流水线配置项。
  • 对于高开销步骤,优先按家族跳过或重排,不要强行要求所有样本走同一套顺序。像 reese84 这种大样本,如果太晚执行 inline-literals,很容易卡住。
  • 专用适配脚本应当保持窄而准。如果某条规则没有在多个无关样本中复用,不要急着回灌到通用脚本。
  • 结构性改写后要重新 parse,并保证每一阶段都可以独立运行和排查。

入口脚本

  • scripts/detect-patterns.js 根据文件路径、可选 hint 和源码症状判断最可能命中的站点或混淆家族。
  • scripts/run-pipeline.js 把样本复制到测试目录,执行选中的步骤,记录耗时并输出流水线报告。
  • scripts/collect-residue-metrics.js 统计仍未解开的症状,例如 split('|')、直接 loop/switch 平坦化、opcode if 链、dispatcher wrapper 和 _0x 标识符。
  • scripts/compare-with-reference.js 将最新流水线输出与 decode.js 对比,汇总剩余差距。

参考文档

  • 新增或调整适配器时,先读 references/pattern-layering.md
  • 任何逻辑想放进通用脚本前,先读 references/safe-rewrite-rules.md
  • 处理字符串表、解码 stub、最小运行时求值时,读 references/string-array-and-minimal-eval.md
  • 处理控制流平坦化、opcode 分发器和 VM 类 handler 时,读 references/control-flow-and-opcode-patterns.md
  • 处理逗号表达式、IIFE、语句提升时,读 references/sequence-normalization.md
  • 检测器命中后,只读取对应的一份站点规则文档:
    • references/patterns/reese84.md
    • references/patterns/dingxiang.md
    • references/patterns/geetest4.md
    • references/patterns/tonghuashun.md
    • references/patterns/yidun.md
    • references/patterns/xiaohongshu.md
    • references/patterns/cn-bidding-ob.md
    • references/patterns/mps-ob.md

校验

  • 每个新增或改过的 JavaScript 辅助脚本,在接入流水线前都要至少过一次 node --check 或等价的加载校验。
  • 修改 skill 后,运行 C:\Users\25198\.codex\skills\.system\skill-creator\scripts\quick_validate.py C:\Users\25198\.codex\skills\ast-deobfuscation
  • 测试案例时,把中间产物、检测结果、对比结果和流水线耗时都保留在案例目录里,方便定位慢步骤和失败步骤。
Files

What ships with it

37 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 58 lines · 146 tokens per session scan A 400141d1d12e

Subscribe to this mod's changes

ast-deobfuscation is a skill published in the GitHub repository guccig4366/xbsReverseSkill (5 stars, last pushed yesterday), licensed MIT. It adds 146 tokens to every session and 1,058 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to ast-deobfuscation, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

debug-task

Diagnose and fix moon tasks that are broken, misconfigured, or behaving unexpectedly. Use this skill when a moon task is failing, not running, skipped, hanging, producing stale or wrong output, cached when it shouldn't be, re-running every time when it should be cached, or when outputs are empty or missing after a…

moonrepo/moon · 231 tokens

Multi-Language Project Analysis with PMAT

Analyzes polyglot codebases with multiple programming languages using PMAT (Pragmatic AI Labs MCP Agent Toolkit). Use this skill when: Working with projects containing multiple programming languages Assessing cross-language integration patterns and quality Understanding language distribution and architectural…

paiml/paiml-mcp-agent-toolkit · 147 tokens

cpp

Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…

crazyguitar/cppcheatsheet · 0 tokens

cpp

Use when writing, reviewing, modernizing, building, or debugging C++ - RAII and resource lifetime, smart-pointer ownership, move semantics and the Rule of Zero/Five, target-based CMake with FetchContent, and killing undefined behavior with ASan/UBSan/TSan plus clang-tidy. NOT borrow-checker / Result-Option / cargo…

ericrisco/rsc-harness · 81 tokens

art-of-debugging

Systematic methodology and concrete tool recipes for debugging Unix, Python, and PyTorch programs - crashes, hangs, segfaults, wrong output, CUDA OOM, NaN/Inf, slowness, and multi-node/multi-GPU issues. Use when a program crashes, hangs, deadlocks, segfaults, runs out of memory (OOM), produces NaN/Inf or wrong…

stas00/the-art-of-debugging · 193 tokens

blender-dev

Blender add-on development diagnostics, reloads, UI metadata, and environment checks.

dcc-mcp/dcc-mcp-blender · 20 tokens