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 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/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/env-patch"><img src="https://agentmods.dev/badge/skills/zhizhuodemao/ai-reverse-toolkit/env-patch.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.00141 | $0.02280 |
| Opus 5.5 | $0.00056 | $0.00912 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (471 stars, last pushed 7mo ago), licensed MIT. It adds 141 tokens to every session and 2,280 once invoked, about $0.0006 per session on Opus 5.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
x402
Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…
derive-client
Reverse-engineer a website's internal API by recording browser traffic into a HAR file, then generate a standalone client or CLI that calls the endpoints directly, with no browser needed after the first recording. Use when asked to "derive a client", "build a CLI for ", "reverse engineer this site's API", "record…
har-derived-api-client
Record a site's XHR into a HAR, derive an HTTP client.
cloud
Documentation reference for using Browser Use Cloud — the hosted API and SDK for browser automation. Use this skill whenever the user needs help with the Cloud REST API (v2, v3, or v4), browser-use-sdk (Python or TypeScript), X-Browser-Use-API-Key authentication, cloud sessions, browser profiles, profile sync, CDP…
sync-new-data-type
Adds scaffolding for a new Sync data type in Chromium across protocol buffers, DataType definitions, feature flags, controller builders, unit tests, and metrics.
browserwing-executor
Control browser automation through HTTP API. Supports page navigation, element interaction (click, type, select), data extraction, accessibility snapshot analysis, screenshot, JavaScript execution, and batch operations.