frontend-patterns
Skill4 starsChanged 10 months agoMITView on GitHub
React, TypeScript, Vite patterns for web applications. Use when building UI components, forms, routing, state management, or animations.
46 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- themusecatcher/ai-coding-kittheir own version, first seen Sep 15, 2026
- venables/skillstheir own version, first seen Sep 12, 2026
- talayash/agentriumtheir own version, first seen Sep 11, 2026
- KbWen/agentic-ostheir own version, first seen Sep 10, 2026
- best-radar/bradar-everything-claude-codetheir own version, first seen Sep 6, 2026
Used with
Projects with it also use kotlin-testing, configure-ecc and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 11 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 9 projects that use this
WorldFlowAISkillproject-guidelines-example
Also in 18 projects that use this
- +3 more from Infopibe
Other versions46 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 46
- WorldFlowAI/everything-claude-code★ 4ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- bybren-llc/safe-agentic-workflow★ 419same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 206same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- hellangleZ/burn-in-cceverywhere-ralph★ 112same name
- Jamkris/everything-gemini-code★ 87same name
36 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Claude Agent SDK PatternsSkill
- delegation-templatesSkill
- deploymentSkill
- Google ADK PatternsSkill
- LLM Evaluation PatternsSkill
- LLM Observability PatternsSkill
- memory-workflowSkill
- orchestrator-workflowsSkill
- react-native-best-practicesSkill
- skill-creatorSkill
- testing-strategySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 15 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 107
Always add timeout guards for initial loading states (5-10s)
- Very specific: line 108
Use AbortController for fetch requests
- Very specific: line 119
Use enabled prop for conditional fetching
- Distinctive: line 120
Don't retry mutations (could duplicate actions)
- Distinctive: line 159
Before implementing a feature, check relevant pattern files:
- Distinctive: line 166
If a pattern exists:
- Distinctive: line 167
Follow the documented approach
- Distinctive: line 169
Don't reinvent the wheel
- Distinctive: line 172
If you discover a new pattern:
- Distinctive: line 174
Add to appropriate pattern file
- Distinctive: line 175
Use STAR format for lessons learned
- Very specific: line 176
Update this SKILL.md if it's a new category
- Distinctive: line 180
Add to "Quick Navigation by Use Case" section
- Distinctive: line 181
Update "Related Skills" in other pattern files
- Distinctive: line 182
Add to relevant agent memory files
- Distinctive: line 221
Add inline comments for clarity
- Distinctive: line 222
Keep examples focused and minimal
- Distinctive: line 244
Update "Last Updated" dates
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Patterns
Purpose: Comprehensive React + TypeScript + Vite patterns for building modern, performant web applications
Stack: React 18, TypeScript, Vite, TanStack Query v5, React Router, Tailwind CSS
Pattern Index
Core Patterns (Existing)
| # | Pattern | Focus Area | When to Use |
| 01 | Troubleshooting | CORS, Loading States, Network Debugging | Debugging frontend connectivity, timeouts, environment issues |
| 02 | OAuth Authentication | User Auth, OAuth Flows, Error Handling | Implementing OAuth login, auth state, callback handling |
| 03 | React Performance | Bundle Size, Query Optimization, State | Optimizing bundle, state management, component rendering |
| 04 | TanStack Query | Cache, Mutations, Optimistic Updates | Data fetching, caching, invalidation, session-specific state |
Extended Patterns (New)
| # | Pattern | Focus Area | When to Use |
| 05 | Form Handling | Validation, Submission, Complex Forms | Building forms with validation, file uploads, multi-step flows |
| 06 | React Router Patterns | Navigation, Guards, Layouts | React Router patterns, protected routes, nested routing |
| 07 | State Management | Context, Zustand, Jotai, Decision Tree | Choosing state solutions (useState/Context/Zustand/Jotai), migration patterns |
| 08 | Animations | CSS, Framer Motion, View Transitions, GSAP | Adding animations, transitions, gestures, scroll effects |
Quick Navigation by Use Case
Development & Debugging
- CORS errors: 01-troubleshooting.md#cors-debugging
- Loading states hang: 01-troubleshooting.md#loading-state-issues
- Network debugging: 01-troubleshooting.md#network-debugging
- Environment setup: 01-troubleshooting.md#environment-setup-verification
Authentication
- User-scoped auth: 02-oauth-authentication.md#user-scoped-vs-session-scoped-auth
- OAuth callback: 02-oauth-authentication.md#oauth-callback-handling
- Auth error handling: 02-oauth-authentication.md#error-handling
- Protected routes: 02-oauth-authentication.md#pattern-protected-routes-react-router
Performance
- Bundle optimization: 03-react-performance.md#bundle-optimization
- Code splitting: 03-react-performance.md#pattern-dynamic-imports-for-route-based-code-splitting
- State patterns: 03-react-performance.md#state-management-patterns
- Asset optimization: 03-react-performance.md#asset-optimization
Data Fetching
- Cache invalidation: 04-tanstack-query.md#cache-invalidation-vs-refetch
- Mutations: 04-tanstack-query.md#mutation-lifecycle
- Optimistic updates: 04-tanstack-query.md#optimistic-updates
- Session-specific state: 04-tanstack-query.md#session-specific-state
Forms
- Form validation: 05-form-handling.md#3-validation-patterns
- File uploads: 05-form-handling.md#5-file-upload-patterns
- Multi-step forms: 05-form-handling.md#6-multi-step-forms
- Async validation: 05-form-handling.md#8-async-validation
- Auto-save drafts: 05-form-handling.md#10-auto-save-drafts
Routing
- React Router setup: 06-react-router-patterns.md#1-react-router-v6-setup
- Route guards: 06-react-router-patterns.md#2-route-guards--protection
- Nested routes: 06-react-router-patterns.md#3-nested-routes--layouts
- Lazy loading: 06-react-router-patterns.md#6-lazy-loading-routes
- URL state: 06-react-router-patterns.md#10-url-state-management
State Management
- Decision framework: 07-state-management.md#decision-framework
- Server vs client state: 07-state-management.md#server-state-vs-client-state
- Context patterns: 07-state-management.md#react-context-patterns
- Zustand patterns: 07-state-management.md#zustand-patterns
- Jotai atoms: 07-state-management.md#jotai-patterns
- State persistence: 07-state-management.md#state-persistence
- Migration patterns: 07-state-management.md#migration-patterns
Animations
- Decision framework: 08-animations.md#decision-framework
- Library comparison: 08-animations.md#library-comparison
- CSS transitions: 08-animations.md#css-transitions--animations
- Framer Motion: 08-animations.md#framer-motion-patterns
- View Transitions API: 08-animations.md#view-transitions-api
- React Spring: 08-animations.md#react-spring-patterns
- GSAP: 08-animations.md#gsap-patterns
- Common patterns: 08-animations.md#common-animation-patterns
- Accessibility: 08-animations.md#accessibility
- Performance: 08-animations.md#performance-optimization
Common Patterns Across Files
State Accumulation vs Replacement
- Accumulate (lists/history):
setState(prev => [...prev, newItem]) - Replace (single values):
setState(newValue) - Details: 04-tanstack-query.md#state-accumulation-pattern
Timeout Guards
- Always add timeout guards for initial loading states (5-10s)
- Use
AbortControllerfor fetch requests - Details: 01-troubleshooting.md#loading-state-issues
Error Handling
- Detect auth errors (401) globally
- Clear auth state on failures
- Show user-friendly messages
- Details: 02-oauth-authentication.md#error-handling
Query Configuration
- Set
staleTimeappropriately (5min for chat apps) - Use
enabledprop for conditional fetching - Don't retry mutations (could duplicate actions)
- Details: 04-tanstack-query.md#query-configuration
Technology Stack Reference
Core Libraries
- React: 18.x (Concurrent features, Suspense)
- TypeScript: 5.x (Strict mode recommended)
- Vite: 5.x (Fast bundler, HMR)
- TanStack Query: 5.x (Data fetching, caching)
- React Router: 6.x (Routing, navigation)
- Tailwind CSS: 3.x (Utility-first styling)
State Management Options
- useState/useReducer: Local component state
- TanStack Query: Server state (async data)
- Zustand: Global client state (lightweight)
- Jotai: Atomic state management
- See: 07-state-management.md for decision guide
Form Libraries
- React Hook Form: Performant, minimal re-renders
- Zod: Schema validation (TypeScript-first)
- Formik: Feature-rich (heavier)
- See: 05-form-handling.md for patterns
Animation Libraries
- CSS Transitions/Animations: Native, performant
- Framer Motion: Declarative, gesture support
- React Spring: Physics-based animations
- See: 08-animations.md for comparisons
Pattern Development Workflow
1. Check Existing Patterns
Before implementing a feature, check relevant pattern files:
# Search across all patterns
grep -r "pattern-keyword" .claude/skills/frontend-patterns/2. Use Documented Patterns
If a pattern exists:
- Follow the documented approach
- Reference the pattern in code comments
- Don't reinvent the wheel
3. Document New Patterns
If you discover a new pattern:
- Implement and verify it works
- Add to appropriate pattern file
- Use STAR format for lessons learned
- Update this SKILL.md if it's a new category
4. Update Cross-References
When adding patterns:
- Add to "Quick Navigation by Use Case" section
- Update "Related Skills" in other pattern files
- Add to relevant agent memory files
Contributing Guidelines
Pattern File Structure
Each pattern file should follow this structure:
# Pattern Name
**Purpose**: One-sentence description
**When to use**: Use cases
**Last Updated**: YYYY-MM-DD
## Table of Contents
1. [Pattern Category 1](#pattern-category-1)
2. [Pattern Category 2](#pattern-category-2)
## Pattern Category 1
### Pattern: Specific Pattern Name
**Problem**: What problem does this solve?
**Solution**: How to solve it
**Implementation**: Code examples
---
## Summary
- Key patterns list
- Common mistakes
- Quick reference table
- Related skillsCode Examples
- Show both WRONG and CORRECT examples
- Include TypeScript types
- Add inline comments for clarity
- Keep examples focused and minimal
Pattern Categories
- Problem: Describe the issue
- Solution: High-level approach
- Implementation: Code examples
- Anti-Pattern: Common mistakes
- Key Points: Bullet list of gotchas
Maintenance
When to Update
- New framework version released
- Discovered better pattern
- Common bug/issue encountered
- User feedback suggests improvement
Review Cycle
- Review patterns quarterly
- Archive outdated patterns to
.claude/skills/archive/ - Update "Last Updated" dates
- Maintain backward compatibility references
Related Resources
Internal
- General Frontend: ../frontend-development.md
- Testing Patterns: ../testing-strategy/04-frontend-component-testing.md
- Security: ../security-best-practices.md
- API Design: ../api-design.md
External (Official Docs)
- React: https://react.dev
- Vite: https://vitejs.dev
- TanStack Query: https://tanstack.com/query
- React Router: https://reactrouter.com
- Tailwind CSS: https://tailwindcss.com
Last Updated: 2025-12-09
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

