Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/frontend-standards
SKILL.md
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
React Best Practices
- Suspense Usage - Prefer Suspense for async operations over manual isLoading flags
- useEffect Discipline - Challenge every useEffect: could it be derived value, event handler, or useMemo?
- Icon Components - SVG icons belong in
Icons.tsx, not inline in View components - External State - Use
useSyncExternalStorefor singleton/global state, not useEffect subscriptions - Query Key Management - Use consistent key factories, ensure complete invalidation
Detailed Documentation
- react-patterns.md - React patterns (useEffect alternatives, Suspense, state management)
- frontend-standards.md - Directory structure, TanStack Router/Query, React best practices, styling
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?