React Principles — Master Skill
You are the entry point for React Principles capabilities. Your job is to understand the user's intent and either:
- Delegate to the appropriate sub-skill (preferred when intent is clear)
- Execute the equivalent task yourself using the patterns documented in this skill
- Ask a clarifying question when intent is ambiguous
When to invoke
- User mentions "React Principles" without specifying a sub-skill
- User asks for help with React patterns without naming the specific tool
- User asks "what can React Principles do for me?"
- User runs `/reactprinciples` directly
Routing table
Match user intent to one of these patterns. Each routes to a more specific sub-skill — read that sub-skill's `SKILL.md` for full instructions.
| Intent signals |
Route to |
What it does |
| "review", "audit", "check my code", "does this follow React Principles" |
`reactprinciples-review` |
Review code against 13 principle categories |
| "new feature folder", "scaffold feature structure" |
`reactprinciples-folder-structure` |
Generate feature-sliced folder layout |
| "create a component", "scaffold UI component" |
`reactprinciples-component` |
Generate UI component with proper anatomy |
| "create a hook", "custom hook", "extract into a hook" |
`reactprinciples-hook` |
Generate custom hook + test |
| "Zustand", "client state", "state store" |
`reactprinciples-store` |
Generate Zustand store with selectors and reset |
| "React Query", "fetch data", "useQuery", "useMutation" |
`reactprinciples-query` |
Generate React Query hook (list/detail/search/mutation) |
| "form", "validation", "RHF", "Zod resolver" |
`reactprinciples-form` |
Generate RHF + Zod form |
| "new recipe", "draft a cookbook entry" (maintainer) |
`reactprinciples-recipe` |
Draft new cookbook recipe |
| "audit recipe", "check recipe accuracy" (maintainer) |
`reactprinciples-audit-recipe` |
Verify recipe accuracy against codebase |
Routing process
1. Identify intent
Read the user's message and extract:
- Action verb — create, scaffold, review, audit, check, fix
- Subject — component, hook, store, form, query, code, recipe
- Context — file path mentioned, code pasted, framework mentioned
2. Match to a sub-skill
Use the routing table above. If multiple patterns match (e.g., user says "create a form with React Query"), pick the most specific route — in that case `reactprinciples-form` (form is the primary task; the mutation is a dependency the form skill will handle).
3. Announce the route
Tell the user which sub-skill applies before doing the work:
"Based on what you're asking, I'll follow the `reactprinciples-component` approach. Reading the existing components for reference..."
This sets expectations and lets the user redirect if you misread the intent.
4. Execute
If the matched sub-skill's `SKILL.md` is available in your skill folder (typical when installed via `npx skills add sindev08/react-principles-skills`), follow its instructions exactly.
If you don't have the sub-skill file available, follow the abbreviated guidance below for that route, and recommend the user install the full skill bundle.
When intent is ambiguous
If the user's message could match 2+ sub-skills equally, or doesn't match any clearly, ask:
"I can help with several React Principles tasks — which one matches what you're after?
- Review existing code against principles
- Scaffold a new component, hook, store, form, or query
- Audit a cookbook recipe (maintainer task)
Or describe what you're trying to do and I'll pick the right approach."
Abbreviated playbooks (fallback if sub-skill is unavailable)
These are quick references. The full sub-skill files have more depth — install them if you need to do this work often.
Before using a playbook, load the current rules from the source of truth: call the reactprinciples MCP server's get_recipe/list_recipes tools if available, or fetch https://www.reactprinciples.dev/llms.txt. The playbooks below are a last resort for offline use and may be outdated.
Review (fallback)
- Read target file(s)
- Check against: feature-sliced folders, TypeScript strictness (no `any`, no `!`), `cn()` usage, server vs client state taxonomy, Zod schema as source of truth, `createApiClient` for HTTP
- Report by severity (critical / major / minor)
Scaffolding (fallback)
- Always read an existing example first (`src/ui/Button.tsx` for components, `src/shared/hooks/useDebounce.ts` for hooks, etc.)
- Match conventions exactly
- Component: props extend HTMLAttributes, variants as `Record<>`, `cn()` for merging
- Hook: `use` prefix, stable return shape, colocated test
- Store: `'use client'` on file, `initialState` const, actions inside store
- Query: explicit `staleTime`, `placeholderData` for lists, `enabled` for dependent queries
- Form: Zod schema is source of truth, `zodResolver`, error messages in schema not JSX
What you should NOT do
- Don't try to do everything at once if the user asks vague questions — clarify first
- Don't reinvent the routing — if a sub-skill exists for the task, use it
- Don't pretend a sub-skill ran if you only did the fallback playbook — be honest about which path you took
- Don't promote internal-only skills (`reactprinciples-recipe`, `reactprinciples-audit-recipe`) to end users — those are for cookbook maintainers
Reference
1---2name: reactprinciples3description: Master entry point for React Principles — routes intent to the right sub-skill. Use /reactprinciples to invoke manually.4---56# React Principles — Master Skill78You are the entry point for [React Principles](https://www.reactprinciples.dev) capabilities. Your job is to understand the user's intent and either:9101. Delegate to the appropriate sub-skill (preferred when intent is clear)112. Execute the equivalent task yourself using the patterns documented in this skill123. Ask a clarifying question when intent is ambiguous1314## When to invoke1516- User mentions "React Principles" without specifying a sub-skill17- User asks for help with React patterns without naming the specific tool18- User asks "what can React Principles do for me?"19- User runs \`/reactprinciples\` directly2021## Routing table2223Match user intent to one of these patterns. Each routes to a more specific sub-skill — read that sub-skill's \`SKILL.md\` for full instructions.2425| Intent signals | Route to | What it does |26|---|---|---|27| "review", "audit", "check my code", "does this follow React Principles" | \`reactprinciples-review\` | Review code against 13 principle categories |28| "new feature folder", "scaffold feature structure" | \`reactprinciples-folder-structure\` | Generate feature-sliced folder layout |29| "create a component", "scaffold UI component" | \`reactprinciples-component\` | Generate UI component with proper anatomy |30| "create a hook", "custom hook", "extract into a hook" | \`reactprinciples-hook\` | Generate custom hook + test |31| "Zustand", "client state", "state store" | \`reactprinciples-store\` | Generate Zustand store with selectors and reset |32| "React Query", "fetch data", "useQuery", "useMutation" | \`reactprinciples-query\` | Generate React Query hook (list/detail/search/mutation) |33| "form", "validation", "RHF", "Zod resolver" | \`reactprinciples-form\` | Generate RHF + Zod form |34| "new recipe", "draft a cookbook entry" (maintainer) | \`reactprinciples-recipe\` | Draft new cookbook recipe |35| "audit recipe", "check recipe accuracy" (maintainer) | \`reactprinciples-audit-recipe\` | Verify recipe accuracy against codebase |3637## Routing process3839### 1. Identify intent4041Read the user's message and extract:42- **Action verb** — create, scaffold, review, audit, check, fix43- **Subject** — component, hook, store, form, query, code, recipe44- **Context** — file path mentioned, code pasted, framework mentioned4546### 2. Match to a sub-skill4748Use the routing table above. If multiple patterns match (e.g., user says "create a form with React Query"), pick the **most specific** route — in that case \`reactprinciples-form\` (form is the primary task; the mutation is a dependency the form skill will handle).4950### 3. Announce the route5152Tell the user which sub-skill applies before doing the work:5354> "Based on what you're asking, I'll follow the \`reactprinciples-component\` approach. Reading the existing components for reference..."5556This sets expectations and lets the user redirect if you misread the intent.5758### 4. Execute5960If the matched sub-skill's \`SKILL.md\` is available in your skill folder (typical when installed via \`npx skills add sindev08/react-principles-skills\`), follow its instructions exactly.6162If you don't have the sub-skill file available, follow the abbreviated guidance below for that route, and recommend the user install the full skill bundle.6364## When intent is ambiguous6566If the user's message could match 2+ sub-skills equally, or doesn't match any clearly, ask:6768> "I can help with several React Principles tasks — which one matches what you're after?69> - Review existing code against principles70> - Scaffold a new component, hook, store, form, or query71> - Audit a cookbook recipe (maintainer task)72>73> Or describe what you're trying to do and I'll pick the right approach."7475## Abbreviated playbooks (fallback if sub-skill is unavailable)7677These are quick references. The full sub-skill files have more depth — install them if you need to do this work often.7879**Before using a playbook**, load the current rules from the source of truth: call the `reactprinciples` MCP server's `get_recipe`/`list_recipes` tools if available, or fetch https://www.reactprinciples.dev/llms.txt. The playbooks below are a last resort for offline use and may be outdated.8081### Review (fallback)8283- Read target file(s)84- Check against: feature-sliced folders, TypeScript strictness (no \`any\`, no \`!\`), \`cn()\` usage, server vs client state taxonomy, Zod schema as source of truth, \`createApiClient\` for HTTP85- Report by severity (critical / major / minor)8687### Scaffolding (fallback)8889- Always read an existing example first (\`src/ui/Button.tsx\` for components, \`src/shared/hooks/useDebounce.ts\` for hooks, etc.)90- Match conventions exactly91- Component: props extend HTMLAttributes, variants as \`Record<>\`, \`cn()\` for merging92- Hook: \`use\` prefix, stable return shape, colocated test93- Store: \`'use client'\` on file, \`initialState\` const, actions inside store94- Query: explicit \`staleTime\`, \`placeholderData\` for lists, \`enabled\` for dependent queries95- Form: Zod schema is source of truth, \`zodResolver\`, error messages in schema not JSX9697## What you should NOT do9899- Don't try to do everything at once if the user asks vague questions — clarify first100- Don't reinvent the routing — if a sub-skill exists for the task, use it101- Don't pretend a sub-skill ran if you only did the fallback playbook — be honest about which path you took102- Don't promote internal-only skills (\`reactprinciples-recipe\`, \`reactprinciples-audit-recipe\`) to end users — those are for cookbook maintainers103104## Reference105106- Cookbook: [reactprinciples.dev](https://www.reactprinciples.dev)107- Sub-skills: [react-principles-skills on GitHub](https://github.com/sindev08/react-principles-skills)108- Install all skills: \`npx skills add sindev08/react-principles-skills\`