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/alonsarias/agent-rulesWrote 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/alonsarias/agent-rules/react-rendering-performance)<a href="https://agentmods.dev/rules/alonsarias/agent-rules/react-rendering-performance"><img src="https://agentmods.dev/badge/rules/alonsarias/agent-rules/react-rendering-performance/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/alonsarias/agent-rules/react-rendering-performance"><img src="https://agentmods.dev/badge/rules/alonsarias/agent-rules/react-rendering-performance.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.01649 |
| Opus 5.5 | $0.00000 | $0.00660 |
| Sonnet 5.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 1mo 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.
- 1mo 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 8mo 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
11-frontend-react
Frontend development rules for React 18, Electron, ShadCN UI, and Tailwind CSS.
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.
web
Web build conventions (separate from native and RN JS).
components
Component patterns and UI conventions.
performance
Frontend performance optimization rules. Apply when optimizing UI or bundle.