solid-react
БесплатноБез исполняемых скриптовНе проверенUse when applying SOLID principles to React architecture — file-size limits, hook separation, src/interfaces/, JSDoc.
от Fusengine★ 36 звёзд на GitHubОб этом скилле
Provides a dedicated reference guide per SOLID letter (SRP file-splitting, OCP composition/render-props, LSP contract compliance, ISP role-based props/context, DIP constructor injection via Context) plus 10 ready-to-copy templates covering components, hooks, services, stores, validators, factories, and tests. This is a cross-cutting code-quality skill, not a feature skill — for the React APIs themselves see react-19, react-state, react-forms, and react-tanstack-router.
SOLID React - Component Architecture
Codebase Analysis (MANDATORY)
Before ANY implementation:
- Explore project structure to understand architecture
- Read existing related files to follow established patterns
- Identify naming conventions, coding style, and patterns used
- Understand data flow and dependencies
DRY - Reuse or Create Shared (MANDATORY)
Before writing ANY new code:
- Grep the codebase for similar function names, patterns, or logic
- Check shared locations:
modules/cores/lib/,modules/cores/components/,modules/cores/hooks/ - If similar code exists → extend/reuse instead of duplicate
- If code will be used by 2+ features → create it in
modules/cores/directly - Extract repeated logic (3+ occurrences) into shared helpers
- Run
npx jscpd ./src --threshold 3after creating new files
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- fuse-ai-pilot:explore-codebase - Analyze project structure and existing patterns
- fuse-ai-pilot:research-expert - Verify latest docs for all stack technologies
- mcp__context7__query-docs - Check integration compatibility
After implementation, run fuse-ai-pilot:sniper for validation.
Absolute Rules (MANDATORY)
1. Source-file size ceiling
- Source files must not exceed
FUSE_SOLID_MAX_LINES- the hook's ceiling is the only authority - Split by responsibility when cohesion drops (components via composition, hooks, services)
2. Modular Architecture
See references/architecture-patterns.md for complete structure with feature modules and cores directory.
3. JSDoc Mandatory
/**
* 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>
4. Interfaces Separated
modules/[feature]/src/interfaces/
├── user.interface.ts
├── post.interface.ts
└── api.interface.ts
NEVER put interfaces in component files.
SOLID Principles (Detailed Guides)
Each SOLID principle has a dedicated reference guide:
references/single-responsibility.md- One function = one reason to change- Responsibility-based splitting within
FUSE_SOLID_MAX_LINES - Component composition patterns
- Split strategy
- Responsibility-based splitting within
references/open-closed.md- Extend via composition, not modification- Plugin architecture patterns
- Render props and slots
- Strategy patterns
references/liskov-substitution.md- Contract compliance & behavioral subtyping- Interface contracts
- Swappable implementations
- Testing compliance
references/interface-segregation.md- Many focused interfaces beat one fat interface- Role-based interfaces
- Props segregation
- Context splitting
references/dependency-inversion.md- Depend on abstractions, not implementations- Constructor injection patterns
- Factory patterns
- Context for DI
See references/solid-principles.md for overview and quick reference.
Code Templates
Ready-to-copy code in references/templates/:
| Template | Usage |
|---|---|
component.md |
React functional component |
hook.md |
Custom hook with TanStack Query |
service.md |
Service with dependency injection |
store.md |
Zustand store with persistence (store budget 0.4 × FUSE_SOLID_MAX_LINES, 40 at default) |
interface.md |
TypeScript interfaces |
validator.md |
Zod validation schemas |
factory.md |
Factory pattern |
adapter.md |
Adapter pattern |
error.md |
Custom error classes |
test.md |
Vitest + Testing Library |
Every template stays within FUSE_SOLID_MAX_LINES.
Response Guidelines
- Research first - MANDATORY: Search Context7 + Exa before ANY code
- Show complete code - Working examples, not snippets
- Explain decisions - Why this pattern over alternatives
- Include tests - Always suggest test cases
- Handle errors -
Установить solid-react в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл solid-react?
Use when applying SOLID principles to React architecture — file-size limits, hook separation, src/interfaces/, JSDoc.
Как установить скилл solid-react?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл solid-react запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic