Borrowing it
Nothing to install: this file belongs to powerfullz/override-rules. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/powerfullz/override-rules/main/AGENTS.mdgit clone --depth 1 https://github.com/powerfullz/override-rulesWrote 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/instructions/powerfullz/override-rules/agents-md)<a href="https://agentmods.dev/instructions/powerfullz/override-rules/agents-md"><img src="https://agentmods.dev/badge/instructions/powerfullz/override-rules/agents-md/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/instructions/powerfullz/override-rules/agents-md"><img src="https://agentmods.dev/badge/instructions/powerfullz/override-rules/agents-md.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.04493 | $0.04493 |
| Opus 5.5 | $0.01797 | $0.01797 |
| Sonnet 5.5 | $0.00899 | $0.00899 |
| Haiku 4.5 | $0.00449 | $0.00449 |
Grade A, and why
override-rules AGENTS.md 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 yesterday.
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 — 334 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — AI Agent 与贡献者指南
本文件面向两类读者:
- 协助人类开发者修改本项目的 AI Agent;
- 第一次参与本项目的贡献者。
目标:让你快速知道改哪里、怎么验证、什么绝对不能碰。
深入阅读:
README.md:用户使用说明、URL 参数与产物获取方式docs/ARCHITECTURE.md:架构、数据流与设计决策docs/HOW_TO_CUSTOMISE.md:Fork 后的自定义指南docs/HOW_TO_CONTRIBUTE.md:面向人类贡献者的流程说明
0. 速查
npm install
# 日常修改后
npm run format
npm run lint:fix
npm test
# 生成构建产物(build + generate,不包含测试和 lint)
npm run artifacts
提交前建议跑一遍:
npm run format:check && npm run lint && npm run typecheck && npm test && npm run artifacts
1. 这是什么
本项目为 Mihomo/Clash 订阅覆写工具:读取上游订阅的代理节点,按落地/非落地、国家/地区、低倍率、Tailscale 等维度分类,再生成代理组、分流规则、DNS、TUN 等配置。
项目同时产出两种形式:
| 形式 | 入口 | 特点 |
|---|---|---|
| JS 动态覆写 | src/main.ts → convert.js / convert.min.js |
主推方式;运行时读取真实节点,支持 URL 参数 |
| 静态 YAML 覆写 | scripts/yaml_generator/generator.ts → yamls/*.yaml |
备用方式;用假节点穷举参数组合,适合不能执行 JS 的客户端 |
两种形式共享 src/catalog/ 与 src/builders/ 的逻辑,区别只在数据来源和过滤方式。详见 docs/ARCHITECTURE.md。
2. 项目规则
| 规则 | 说明 |
|---|---|
| 只改源码 | 行为修改必须落在 src/、scripts/yaml_generator/、tests/ 或文档中 |
| 不碰构建产物 | convert.js、convert.min.js、yamls/ 均由脚本生成,且已被 .gitignore 忽略。不要编辑,也不要提交 |
| 不碰发布分支 | dist、preview 由 GitHub Actions 生成,禁止向它们提交、合并或手动推送 |
| 不要合并两份 TypeScript | typescript-native(TS 7)与 typescript(TS 6)并存是刻意设计,详见第 8 节 |
| 保持文档同步 | 新增或修改 URL 参数、代理组行为、构建命令时,同步更新对应文档,详见第 9 节 |
| 发布需授权 | 版本发布仅限 powerfullz 本人或其授权的 Agent,详见第 11 节 |
3. 架构与目录
核心数据流:
$arguments
→ buildFeatureFlags() // src/args
→ analyzeNodes() // src/analysis
→ buildBaseLists() // src/builders/selectors.ts
→ buildProxyGroups() // src/builders/proxy-groups.ts
→ assembleConfig() // src/builders/config.ts
文件分为「声明式数据 / 构建逻辑 / 最终组装」三层结构:
| 路径 | 职责 |
|---|---|
src/main.ts |
JS 覆写入口;读取 $arguments、编排流程、暴露 globalThis.main |
src/args/ |
URL 参数解析;默认值的唯一来源是 schema.ts |
src/analysis/ |
节点分类:落地/非落地、国家/地区、低倍率、Tailscale |
src/builders/ |
纯构建函数:候选列表、代理组、规则、DNS、TUN、最终配置 |
src/catalog/ |
声明式数据:组名、图标、国家元数据、服务组、规则集、DNS 常量 |
src/domain/ |
代理组工厂;字段顺序与空候选兜底集中在此 |
src/types/ |
按域拆分的类型定义:args / proxy / clash |
src/utils/ |
无业务状态的通用工具函数 |
ruleset/ |
项目自维护的规则列表(如 TikTok、E-Hentai、SteamFix) |
scripts/build.mjs |
用 esbuild 打包 convert.js 与压缩版 convert.min.js |
scripts/yaml_generator/generator.ts |
用 fake_proxies.json 穷举生成 yamls/,固定启用 regex=true |
tests/ |
与 src/ 目录对应的单元测试 |
docs/ |
架构、自定义与贡献文档 |
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.
- yesterday Changed · +282 lines · +3,295 tokens per session 684633ee712d
- 17d ago Changed · +1 lines · +38 tokens per session 8ecb33004e6c
- 1mo ago Changed · +5 lines · +253 tokens per session 7468ea43e68f
- 2mo ago First seen · 46 lines · 907 tokens per session scan A 8f77ffe6c98d
override-rules AGENTS.md is an instructions file published in the GitHub repository powerfullz/override-rules (628 stars, last pushed yesterday), licensed MIT. It adds 4,493 tokens to every session, about $0.0180 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.
override-rules AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| override-rules AGENTS.mdpowerfullz/override-rules | Instructions file | 628 | yesterday | MIT | A | 4,493 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |