frontend-development-index

An index of guidance for building frontend interfaces, especially React and Next.js applications. It points developers to rules for components, browser-server rendering, API data, and state management.

In plain words
What is it for?
Use it when creating components, extracting logic, fixing hydration issues, connecting APIs, or managing server data with React Query.
Why use it?
It helps choose the relevant development guidance instead of searching through many separate documents.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/rm2thaddeus/pixel_detective/frontend-development-index
Clone the repo
git clone --depth 1 https://github.com/rm2thaddeus/Pixel_Detective

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02444
Opus 5 $0.00000 $0.01222
Sonnet 5 $0.00000 $0.00489
Haiku 4.5 $0.00000 $0.00244

Measured 2d ago against content hash ecda6d33ed69, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-development-index 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.

frontend/.cursor/rules/frontend-development-index.mdc · 329 lines

How it starts

The opening of the file, as written. The whole thing — 329 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend Development Master Index

🎯 COMPLETE FRONTEND DEVELOPMENT GUIDE

This index provides comprehensive guidance for frontend development based on proven patterns from Sprint 10 experiences and architectural lessons learned.

📋 RULE SELECTION GUIDE - Choose Your Path:

🚀 New Component Development

START HERE: component-architecture-patterns.mdc

  • Component composition patterns and anti-patterns
  • Breaking down "God Components" (424+ line components)
  • Custom hooks for logic extraction
  • Container/Presentational patterns
  • Testing strategies for components
💧 Hydration Issues (CRITICAL)

START HERE: nextjs-hydration-prevention.mdc

  • Two-stage rendering patterns for SSR/CSR compatibility
  • ColorModeScript placement in document <head>
  • Mounted state patterns for client-only components
  • Forbidden browser API usage in render phase
  • Emergency hydration debugging protocols
🔄 API Integration & State Management

START HERE: react-query-api-integration.mdc

  • Mandatory React Query for all server state
  • Query/mutation patterns with error handling
  • Background polling and cache management
  • API client setup with interceptors
  • Query key conventions and invalidation
🎨 User Experience & Workflows

START HERE: ux-workflow-patterns.mdc

  • Critical UX flaw fixes (file upload workflows)
  • Real-time feedback patterns
  • Progressive setup flows
  • Error recovery patterns
  • Mobile-first responsive design
Performance Optimization

START HERE: nextjs-performance-optimization.mdc

  • Next.js Image component optimization
  • Bundle analysis and code splitting
  • Memory leak prevention
  • Performance monitoring
  • Core Web Vitals optimization

🔥 SPRINT 10 CRITICAL LESSONS INTEGRATION

The Big 5 Frontend Issues (From Sprint 10):
  1. Hydration Errorsnextjs-hydration-prevention.mdc
    • Server/client HTML mismatch in dark mode
    • ColorModeScript placement issues
    • Client-only component patterns

Read the full file on GitHub · 329 lines

Changes

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.

  1. 2d ago First seen · 329 lines · 0 tokens per session scan A ecda6d33ed69

Subscribe to this mod's changes

frontend-development-index is a cursor rule published in the GitHub repository rm2thaddeus/Pixel_Detective (21 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,444 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-30.