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 skills add majiayu000/spellbook --skill react-best-practicesgit clone --depth 1 https://github.com/majiayu000/spellbookWrote 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/skills/majiayu000/spellbook/react-best-practices)<a href="https://agentmods.dev/skills/majiayu000/spellbook/react-best-practices"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/react-best-practices.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00050 | $0.00884 |
| Opus 5 | $0.00025 | $0.00442 |
| Sonnet 5 | $0.00010 | $0.00177 |
| Haiku 4.5 | $0.00005 | $0.00088 |
Grade A, and why
react-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 4d 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Best Practices
Practical React and Next.js guidance for performance-sensitive product work.
This skill is a self-contained distillation of the Vercel React performance guidance so it can be installed and used directly inside Spellbook.
When To Use
Use this skill when the user asks to:
- build or refactor React components
- improve Next.js performance
- reduce bundle size
- remove data-fetch waterfalls
- fix expensive rerenders
- review frontend code for performance issues
Priority Order
Always check higher-priority categories first.
| Priority | Category | Focus |
|---|---|---|
| 1 | Waterfalls | start async work early, await late, parallelize independent fetches |
| 2 | Bundle size | avoid barrel imports, defer heavy code, split by feature |
| 3 | Server-side performance | dedupe work, minimize serialization, prefer server execution |
| 4 | Client data fetching | dedupe requests, avoid redundant listeners and client churn |
| 5 | Rerenders | reduce subscriptions, stabilize dependencies, move expensive work |
| 6 | Rendering | avoid hydration flicker, reduce DOM/SVG cost, optimize long lists |
| 7 | JavaScript hot paths | cache repeated lookups, combine iterations, exit early |
| 8 | Advanced patterns | stable refs and callback patterns for edge cases |
Hard Rules
1. Eliminate Waterfalls First
- Start independent requests in parallel.
- Do not serialize async work unless there is a real dependency.
- In API routes and server components, create promises early and await them as late as possible.
- Use Suspense boundaries when streaming content helps unblock rendering.
2. Protect Bundle Size
- Prefer direct imports over barrel files on hot paths.
- Use dynamic imports for heavy or infrequently used components.
- Defer analytics, logging, and other non-critical third-party code until after hydration.
- Load optional modules only when the related feature is activated.
3. Prefer Server Work Over Client Work
- Keep data fetching and heavy transformation on the server when possible.
- Minimize data serialized into client components.
- Cache server-side repeated work when the request model allows it.
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.
- 4d ago First seen · 106 lines · 50 tokens per session scan A 5d221600c5af
react-best-practices is a skill published in the GitHub repository majiayu000/spellbook (276 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 884 once invoked, about $0.0003 per session on Opus 5. 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 skills, from other repositories
Cursor rules for building custom frontends with Momen
Cursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
Cursor rules for Next
Cursor rules for Next.js development with Vercel and TypeScript integration.
27 architecture rules preventing AI hallucinations: insecure auth (getSession vs
27 architecture rules preventing AI hallucinations: insecure auth (getSession vs getUser), synchronous params, deprecated imports, missing RLS, and Stripe key exposure. Built for Cursor Agent and Claude Code.
Next.js App Patterns
Use this skill when working in a Next.js App Router codebase (Next.js 14+) and you need safe patterns for server vs client components, data fetching, routing, and deployment without introducing hydration bugs or accidental client bundles.
React Component Patterns
Use this skill when you’re building or refactoring React components in a production app and want consistent patterns for typing, composition, state, and performance without introducing premature abstraction.
Cursor rules for Next
Cursor rules for Next.js development with React 19, Vercel AI, and Tailwind CSS integration.