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/wangqiqi/cursor-ai-rules/rules-routergit clone --depth 1 https://github.com/wangqiqi/cursor-ai-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/rules/wangqiqi/cursor-ai-rules/rules-router)<a href="https://agentmods.dev/rules/wangqiqi/cursor-ai-rules/rules-router"><img src="https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/rules-router.svg" alt="Measured on agentmods" 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 | $0.02671 | $0.02671 |
| Opus 5 | $0.01336 | $0.01336 |
| Sonnet 5 | $0.00534 | $0.00534 |
| Haiku 4.5 | $0.00267 | $0.00267 |
Grade A, and why
rules-router 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 3d 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 — 397 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🎯 规则路由器 (Rules Router)
版本: v4.3.0 | 最后更新: {{GENERATION_TIME}} | 作者: wangqiqi (https://github.com/wangqiqi)
🧠 核心理念:智能规则编排引擎
统一规则管理系统:基于上下文感知、依赖关系和优先级自动激活最合适的规则组合,实现规则间的智能协作。
🎯 工作原理
graph TD
A[用户意图] --> B[上下文分析]
B --> C[规则评估引擎]
C --> D[依赖解析]
D --> E[优先级排序]
E --> F[规则激活]
F --> G[冲突解决]
G --> H[最终规则集]
I[规则依赖图] --> D
J[规则优先级矩阵] --> E
K[规则冲突规则] --> G
🏗️ 规则体系架构
规则分类体系
rules/
├── core/ # 核心规则 - 始终激活
│ ├── constitution.mdc # AI共生宪法
│ ├── philosophy.mdc # 协作哲学
│ └── intelligent_evolution.mdc # 智能进化系统
├── system/ # 系统规则 - 环境相关
│ ├── system_info.mdc # 系统信息获取
│ ├── platform_adapter.mdc # 跨平台适配
│ ├── module_manager.mdc # 模块管理
│ └── i18n.mdc # 国际化支持
├── workflow/ # 工作流规则 - 开发流程
│ ├── generator.mdc # 项目生成器
│ ├── templates.mdc # 模板管理
│ ├── eslint.mdc # 代码质量
│ └── conversation_intent_analyzer.mdc # 意图分析
├── evolution/ # 进化规则 - 系统优化
│ ├── evolution-philosophy.mdc # 进化哲学
│ ├── evolution-manual.mdc # 手动进化
│ ├── evolution-automation.mdc # 自动进化
│ └── evolution-governance.mdc # 进化治理
├── team/ # 团队规则 - 协作相关
│ └── collaboration.mdc # 团队协作
└── tech/ # 技术栈规则 - 语言特定
├── javascript.mdc # JavaScript/TypeScript
└── python.mdc # Python开发
🎯 智能规则激活引擎
上下文感知激活
interface RuleActivationContext {
userIntent: string; // 用户意图
projectType: string; // 项目类型
techStack: string[]; // 技术栈
teamSize: number; // 团队规模
developmentStage: string; // 开发阶段
environment: string; // 运行环境
userPreferences: Record<string, any>; // 用户偏好
}
interface RuleActivationResult {
activeRules: string[]; // 激活规则列表
priorityOrder: string[]; // 优先级顺序
conflicts: RuleConflict[]; // 冲突规则
dependencies: RuleDependency[]; // 依赖关系
}
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.
- 3d ago First seen · 397 lines · 2,671 tokens per session scan A e9a8be21b8ed
rules-router is a cursor rule published in the GitHub repository wangqiqi/cursor-ai-rules (15 stars, last pushed 3mo ago), licensed MIT. It adds 2,671 tokens to every session, about $0.0134 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
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.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.