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/chakra-ui-performance-optimization)<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/chakra-ui-performance-optimization"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/chakra-ui-performance-optimization/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/chakra-ui-performance-optimization"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/chakra-ui-performance-optimization.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.00450 |
| Opus 5 | $0.00000 | $0.00225 |
| Sonnet 5 | $0.00000 | $0.00090 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
chakra-ui---performance-optimization 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 7d 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
- 遵循 Chakra UI 性能优化的最佳实践:
- 按需导入组件:只导入和使用实际需要的 Chakra UI 组件,避免全量导入,减少打包体积。
- 避免不必要的重新渲染:
- 使用
React.memo包装纯函数组件,当 props 没有改变时避免重新渲染。 - 使用
useCallback和useMemo优化函数和计算结果,防止它们在每次渲染时重新创建。
- 使用
- CSS 变量:Chakra UI 内部大量使用 CSS 变量,这有助于减少运行时计算,提高样式更新效率。
- 主题定制:在主题配置中,只覆盖需要修改的部分,避免不必要的深度合并。
- 列表虚拟化:对于长列表,考虑使用
react-window或react-virtualized等库进行虚拟化,只渲染视口内的项目,提高性能。 - 懒加载:对于不立即需要的组件或模块,使用
React.lazy和Suspense进行代码分割和懒加载。 - 避免在渲染函数中创建对象/函数:避免在组件的渲染函数内部创建新的对象或函数,这会导致每次渲染都创建新的引用,可能导致子组件不必要的重新渲染。
- 使用
shouldForwardProp:如果自定义组件接收到非标准 HTML 属性,可以使用shouldForwardProp来防止这些属性被渲染到 DOM 中,避免不必要的 DOM 属性。 - 服务器端渲染(SSR)/静态站点生成(SSG):对于 Next.js 或 Gatsby 等框架,利用 SSR/SSG 预渲染页面,减少客户端加载时间,提高首次内容绘制(FCP)性能。
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.
- 7d ago First seen · 17 lines · 0 tokens per session scan A 913aada17f8c
chakra-ui---performance-optimization 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 450 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.
semiotic-react-dataviz-cursorrules-prompt-file
Cursor rules for Semiotic data visualization library with 30+ chart types, MCP server, and AI-assisted chart generation.
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.
next-type-llm
Cursor rules for Next.js development with Type LLM integration.
nextjs
Next.js with TypeScript and Tailwind UI best practices.