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/holtwood/awesome-cursorrules-zh/mobx-react-lite-usagegit 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-react-lite-usage)<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage.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.00000 | $0.00556 |
| Opus 5 | $0.00000 | $0.00278 |
| Sonnet 5 | $0.00000 | $0.00111 |
| Haiku 4.5 | $0.00000 | $0.00056 |
Grade A, and why
mobx-react-lite-usage 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 yesterday.
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-react-lite 以在函数式组件中获得最佳性能:
observerHOC 或useObserverHook:- 对于函数式组件,推荐使用
mobx-react-lite提供的observer高阶组件(HOC)或useObserverHook 来包裹组件,使其能够响应 MobX 状态的变化。 observerHOC 示例:import React from 'react'; import { observer } from 'mobx-react-lite'; import { useStore } from '../stores'; const TodoList = observer(() => { const { todoStore } = useStore(); return ( <div> {todoStore.todos.map(todo => ( <div key={todo.id}>{todo.text}</div> ))} </div> ); }); export default TodoList;useObserverHook 示例(适用于需要更细粒度控制渲染的场景):import React from 'react'; import { useObserver } from 'mobx-react-lite'; import { useStore } from '../stores'; const TodoItem = ({ todo }) => { return useObserver(() => ( <li> {todo.text} <button onClick={() => todo.toggleCompleted()}> {todo.completed ? 'Mark Incomplete' : 'Mark Complete'} </button> </li> )); }; export default TodoItem;
- 对于函数式组件,推荐使用
- 性能优化:
mobx-react-lite针对函数式组件进行了优化,只在组件实际观察到的数据发生变化时才重新渲染组件,从而最大限度地减少不必要的渲染。- 避免在
observer组件内部解构 MobX store 的可观察属性,这可能导致组件观察到整个 store 而不是特定属性,从而触发不必要的重新渲染。应在组件内部访问具体属性。
- 与 Hooks 结合使用:
mobx-react-lite与 React Hooks 完美结合,可以在observer组件内部自由使用useState,useEffect,useContext等 Hooks。
- 轻量级:
mobx-react-lite是一个轻量级的包,只提供了 MobX 与 React 函数式组件集成的核心功能,没有额外的负担。
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.
- yesterday First seen · 54 lines · 0 tokens per session scan A 9dfbf6beaa0b
mobx-react-lite-usage is a cursor rule published in the GitHub repository holtwood/awesome-cursorrules-zh (232 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 556 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
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.
solidity-react-blockchain-apps-cursorrules-prompt-
Cursor rules for Solidity development with React Blockchain apps integration.
cursorrules
You are using StyleSeed, an AI design-method engine for product UI and other visual artifacts.
nextjs
Next.js Application Development Standards.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.