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/alonsarias/agent-rules/react-rendering-performancegit clone --depth 1 https://github.com/alonsarias/agent-rulesWhat 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.01649 |
| Opus 5 | $0.00000 | $0.00825 |
| Sonnet 5 | $0.00000 | $0.00330 |
| Haiku 4.5 | $0.00000 | $0.00165 |
Grade A, and why
react-rendering-performance 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 — 296 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Rendering Performance
Patterns for optimizing the rendering process to reduce browser work.
1. Animate SVG Wrapper Instead of SVG Element
Impact: LOW - Enables hardware acceleration
Many browsers don't have hardware acceleration for CSS3 animations on SVG elements. Wrap SVG in a <div> and animate the wrapper.
Incorrect: animating SVG directly - no hardware acceleration
function LoadingSpinner() {
return (
<svg className="animate-spin" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
</svg>
)
}
Correct: animating wrapper div - hardware accelerated
function LoadingSpinner() {
return (
<div className="animate-spin">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
</svg>
</div>
)
}
This applies to all CSS transforms and transitions (transform, opacity, translate, scale, rotate).
2. CSS content-visibility for Long Lists
Impact: HIGH - Faster initial render
Apply content-visibility: auto to defer off-screen rendering.
CSS:
.message-item {
content-visibility: auto;
contain-intrinsic-size: 0 80px;
}
Usage:
function MessageList({ messages }: { messages: Message[] }) {
return (
<div className="message-list">
{messages.map(msg => (
<div key={msg.id} className="message-item">
<MessageContent content={msg.content} />
</div>
))}
</div>
)
}
For 1000 messages, browser skips layout/paint for ~990 off-screen items (10x faster initial render).
3. Hoist Static JSX Elements
Impact: LOW - Avoids re-creation
Extract static JSX outside components to avoid re-creation on every render.
Incorrect: recreates element every render
function LoadingSkeleton() {
return <div className="skeleton animate-pulse" />
}
function Container() {
return (
<div>
{loading && <LoadingSkeleton />}
</div>
)
}
Correct: reuses same element
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 · 296 lines · 0 tokens per session scan A d15ebacbc380
react-rendering-performance is a cursor rule published in the GitHub repository alonsarias/agent-rules (4 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,649 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-08-31.
Other cursor rules, from other repositories
code-organization
Assets/ ├── !Project/ # Main project content (! keeps it at top) │ ├── Art/ │ │ ├── Materials/ │ │ ├── Models/ │ │ ├── Textures/ │ │ └── Animations/ │ ├── Audio/ │ │ ├── Music/ │ │ ├── SFX/ │ │ └── Mixers/ │ ├── Prefabs/ │ │ ├── Characters/ │ │ ├── Environment/ │ │ ├── UI/ │ │ └── Effects/ │ ├── Scenes/ │ │ ├──…
test-patterns
Selenium pytest test patterns — data-driven tests, fixtures, error handling, and performance checks.
app-router-patterns
Next.js 14+ App Router patterns — Server Components, Client Components, Route Handlers, Server Actions, and metadata API.
testing-fundamentals
Core Cypress testing principles — selector strategy, smart waiting, and spec organization. Apply when writing or reviewing Cypress E2E tests.
core
The engineering contract for this repo lives in AGENTS.md (auto-loaded). Follow it. This rule only adds Cursor-specific behavior so the contract is not duplicated token-for-token on every request.
debugging
Debugging discipline. Apply when investigating a bug, test failure, or unexpected behavior.