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/mr-chen-05/rules-2.1-optimized-zh/commitgit clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimized-zhWhat 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.01475 | $0.01475 |
| Opus 5 | $0.00737 | $0.00737 |
| Sonnet 5 | $0.00295 | $0.00295 |
| Haiku 4.5 | $0.00147 | $0.00147 |
Grade A, and why
commit 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 2d 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 — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.
📝 Commit Workflow - 提交工作流
创建格式良好的提交,使用约定式提交格式和描述性表情符号。
🚀 Commands - 命令
/commit- 标准提交(包含预提交检查)/commit --no-verify- 跳过预提交检查的快速提交/commit-fast- 快速提交工作流,自动选择第一个消息
✨ Features - 功能特性
- 默认运行预提交检查(lint、build、生成文档)
- 如果没有暂存文件,自动暂存文件
- 使用约定式提交格式和描述性表情符号
- 建议为不同关注点拆分提交
📋 Commit Types - 提交类型
| 类型 | 表情符号 | 描述 | 示例 |
|---|---|---|---|
| feat | ✨ | 新功能 | ✨ feat: 添加用户认证功能 |
| fix | 🐛 | Bug修复 | 🐛 fix: 修复登录页面验证错误 |
| docs | 📝 | 文档变更 | 📝 docs: 更新API文档 |
| refactor | ♻️ | 重构代码 | ♻️ refactor: 重构用户服务层 |
| style | 🎨 | 代码格式 | 🎨 style: 格式化代码,添加缺失分号 |
| perf | ⚡️ | 性能改进 | ⚡️ perf: 优化数据库查询性能 |
| test | ✅ | 测试相关 | ✅ test: 添加用户注册单元测试 |
| chore | 🧑💻 | 工具配置 | 🧑💻 chore: 更新构建配置 |
| wip | 🚧 | 进行中的工作 | 🚧 wip: 用户权限功能开发中 |
| remove | 🔥 | 删除代码 | 🔥 remove: 删除废弃的API接口 |
| hotfix | 🚑 | 紧急修复 | 🚑 hotfix: 修复生产环境登录问题 |
| security | 🔒 | 安全改进 | 🔒 security: 加强密码加密机制 |
📋 Process - 提交流程
1. 检查暂存变更
git status
2. 如果没有暂存变更,审查并暂存适当的文件
git add <files>
# 或者暂存所有变更
git add .
3. 运行预提交检查(除非使用 --no-verify)
- 代码检查 (lint)
- 构建验证
- 测试运行
- 文档生成
4. 分析变更以确定提交类型
- 查看修改的文件和内容
- 确定主要变更类型
- 考虑是否需要拆分为多个提交
5. 生成描述性提交消息
- 使用格式:
emoji type(scope): description - 包含作用域(如适用):
type(scope): description - 为复杂变更添加正文,解释原因
- 引用相关问题/PR
6. 执行提交
git commit -m "✨ feat(auth): 添加JWT认证中间件
- 实现JWT token生成和验证
- 添加认证中间件到路由保护
- 更新用户模型包含token字段
Closes #123"
✅ Best Practices - 最佳实践
提交原则
- 原子性 - 保持提交专注和原子化
- 命令式语气 - 使用"添加功能"而不是"已添加功能"
- 解释原因 - 说明为什么,而不仅仅是什么
- 引用问题 - 在相关时引用问题/PR
- 拆分变更 - 将不相关的变更拆分为单独的提交
消息格式
<emoji> <type>(<scope>): <description>
<body>
<footer>
示例提交消息
简单功能添加:
✨ feat: 添加用户头像上传功能
带作用域的修复:
🐛 fix(api): 修复用户查询接口分页错误
复杂变更带正文:
♻️ refactor(database): 重构用户数据访问层
- 将原始SQL查询迁移到ORM
- 添加数据库连接池配置
- 优化查询性能和内存使用
性能提升约30%,代码可维护性显著改善
Closes #456
🔧 Pre-commit Checks - 预提交检查
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.
- 2d ago First seen · 182 lines · 1,475 tokens per session scan A cf61e0b28a4d
commit is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized-zh (29 stars, last pushed 1y ago), licensed MIT. It adds 1,475 tokens to every session, about $0.0074 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.
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.
specs
This directory contains product and tech specs for Streamlit features.