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 agentmods add skills/zhizhuodemao/ai-reverse-toolkit/env-patchnpx skills add zhizhuodemao/ai-reverse-toolkit --skill env-patchgit 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/env-patch)<a href="https://agentmods.dev/skills/zhizhuodemao/ai-reverse-toolkit/env-patch"><img src="https://agentmods.dev/badge/skills/zhizhuodemao/ai-reverse-toolkit/env-patch.svg" alt="Measured on agentmods" 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.00141 | $0.02280 |
| Opus 5 | $0.00071 | $0.01140 |
| Sonnet 5 | $0.00028 | $0.00456 |
| Haiku 4.5 | $0.00014 | $0.00228 |
Grade A, and why
env-patch scanned grade A with 1 finding 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 6d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| 运行时动态加载 | curl 下载到 `source/`,复制到 `env/` | `references/dynamic-loading.md` | How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
env-patch
对 $ARGUMENTS 执行补环境方案。
前置条件:已知加密入口(模块 ID、函数名、所在脚本)。如未定位,先用 /find-crypto-entry。
核心概念
env_core.js是引擎:提供工具函数(setFuncNative/setObjNative/getNativeProto/wrapFunc/monitor/createProxy)和诊断报告。引擎不含任何环境存根,复制后不再修改。run.js是策略:所有环境存根、补丁、加载逻辑都写在 run.js 中。每轮诊断后只改 run.js。browser-stubs.md是参考目录:按诊断报告中出现的 UNDEFINED/ERRORS 按需取用存根代码。
铁律
- 禁止修改原始 JS —
source/下文件只读。env/下的 JS 副本(main.js / sdk.js / bytecode.js)一旦生成即为定稿,不再修改。所有补丁写在 run.js / sign.js 中。 - 必须 require env_core.js — 禁止在 run.js 中重写 setFuncNative / setObjNative / createProxy 等工具函数。所有工具通过
const env = require('./env_core')引入,然后调用env.setFuncNative()/env.createProxy()等。env_core.js 复制后不再修改。如果需要额外 helper,写在 run.js 顶部,但不得重复实现 env_core 已有的功能。 - 先分析 VMP 入口参数 — VMP 入口的依赖数组决定补环境边界。
typeof chrome !== "undefined" ? chrome : undefined检查的是globalThis,不是window。必须用Object.defineProperty(global, name, ...)同步。 - 加载顺序是致命的 — VMP 在
require()的瞬间初始化并读取环境,之后不可更改。run.js 中的代码必须严格按以下顺序:const env = require('./env_core')— 获取工具(第一行)- 构建存根对象(document / navigator / location 等)
env.init({ window, document, navigator, location })— 阻断 Node 泄露 + 挂载全局- 额外环境补齐 — performance、chrome 等全局同步
require('./main.js')— 加载目标 JS- 测试签名
- 格式验证优先于请求验证 — 签名长度/前缀与浏览器不一致 = 降级,即使 HTTP 200 也是假阳性。
模板
| 文件 | 用途 |
|---|---|
${CLAUDE_SKILL_DIR}/scripts/env_core.js |
工具集 + Proxy 引擎 + 诊断报告 |
${CLAUDE_SKILL_DIR}/scripts/webpack_runtime.js |
最小 webpack runtime |
复制到项目 env/ 后,env_core.js 不再修改。
执行流程
Step 1: 搭建项目结构
<project>/
├── source/ # 原始 JS(下载,不修改)
├── env/ # 运行环境
│ ├── env_core.js # 从模板复制,不改
│ ├── main.js # 目标 JS 副本(或 sdk.js + bytecode.js)
│ ├── run.js # 加载器 + 环境存根 + 测试
│ └── sign.js # 签名接口(最后封装)
├── python/ # 验证脚本
└── docs/progress.md
判断场景(按需读取 reference):
| 场景 | JS 文件 | 参考文档 |
|---|---|---|
| 单文件 SDK | 复制到 env/main.js |
— |
| SDK + 字节码分离 | env/sdk.js + env/bytecode.js |
references/multi-file.md |
| webpack bundle | 提取模块到 env/main.js |
references/webpack.md |
| 运行时动态加载 | curl 下载到 source/,复制到 env/ |
references/dynamic-loading.md |
What ships with it
10 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.
- references/anti-debug.md 6.3 KB
- references/browser-stubs.md 21 KB
- references/dynamic-loading.md 2.7 KB
- references/limitations.md 3.0 KB
- references/multi-file.md 2.6 KB
- references/node-detection.md 3.3 KB
- references/storage-tracing.md 3.0 KB
- references/webpack.md 2.1 KB
- scripts/env_core.js 19 KB runs code
- scripts/webpack_runtime.js 4.3 KB runs code
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.
- 6d ago First seen · 185 lines · 141 tokens per session scan A d98bf5f1f0f5
env-patch is a skill published in the GitHub repository zhizhuodemao/ai-reverse-toolkit (434 stars, last pushed 5mo ago), licensed MIT. It adds 141 tokens to every session and 2,280 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
v8-jit
V8 JIT optimization patterns for writing high-performance JavaScript in Next.js server internals. Use when writing or reviewing hot-path code in app-render, stream-utils, routing, caching, or any per-request code path. Covers hidden classes / shapes, monomorphic call sites, inline caches, megamorphic deopt, closure…
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
interactive-login
How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.