plugins/react-expert/skills/solid-react/SKILL.md
SOLID principles for React 19. Files < 100 lines, hooks separated, interfaces in src/interfaces/, JSDoc mandatory. Use for React architecture and code quality.
npx skillsauth add fusengine/agents solid-reactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before 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)testing
Copy self-audit and ban-lists — filler verbs/hype adjectives, slop placeholder names, fake-precise numbers, Title Case headlines, humor in error copy ('Oops!'), em-dash crutch, one copy register per page.
development
Logged-in web apps — dashboards, auth flows, settings, onboarding, data tables, command palettes, modals, toasts. Register `product`: density and glance-speed over marketing polish, no hero/CTA-tricks, every data surface covers empty/loading/error explicitly, tables and dataviz follow preattentive-processing rules.
development
Marketing sites, landing pages, campaign pages — register `brand` (design IS the product). Structure comes from the register's POV + a macrostructure pick, never from copying an inspiration site's section flow. Hero discipline, deviated section order, asymmetric grids, and a silhouette lookalike-test gate before ship.
development
Token-strategy core — OKLCH color rules, neutral tinting, accent-commitment levels, type scale, 8pt spacing grid, touch targets, and the canonical output format of design-system.md (the file the harness gates on). This is routing step 1 of design-method/SKILL.md — read it before design-web/design-webapp/design-ios/design-android, before picking or auditing a single color/type/spacing value.