alonsarias/agent-rules

A curated collection of Cursor rules for AI-assisted development. Currently includes React performance optimization and component architecture patterns, with more frameworks coming soon.

4Stars on the repository
6Mods indexed here, across every type
6mo agoLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

alonsarias/agent-rules

Cursor rule Cursor

Advanced React patterns for refs, stable callbacks, useEffectEvent, and application initialization. Use when dealing with event handler refs, stable callback references, subscription management, effect dependencies, or one-time app initialization.

4 6mo ago A 0 tokens original MIT

alonsarias/agent-rules

Cursor rule Cursor

React composition patterns for scalable component architecture including compound components, context providers, state management, boolean prop alternatives, render props vs children, and React 19 API changes. Use when refactoring components with many boolean props, building component libraries, designing flexible…

4 6mo ago A 0 tokens original MIT

alonsarias/agent-rules

Cursor rule Cursor

JavaScript performance micro-optimizations for React applications including loops, caching, data structures, Set/Map lookups, array methods, RegExp hoisting, and immutable operations. Use when optimizing hot paths, working with arrays, loops, caching, or data structure lookups.

4 6mo ago A 0 tokens original MIT

alonsarias/agent-rules

Cursor rule Cursor

Critical React performance patterns for eliminating async waterfalls and optimizing bundle size. Use when dealing with slow loading, Promise.all, async/await parallelization, bundle size optimization, lazy loading, code splitting, barrel file imports, or tree shaking issues.

4 6mo ago A 0 tokens original MIT

alonsarias/agent-rules

Cursor rule Cursor

React rendering and DOM performance patterns for animations, SVG optimization, CSS content-visibility, conditional rendering, and useTransition loading states. Use when working with animations, SVG elements, long lists, show/hide toggles, or loading state management.

4 6mo ago A 0 tokens original MIT

alonsarias/agent-rules

Cursor rule Cursor

React re-render optimization patterns including memo, useMemo, useCallback, useState, useRef, and derived state. Use when components re-render too often, dealing with stale closures, dependency arrays, performance issues, or optimizing slow components.

4 6mo ago A 0 tokens original MIT