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.
git clone --depth 1 https://github.com/holtwood/awesome-cursorrules-zhWrote 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/holtwood/awesome-cursorrules-zh/mobx-best-practices)<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/mobx-best-practices"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/mobx-best-practices/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/holtwood/awesome-cursorrules-zh/mobx-best-practices"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/mobx-best-practices.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.00000 | $0.00453 |
| Opus 5 | $0.00000 | $0.00227 |
| Sonnet 5 | $0.00000 | $0.00091 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
mobx-best-practices 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 6d 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.
What it actually says
- 遵循 MobX 可扩展状态管理的最佳实践:
- 明确可观察状态:使用
@observable或makeObservable明确定义哪些属性是可观察的,避免不必要的响应。 - 使用计算值(
@computed):对于从可观察状态派生出的值,使用@computed。它们只在依赖项改变时重新计算,提高性能。 - 使用动作(
@action)修改状态:所有状态修改都应通过@action标记的函数进行,这有助于调试和确保状态更新的原子性。 - 避免在渲染中修改状态:不要在 React 组件的
render方法或函数组件的顶层直接修改 MobX 状态,这可能导致无限循环或不可预测的行为。 - 细粒度可观察性:尽量使可观察状态的粒度更细,例如,将一个大对象分解为多个小对象,这样只有当特定部分改变时才会触发更新。
- 使用
reaction或autorun进行副作用处理:对于需要响应状态变化并执行副作用(如日志记录、网络请求)的场景,使用reaction或autorun,而不是在组件中直接处理。 - 依赖注入:使用 React Context 或其他依赖注入模式来提供 MobX store,避免 prop drilling。
- 严格模式(
useStrict):在开发模式下启用严格模式,强制所有状态修改都通过 action 进行,有助于早期发现问题。 - 测试:为 MobX store 编写单元测试,确保状态逻辑的正确性。
- 避免过度使用 MobX:对于简单的组件内部状态,可以考虑使用 React 的
useState和useReducer,而不是总是引入 MobX。
- 明确可观察状态:使用
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.
- 6d ago First seen · 16 lines · 0 tokens per session scan A 25142536b50d
mobx-best-practices is a cursor rule published in the GitHub repository holtwood/awesome-cursorrules-zh (233 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 453 tokens. 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-09-03.
Other cursor rules, from other repositories
testing
Testing conventions for Vitest and React Testing Library -- the agent pulls this in when writing or modifying tests.
upgrade-tests
// ✅ CORRECT: Upgrade package pattern await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
tanstack-react-query-tests
// ✅ CORRECT: Use await using for automatic cleanup await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
testing
A high-quality & reliable React Hooks library. https://alibaba.github.io/hooks/.
component-development
Modern React + TypeScript component patterns — hooks, typed props, performance optimization, forms, and testing.
app-router-patterns
Next.js 14+ App Router patterns — Server Components, Client Components, Route Handlers, Server Actions, and metadata API.