Borrowing it
Nothing to install: this file belongs to ntygod/ZhiWei. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ntygod/ZhiWei/develop/.cursorrulesgit clone --depth 1 https://github.com/ntygod/ZhiWeiWrote 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/ntygod/zhiwei/cursorrules)<a href="https://agentmods.dev/rules/ntygod/zhiwei/cursorrules"><img src="https://agentmods.dev/badge/rules/ntygod/zhiwei/cursorrules/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.
<a href="https://agentmods.dev/rules/ntygod/zhiwei/cursorrules"><img src="https://agentmods.dev/badge/rules/ntygod/zhiwei/cursorrules.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.04236 | $0.04236 |
| Opus 5.5 | $0.01694 | $0.01694 |
| Sonnet 5.5 | $0.00847 | $0.00847 |
| Haiku 4.5 | $0.00424 | $0.00424 |
Grade A, and why
cursorrules 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 2mo 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 — 583 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ZhiWei(知微)项目开发规范
基于项目最新架构文档(
docs/ARCHITECTURE.md)和实际技术栈 最后更新:2026-03
一、项目技术栈总览
后端(Spring Boot)
- 语言: Java 22(优先使用 Record、Sealed Interface、Pattern Matching、Virtual Thread)
- 框架: Spring Boot 3.5.3
- AI 集成: Spring AI 1.1.2(Advisor 模式、MCP 支持、结构化输出)
- 构建: Maven 3.9.x
- 数据库: SQLite 3.49+(WAL 模式、FTS5 全文索引)+ sqlite-vec 0.1.x(向量存储)
- 迁移: Flyway 10.x
前端(Vue 3 SPA)
- 框架: Vue 3.5+(Composition API +
<script setup lang="ts">) - UI 组件库: Reka UI 2.x(不是 shadcn-vue)
- 样式系统: Tailwind CSS 4.x + CSS Variables
- 状态管理: Pinia 3.x
- 路由: Vue Router 4.x
- 图标库: lucide-vue-next
- 构建工具: Vite 6.x
二、后端开发规范
2.1 Java 代码风格
必须使用 Java 22 特性:
- Record:用于不可变数据传输对象(DTO)、事件封装
- Sealed Interface/Class:用于有限状态机、策略模式
- Pattern Matching:
instanceof+ switch 模式匹配 - Virtual Thread:IO 密集型操作优先使用
// ✅ 正确:使用 Record 作为 DTO
public record ChatRequest(String sessionId, List<Message> messages) {}
// ✅ 正确:Sealed Interface 限制实现
public sealed interface AgentState permits IdleState, RunningState, WaitingState {
AgentState transition(Event event);
}
// ✅ 正确:Pattern Matching
public String describe(Object obj) {
return switch (obj) {
case String s -> "字符串: " + s;
case Number n -> "数字: " + n;
case null -> "空值";
default -> "未知类型";
};
}
禁止事项:
- 禁止使用 Lombok
@Data(改用 Record 或手动定义 getter/setter) - 禁止使用
public字段暴露数据(使用封装) - 禁止魔法数字/字符串(使用常量枚举或配置类)
2.2 包结构规范
com.lifepilot/
├── llm/ # 多模型路由、熔断器、故障转移
├── agent/ # Agent 控制循环、状态机、上下文组装
├── tool/ # 工具契约、动态注册、执行管道
├── guardrail/ # 安全护栏策略
├── mcp/ # Model Context Protocol 客户端/服务器
├── memory/ # 四层记忆(工作/情景/语义/程序)
├── knowledge/ # 知识库、文档解析、检索
├── skill/ # Skill 注册、热加载、自扩展
├── interaction/ # CLI/Web/Channel 适配器
├── conversation/ # 对话历史、会话管理
├── datastore/ # 通用数据存储(Schema-Free JSON)
├── workflow/ # YAML 声明式工作流
├── sandbox/ # 代码执行沙箱
├── media/ # 多模态处理
├── sync/ # 外部数据源同步
├── eval/ # Agentic Evals 评估框架
├── multiagent/ # 多 Agent 协作
├── a2a/ # A2A 协议实现
├── marketplace/ # 插件市场
├── meta/ # 元能力
├── prompt/ # Prompt 模板管理
├── notification/ # 统一通知系统
├── observability/ # 轨迹记录、可观测性
└── config/ # 全局配置
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.
- 2mo ago First seen · 583 lines · 4,236 tokens per session scan A 97870c67ebd1
cursorrules is a cursor rule published in the GitHub repository ntygod/ZhiWei (137 stars, last pushed 2mo ago), licensed MIT. It adds 4,236 tokens to every session, about $0.0169 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.
cursorrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursorrulesntygod/ZhiWei | Cursor rule | 137 | 2mo ago | MIT | A | 4,236 | Cursor |
| mcplivestorejs/livestore | Cursor rule | 3.8k | yesterday | Apache-2.0 | A | 86 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | yesterday | AGPL-3.0 | A | 441 | Cursor |
| dreamd-recallbotzrDev/dreamd | Cursor rule | 6 | yesterday | Apache-2.0 | A | 135 | Cursor |
| bookmarksdergigi/boris | Cursor rule | 19 | 1mo ago | MIT | A | 27 | Cursor |
| controllercool-team-official/cool-admin-midway | Cursor rule | 3.3k | 3mo ago | none | A | 5 | Cursor |
| project-modules-and-stackSiborne/YiSmart-Cloud | Cursor rule | 5 | 5mo ago | MIT | A | 418 | Cursor |