frontend-standards
React patterns and frontend best practices for this project. Use when implementing React components, hooks, routes, styling, or client-side logic in packages/client.
When & Why to Use This Skill
This Claude skill serves as a comprehensive guide for frontend excellence, enforcing React patterns and best practices within a project's client-side architecture. It streamlines the development of high-performance web applications by providing standardized approaches for React 18, TanStack Router, TanStack Query, and Tailwind CSS, ensuring code consistency and maintainability across the codebase.
Use Cases
- Component Development: Implementing new React components and hooks while adhering to specific project standards, such as avoiding useEffect in favor of TanStack Query or event handlers.
- State Management & Data Fetching: Setting up robust client-side logic and external state subscriptions using useSyncExternalStore and Suspense for optimized loading states.
- Routing and Navigation: Configuring complex client-side routes using TanStack Router according to the project's architectural guidelines.
- Refactoring and Code Review: Evaluating existing frontend code in packages/client to ensure it aligns with modern React best practices and the established tech stack.
- UI/UX Implementation: Integrating styling solutions like Tailwind CSS and specialized libraries like xterm.js following the project's directory structure and design patterns.
| name | frontend-standards |
|---|---|
| description | React patterns and frontend best practices for this project. Use when implementing React components, hooks, routes, styling, or client-side logic in packages/client. |
Frontend Standards
Key Principles
- Avoid useEffect - Use TanStack Query, useSyncExternalStore, or event handlers instead
- Prefer Suspense - For loading states and async boundaries
- useSyncExternalStore - For external state subscriptions (WebSocket, global stores)
- Server is the source of truth - Don't maintain conflicting client state
Tech Stack
- React 18, TanStack Router, TanStack Query, Tailwind CSS, xterm.js, Valibot
Detailed Documentation
- react-patterns.md - React patterns (useEffect alternatives, Suspense, state management)
- frontend-standards.md - Directory structure, TanStack Router/Query, xterm.js, styling