Borrowing it
Nothing to install: this file belongs to Travisun/Opptrix. 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/Travisun/Opptrix/main/AGENTS.mdgit clone --depth 1 https://github.com/Travisun/OpptrixWrote 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/travisun/opptrix/agents-md)<a href="https://agentmods.dev/instructions/travisun/opptrix/agents-md"><img src="https://agentmods.dev/badge/instructions/travisun/opptrix/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/travisun/opptrix/agents-md"><img src="https://agentmods.dev/badge/instructions/travisun/opptrix/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.05262 | $0.05262 |
| Opus 5.5 | $0.02105 | $0.02105 |
| Sonnet 5.5 | $0.01052 | $0.01052 |
| Haiku 4.5 | $0.00526 | $0.00526 |
Grade A, and why
Opptrix 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 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.
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 — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Opptrix — Agent 工程规则
本文件由 MiMoCode 自动注入 system instructions,每次会话生效。 细则按场景在
~/.projects-rules/Opptrix/.mimocode/skills/(动手前 Read 对应 skill);仓库内仅.mimocode/index.mdc索引。.cursor/rules/*.mdc完整版在~/.projects-rules/Opptrix/.cursor/rules/;仓库内仅rules-index.mdc+index.mdc指引。 Cursor 渐进式规则:仅.cursor/rules/rules-index.mdc(L0)常驻;L1/L2 须 Read 本地~/.projects-rules/Opptrix/.cursor/rules/。每任务须先输出「规则加载计划」。 编码门禁:Read 本地task-architecture-gate.mdc,完成 a–n 架构简报与 ≥3 方案并经用户选定后才写码。
核心信条
- 先规则计划,再动手(Cursor:见
rules-index.mdc;MiMoCode:见对应 skill) - 编码类先架构门禁:a–n 简报 + ≥3 方案,用户选定后再改码(Cursor:
task-architecture-gate.mdc) - 先理解,再动手:重要修改前必须向用户提问确认需求
- 先探索,再修改:CodeGraph 定位后才能改代码
- 代码即文档,文档即代码:架构/API/调用方式变更后必须同步文档
- 增量改动:按用户最新指示做最小 diff;不顺手重构
- 禁止断代:schema、用户数据、Hub/API 变更须兼容 + 幂等迁移
- 禁止半成品:新功能须技术/用户/产品三维完备,兼容现有架构与安全;交付前复审回炉直至达标(见 R11)
- 服务器 / Docker 优先:自托管 Linux 容器为主交付路径;大体积通用二进制走镜像 OS 层(见
docs/SELFHOST-RUNTIME-DEPS.md),不再为 Electron sidecar 捆绑做新功能兼容(R12 已收窄)
产品路径(2026 · 服务器优先)
| 路径 | 状态 | 依赖与安全 |
|---|---|---|
| Docker Compose 自托管 | 主路径 | Dockerfile + scripts/lib/ci-pins.env;ffmpeg/python 走 apt;原生模块 build stage 编译 |
| 裸 Node + 反向代理 | 次要 | 须自装 ffmpeg/python3;行为与 Docker 对齐 |
| Electron 桌面 | 打包已移除,桌面形态 UI 壳保留 | Electron 打包/分发已删除;client-ui/src/desktop/ 的标题栏、浮层侧栏等壳层 UI 继续服务桌面浏览器与 PWA(Web 窄窗浮层依赖 OverlaySidebarShell),由运行时检测自然旁路 |
动手前 Read:docs/SELFHOST-RUNTIME-DEPS.md — 硬依赖 vs 可抽离二进制矩阵。
硬性规则(全仓生效)
R1. 需求澄清
重要修改前必须向用户提问确认需求。
触发场景:
- 新增功能 → 确认目标、场景、边界
- 修改架构 → 确认范围、影响、方案
- 修改 API → 确认兼容性、调用方影响
- 修改 UI → 确认交互、视觉、响应式
- 修改 Provider → 确认数据源、API 限制
- 修改 Schema → 确认迁移策略、数据保留
提问模板:
## 需求确认
**目标**:{你理解的目标}
**影响范围**:
- {影响 1}
- {影响 2}
**需要澄清**:
- {问题 1}
- {问题 2}
**实现方案**:
- 方案 A:{描述}
- 方案 B:{描述}
请确认或补充。
R2. 探索再改
凡了解代码库 / 查实现 / 找符号 / 跟调用链 — 必须先 CodeGraph。
export PATH="$HOME/.local/bin:$PATH"
codegraph explore "<问题或符号>"
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 Changed · +1 lines · +165 tokens per session 1772385c91f7
- 2mo ago Changed · +1 lines · +267 tokens per session 7a62414c1f99
- 2mo ago Changed · +3 lines · +305 tokens per session f5abc66f75ee
- 2mo ago Changed · -4 lines · -137 tokens per session af080146c9b7
- 2mo ago Changed · +3 lines · +101 tokens per session 52a5dd580d87
- 2mo ago First seen · 300 lines · 4,561 tokens per session scan A ed13d6a233c7
Opptrix AGENTS.md is an instructions file published in the GitHub repository Travisun/Opptrix (275 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 5,262 tokens to every session, about $0.0210 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.
Opptrix AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Opptrix AGENTS.mdTravisun/Opptrix | Instructions file | 275 | 1mo ago | Apache-2.0 | A | 5,262 | 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 | today | 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 |