From fuse-react
SOLID principles for React 19. Files < 100 lines, hooks separated, interfaces in src/interfaces/, JSDoc mandatory. Use for React architecture and code quality.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fuse-react:solid-reactThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Before ANY implementation:**
references/architecture-patterns.mdreferences/dependency-inversion.mdreferences/interface-segregation.mdreferences/liskov-substitution.mdreferences/open-closed.mdreferences/single-responsibility.mdreferences/solid-principles.mdreferences/templates/adapter.mdreferences/templates/component.mdreferences/templates/error.mdreferences/templates/factory.mdreferences/templates/hook.mdreferences/templates/interface.mdreferences/templates/service.mdreferences/templates/store.mdreferences/templates/test.mdreferences/templates/validator.mdBefore ANY implementation:
Before writing ANY new code:
modules/cores/lib/, modules/cores/components/, modules/cores/hooks/modules/cores/ directlynpx jscpd ./src --threshold 3 after creating new filesBefore ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
See references/architecture-patterns.md for complete structure with feature modules and cores directory.
/**
* Fetch user by ID from API.
*
* @param id - User unique identifier
* @returns User object or null if not found
*/
export async function getUserById(id: string): Promise<User | null>
modules/[feature]/src/interfaces/
├── user.interface.ts
├── post.interface.ts
└── api.interface.ts
NEVER put interfaces in component files.
Each SOLID principle has a dedicated reference guide:
references/single-responsibility.md - One function = one reason to change
references/open-closed.md - Extend via composition, not modification
references/liskov-substitution.md - Contract compliance & behavioral subtyping
references/interface-segregation.md - Many focused interfaces beat one fat interface
references/dependency-inversion.md - Depend on abstractions, not implementations
See references/solid-principles.md for overview and quick reference.
Ready-to-copy code in references/templates/:
| Template | Usage | Max Lines |
|---|---|---|
component.md | React functional component | 50 |
hook.md | Custom hook with TanStack Query | 30 |
service.md | Service with dependency injection | 40 |
store.md | Zustand store with persistence | 40 |
interface.md | TypeScript interfaces | - |
validator.md | Zod validation schemas | 30 |
factory.md | Factory pattern | 40 |
adapter.md | Adapter pattern | 40 |
error.md | Custom error classes | 30 |
test.md | Vitest + Testing Library | - |
anyany typeuseEffect for data fetching (use TanStack Query or Router loaders)npx claudepluginhub fusengine/agents --plugin fuse-reactThis skill should be used when the user asks about "SOLID principles", "Next.js architecture", "modular structure", "code organization", "file size limits", "interface separation", or "JSDoc documentation". Enforces files < 100 lines with mandatory JSDoc and separated interfaces.
Guides modern React patterns: hooks, composition, performance, TypeScript best practices, state management selection, and React 19 features.
Guides writing and modifying React components with modern patterns, TypeScript, hooks for state and effects, component composition, and pitfalls to avoid. Triggers on .jsx/.tsx files or React planning.