Agent skill
React
React applications must comply with these quality bars.
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/react
SKILL.md
React Framework Rules
CRITICAL: React applications must comply with these quality bars.
Quality Commands
- Lint & type check:
npm run lint+npm run type-check - Unit/integration tests:
npm run test -- --watch=false - Build:
npm run build - Bundle analysis (optional):
npm run analyze
Project Structure
- Group features under
src/features/<name>/ - Maintain shared UI primitives in
src/components - Keep hooks in
src/hooks - Centralize state management in
src/state(Redux/Zustand/Recoil)
Implementation Guidelines
- Use TypeScript everywhere (no implicit
any) - Prefer functional components with hooks
- Co-locate component tests as
<Component>.test.tsx - Use React Query/SWR for server state, keep caches invalidated on mutations
- Wrap new pages with error boundaries and suspense where needed
Pre-Commit Checklist
npm run lint
npm run type-check
npm run test -- --watch=false
npm run build
Documentation
- Update
/docs/react-architecture.mdwhen routes or global providers change - Record reusable components in Storybook or
/docs/ui-components.md - Capture performance regressions in
/docs/performance.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
DAG Workflow
Maintain a clean dependency graph (DAG) to prevent circular dependencies and ensure maintainable architecture.
Documentation Rules
All documentation in English. Root README concise, detailed docs in `/docs`.
Quality Enforcement
These rules are NON-NEGOTIABLE and MUST be followed without exception.
Rulebook Task Management
Spec-driven task management for features and breaking changes with OpenSpec-compatible format
Agent Automation
Mandatory workflow that AI agents MUST execute after EVERY implementation.
C
Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
Didn't find tool you were looking for?