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/cacr92/wereply/global_rulesgit clone --depth 1 https://github.com/cacr92/WeReplyWhat 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.03510 | $0.03510 |
| Opus 5 | $0.01755 | $0.01755 |
| Sonnet 5 | $0.00702 | $0.00702 |
| Haiku 4.5 | $0.00351 | $0.00351 |
Grade A, and why
global_rules 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 — 387 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WeReply - 微信回复建议助手 - Cursor 规则
快速参考: 本文件包含核心工作流和编程规范。详细技术规范请参考
.claude/rules/目录。
AI 行为准则
对话启动要求
每次新对话开始时,AI 必须:
- 重新完整阅读并理解本规则文件的所有内容
- 在回复用户之前,内化所有编码准则和执行协议
- 严格按照本规则文件中定义的开发流程执行任务
- 在整个对话过程中始终遵守这些规则,不得偏离
沟通规范
- 问候语: 对话开始时,以"你好,主人!我是+模型名字"作为开场白
- 沟通语言: 必须使用中文进行交流
- 专业性: 保持专业、客观、技术导向的沟通风格
任务处理流程
非开发任务(咨询、解释、分析)
- 需求分析 - 列出需求点
- 任务分解 - 分解为具体子任务
- 执行说明 - 说明正在执行的操作
- 标记进度 - 实时标记完成状态
开发任务(代码修改、新功能、Bug修复)
必须执行开发流程(6步核心 + 可选步骤),详见下方。
开发流程
核心原则
- ✅ Plan-First Workflow - 先计划后编码(复杂任务)
- ✅ 使用 feature 分支开发 - 永不直接修改 main 分支
- ✅ 灵活执行 - 简单任务可跳过部分步骤
- ✅ TDD 优先 - 先写测试后写代码
- ✅ 质量保障 - 完成前必须验证
阶段 1:计划与设计(复杂任务时)
步骤 1:需求分析
触发时机: 新功能、复杂任务、不清楚的需求
作用:
- 探索用户意图和需求
- 澄清技术实现细节(WeReply 特定:微信监听、DeepSeek API、IPC 通信等)
- 讨论设计方案和权衡
- 确定功能范围
何时跳过:
- 简单的 bug 修复
- 文档更新
- 明确的小改动
- 单文件样式调整
步骤 2:编写实现计划
触发时机: 复杂功能、重构任务、跨模块修改
作用:
- 生成详细的实施计划
- 识别关键文件和依赖(参考
.claude/rules/01-project-overview.md) - 考虑架构权衡(Rust Orchestrator ↔ Platform Agent ↔ DeepSeek API)
- 用户审批后执行
何时跳过:
- 单文件修改
- 明确的 API 调整
- 简单的样式更新
- UI 文本修改
WeReply 特定考虑:
- Agent 通信影响
- DeepSeek API 调用变更
- 微信监听逻辑修改
阶段 2:开发实施
步骤 3:创建功能分支(强制执行)
所有涉及代码修改的任务都必须执行
git checkout -b feat/your-feature-name
# 或
git checkout -b fix/bug-description
分支命名规范:
feat/- 新功能(如:feat/add-voice-reply-support)fix/- Bug 修复(如:fix/agent-timeout-issue)refactor/- 重构(如:refactor/ipc-protocol)perf/- 性能优化(如:perf/optimize-deepseek-cache)test/- 测试相关(如:test/agent-communication)
绝对禁止: 直接在 main 分支上修改代码
步骤 4:TDD 实现(强制执行)
所有新功能和 bug 修复都必须执行
TDD 流程:
- 编写测试 - 先写失败的测试
- 实现代码 - 编写最小可用代码
- 运行测试 - 确保测试通过
- 重构 - 优化代码质量
- 重复 - 循环直到功能完成
覆盖率要求:
- 整体覆盖率:≥ 80%
- 核心业务逻辑:≥ 90%
- 工具函数:≥ 95%
WeReply 特定测试重点:
- Agent 通信异常测试(超时、崩溃、格式错误)
- DeepSeek API 调用失败测试(网络错误、超时、限流)
- IPC 消息验证测试(恶意消息、格式错误)
- 微信监听去重测试
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 · 387 lines · 3,510 tokens per session scan A 83b12db7f2ae
global_rules is a cursor rule published in the GitHub repository cacr92/WeReply (6 stars, last pushed 7mo ago), licensed MIT. It adds 3,510 tokens to every session, about $0.0175 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-31.
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.