Opptrix: Instructions file for Codex

AGENTS.md

Opptrix AGENTS.md is an instructions file for Codex, OpenCode from Travisun/Opptrix. It costs 5,262 tokens per session, scanned A, original, Apache-2.0.

A set of project rules for coding agents working on the Opptrix codebase. It tells the agent how to understand requests, inspect the repository, plan architecture changes, and keep changes compatible.

In plain words
What is it for?
It helps with requirement checks, architecture planning, code exploration, API and schema changes, documentation updates, and cross-platform development.
Why use it?
It gives the agent consistent working rules before it edits code, reducing accidental rewrites, incompatible data changes, and platform-specific fixes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents.

This is Travisun/Opptrix's own configuration. It tells Codex and OpenCode how to work on Opptrix itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Opptrix configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Travisun/Opptrix/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Travisun/Opptrix

Made for: Codex, OpenCode.

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 Opptrix AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/travisun/opptrix/agents-md/github.svg)](https://agentmods.dev/instructions/travisun/opptrix/agents-md)
Your own site
<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.

agentmods 80×15 button for Opptrix AGENTS.md

Your own site · 80×15
<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>
Per session 5,262 This file is loaded in full into every session.
When invoked 5,262 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.05262 $0.05262
Opus 5.5 $0.02105 $0.02105
Sonnet 5.5 $0.01052 $0.01052
Haiku 4.5 $0.00526 $0.00526

Measured 1mo ago against content hash 1772385c91f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 304 lines

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 方案并经用户选定后才写码。


核心信条

  1. 先规则计划,再动手(Cursor:见 rules-index.mdc;MiMoCode:见对应 skill)
  2. 编码类先架构门禁:a–n 简报 + ≥3 方案,用户选定后再改码(Cursor:task-architecture-gate.mdc)
  3. 先理解,再动手:重要修改前必须向用户提问确认需求
  4. 先探索,再修改:CodeGraph 定位后才能改代码
  5. 代码即文档,文档即代码:架构/API/调用方式变更后必须同步文档
  6. 增量改动:按用户最新指示做最小 diff;不顺手重构
  7. 禁止断代:schema、用户数据、Hub/API 变更须兼容 + 幂等迁移
  8. 禁止半成品:新功能须技术/用户/产品三维完备,兼容现有架构与安全;交付前复审回炉直至达标(见 R11)
  9. 服务器 / 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 "<问题或符号>"

Read the full file on GitHub · 304 lines

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. 1mo ago Changed · +1 lines · +165 tokens per session 1772385c91f7
  2. 2mo ago Changed · +1 lines · +267 tokens per session 7a62414c1f99
  3. 2mo ago Changed · +3 lines · +305 tokens per session f5abc66f75ee
  4. 2mo ago Changed · -4 lines · -137 tokens per session af080146c9b7
  5. 2mo ago Changed · +3 lines · +101 tokens per session 52a5dd580d87
  6. 2mo ago First seen · 300 lines · 4,561 tokens per session scan A ed13d6a233c7

Subscribe to this mod's changes

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.

Related

Opptrix AGENTS.md compared with instructions from other repositories

Opptrix AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Opptrix AGENTS.mdTravisun/OpptrixInstructions file2751mo agoApache-2.0A5,262Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode