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/goranerhartic/cursor-development-rules/react-frontendgit clone --depth 1 https://github.com/GoranErhartic/cursor-development-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/goranerhartic/cursor-development-rules/react-frontend)<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/react-frontend"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/react-frontend.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.00800 |
| Opus 5 | $0.00000 | $0.00400 |
| Sonnet 5 | $0.00000 | $0.00160 |
| Haiku 4.5 | $0.00000 | $0.00080 |
Grade A, and why
react-frontend 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.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React + TypeScript Frontend Guide
Stack
| Layer | Technology |
|---|---|
| Runtime | React 18+ |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Data fetching | TanStack Query |
| Forms | React Hook Form |
| Validation | Zod |
| Routing | React Router v7 |
| State | Zustand, React context |
| Testing | Vitest, React Testing Library |
| Build | Vite or Next.js |
| Package Manager | pnpm |
Rule Routing
Consult these rules based on what you are working on:
Quick Reference
- Build UI feature:
languages/react/components.mdc,languages/react/styling.mdc,languages/react/accessibility.mdc - Build forms:
languages/react/forms.mdc,languages/react/validation.mdc,languages/react/error-handling.mdc - Data/state flow:
languages/react/data-fetching.mdc,languages/react/state-management.mdc,languages/react/testing.mdc - Routing/resilience:
languages/react/routing.mdc,languages/react/error-boundaries.mdc,languages/react/performance.mdc
UI & Components
- Component design, composition, compound components →
languages/react/components.mdc - Styling (Tailwind, design tokens, dark mode) →
languages/react/styling.mdc - Forms (React Hook Form, validation) →
languages/react/forms.mdc - Accessibility (ARIA, keyboard, focus, screen readers) →
languages/react/accessibility.mdc
Data & State
- Data fetching (TanStack Query, cache, mutations) →
languages/react/data-fetching.mdc - State management (Zustand, hooks, context) →
languages/react/state-management.mdc
Routing & Navigation
- React Router v7 (loaders, actions, nested routes) →
languages/react/routing.mdc
Cross-Cutting
- Code quality (TypeScript strict, React 19 idioms, hooks) →
languages/react/code-quality.mdc - Validation (Zod schemas, type inference) →
languages/react/validation.mdc - Error handling (Result pattern, global handling, toasts, async, forms) →
languages/react/error-handling.mdc - Error Boundaries (class component, fallback UI, granular placement) →
languages/react/error-boundaries.mdc - Security (XSS, CSP, secure storage, CORS) →
languages/react/security.mdc - Input sanitization (DOMPurify, URL validation, file upload) →
languages/react/input-sanitization.mdc - Performance (memo, useMemo, lazy loading, code splitting) →
languages/react/performance.mdc - Testing (Vitest, React Testing Library, AAA) →
languages/react/testing.mdc - Dependencies (pnpm workspace, security, licensing) →
languages/react/dependencies.mdc
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 · 72 lines · 0 tokens per session scan A d98a905d03f0
react-frontend is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (19 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 800 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
general
Wonder Blocks design system conventions, component patterns, and coding standards.
state-management
Use the following stack. Do not introduce or recommend Redux or React Context for shared/global state.
new-component
Workflow for creating new React components.
solana-transaction-safety
Safe Solana transaction submission patterns using Helius Sender.
performance
Frontend performance optimization rules. Apply when optimizing UI or bundle.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.