Scaffolds React 19/19.2 TypeScript components, pages, hooks, forms, context providers, and reducers using modern idioms (ref-as-prop, useActionState, inline metadata). Rejects deprecated React 18 patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pproenca-dot-skills-1:react-19-component-scaffolderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate React 19/19.2 components, pages, hooks, and supporting files from parameterized templates. Every template enforces the patterns codified in the sibling `react` skill — refs as regular props (never `forwardRef`), Context rendered directly as provider (never `.Provider`), form actions with `useActionState` + `useFormStatus`, inline document metadata, `useSyncExternalStore` for external s...
Generate React 19/19.2 components, pages, hooks, and supporting files from parameterized templates. Every template enforces the patterns codified in the sibling react skill — refs as regular props (never forwardRef), Context rendered directly as provider (never .Provider), form actions with useActionState + useFormStatus, inline document metadata, useSyncExternalStore for external subscriptions, and YMNNAE-compliant hook bodies.
<title>, <meta>, <link>) or resource hints (preload, preconnect, prefetchDNS)All filenames are kebab-case; the exported React identifier ({Name}, use{Name}) is PascalCase / camelCase.
| # | Template | When to use | Files generated |
|---|---|---|---|
| 1 | function-component | Generic reusable component (works in Server or Client) | {name-kebab}.tsx, {name-kebab}.test.tsx |
| 2 | server-component-page | Route page with server data fetch + Suspense + metadata | page.tsx |
| 3 | client-island | 'use client' interactivity nested inside a server page | {name-kebab}-island.tsx, {name-kebab}-island.test.tsx |
| 4 | form-action | Mutation form with useActionState + Zod schema + server action | {name-kebab}-form.tsx, actions.ts, schema.ts |
| 5 | context-provider | Shared state with state/dispatch split and accessor hook | {name-kebab}-context.tsx |
| 6 | custom-hook | YMNNAE-compliant hook (external subscription or composed effect) | use-{name-kebab}.ts, use-{name-kebab}.test.ts |
| 7 | reducer | Typed reducer with discriminated-union actions + exhaustive switch | {name-kebab}-reducer.ts, {name-kebab}-reducer.test.ts |
| 8 | head-and-hints | Document metadata + resource hints for above-the-fold assets | {name-kebab}-head.tsx |
function-component for unqualified "make me a component" requests.assets/templates/{name}.template.references/conventions.md — every template emits code that obeys these conventions.{curly_braces}. Empty placeholders (e.g., {additional_hooks} when there are none) collapse to empty string.config.json (module_path, route_path).ref as a prop rather than forwardRef because…").Common parameters (most templates accept these):
| Parameter | Required | Default | Description |
|---|---|---|---|
name | yes | — | Component / hook / reducer identifier in PascalCase (or camelCase for hooks/reducers). The scaffolder derives file_name (kebab-case) and name_kebab automatically. |
module_path | no | src/components (or from config.json) | Directory under the project root for the generated files |
props | no | [] | List of {name, type, required} — emitted as the props interface |
with_test | no | true | Generate the matching *.test.tsx / *.test.ts file |
with_ref | no | false | Add ref?: Ref<T> to props (templates 1 and 3) |
Template-specific parameters are documented in each template's leading comments.
On first use, populate config.json with project-specific paths so generated files land in the right place. The defaults assume a standard src/-rooted project. To override interactively:
module_path — Where components live (e.g., src/components, app/_components)route_path — Where Server Component pages live (e.g., app/, src/routes/)hooks_path — Where custom hooks live (e.g., src/hooks)test_runner — vitest (default) or jest (changes the imports in test templates)When the user asks to conform, modernize, or align existing components with this skill's conventions across one or more files — not to generate new code — follow references/_conform-algorithm.md instead of going file-by-file.
Two non-negotiables from that doc:
forwardRef, <Context.Provider>, react-helmet, onSubmit=, react-dom/test-utils). Grep finds the easy cases and misses the disguised ones — a manually drilled callback ref because the author dodged forwardRef, a bespoke useState({ pending, error }) that's useActionState without the name, a document.title hand-roll. Use grep for inventory and post-hoc completeness only, never as the primary detector.For brand-new scaffolds, skip this — go straight to a template.
forwardRef(...) wrappers — emits function Name({ ref, ...props }) instead<Context.Provider value={...}> — emits <Context value={...}> insteaduseFormState — emits useActionState insteadonSubmit handlers for mutations — emits <form action={serverAction}> insteaduseRef<T>() without an argument — emits useRef<T>(null)useEffect for derived state, parent notification, or POST-on-state-change — refuses entirely (see conventions: State derivation)react-dom/test-utils — emits import { act } from '@testing-library/react' instead<link rel="preload"> JSX — emits preload() from react-dom insteadreact-helmet / react-helmet-async — emits inline <title>/<meta>/<link> insteadSee gotchas.md. Empty on first release — gotchas accumulate as the skill is used.
react — Authoritative React 19 best-practices distillation (44 rules). The templates in this skill emit code that conforms to those rules.npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin pproenca-dot-skills-1Builds React 18+/19 components, implements state management, debugs rendering, and migrates class components. Activates for Server Components, Suspense boundaries, and React 19 features.
Applies opinionated React 18+/19 conventions for components: hooks patterns, Server Components, Suspense boundaries, state management, performance memoization, use() hook, form actions.
Builds React 18+ components, hooks, and state management. Handles Server Components, Suspense, React 19 features, and Next.js App Router projects.