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 rules/travisun/opptrix/rules-indexgit clone --depth 1 https://github.com/Travisun/OpptrixWhat 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 | $0.01328 | $0.01328 |
| Opus 5 | $0.00664 | $0.00664 |
| Sonnet 5 | $0.00266 | $0.00266 |
| Haiku 4.5 | $0.00133 | $0.00133 |
Grade A, and why
rules-index 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
规则路由引擎(L0 · 唯一常驻)
完整
.mdc不在本仓库。 路径:~/.projects-rules/Opptrix/.cursor/rules/
MiMoCode skill:~/.projects-rules/Opptrix/.mimocode/skills/(见AGENTS.md)
目录索引:.cursor/rules/index.mdc、.cursor/index.mdc
前置条件(硬性 · 每任务第一步)
收到任务后、调用工具或改代码之前,须先输出简短 规则加载计划:
规则加载计划
- 任务类型:问答 | 探索 | 小改 | 功能 | 发版 | Git | 审查
- 将加载:{规则文件名}(L1 路径自动 | L2 Agent 拉取 | L2 Read 手动)
- 豁免:{若无,写「无」}
未输出计划不得进入实施。纯问答 / 单行 typo / 只读查文件 → 仅 L0,可跳过 L2。
编码 / 改码 / 功能 / 修复 / 重构(非豁免)→ 须 Read ~/.projects-rules/Opptrix/.cursor/rules/task-architecture-gate.mdc,完成 a–n 架构简报与 ≥3 套方案 并经用户选定后,才允许改业务代码。
三层加载模型
| 层 | 机制 | 加载方式 |
|---|---|---|
| L0 | 本文件 alwaysApply |
自动 |
| L1 | 路径匹配(见下表) | Read 本地 ~/.projects-rules/Opptrix/.cursor/rules/{文件} |
| L2 | 任务意图 | Read 同上路径;禁止凭记忆 |
反模式:堆叠多个 alwaysApply: true;未 Read 本地文件就编造细则。
L1 路径 → 本地规则文件
| 场景 | 规则文件 | 触发路径摘要 |
|---|---|---|
| client-ui | client-ui-guidelines.mdc |
client-ui/**/* |
| UI 收尾验证 | post-edit-verification.mdc |
client-ui/**/* |
| 浮层组件 | ui-overlay-components.mdc |
client-ui/**/* |
| UI 文案 | ui-copy-standard.mdc |
client-ui/**/*, **/onboarding/**/* |
| 数据层 | data-layer-standard-api.mdc |
a-stock-layer, research-hub, apps/server |
| Provider | provider-standard-api.mdc, data-provider-docs.mdc |
a-stock-layer/**/* |
| Agent 工具 | mcp-tool-pack-routing.mdc |
packages/agent/**/* |
| Agent 沙盒 | agent-shell-sandbox.mdc |
agent-workspace/shell, workspace-tools |
| 外部 MCP | external-mcp-servers.mdc |
mcp/external, mcp-servers 配置 |
| SQLite / 兼容 | backward-compatibility.mdc, schema-migration.mdc |
store/schema/market-data |
| 桌面发版 | desktop-release.mdc, onboarding.mdc |
apps/desktop/**, releases |
| macOS 签名 | desktop-mac-signing.mdc |
after-pack/sign, mac-sign-checklist |
| 代码质量 / 测试 / 性能 | code-quality.mdc, testing.mdc, performance.mdc |
packages/**, apps/**, tests/** |
| 写文档 | documentation.mdc |
docs/**/*, **/*.md |
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 First seen · 88 lines · 1,328 tokens per session scan A 342f018e8106
rules-index is a cursor rule published in the GitHub repository Travisun/Opptrix (224 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,328 tokens to every session, about $0.0066 per session on Opus 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.
Other cursor rules, from other repositories
intercept-discipline
硬/软拦截纪律——禁默认加闸;误伤优先;提拦截须走人确认.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.