一键导入
react-design-patterns
Implementation patterns for AFENDA-HYBRID React code: custom hooks, compound components, error boundaries / error.tsx, forms, server actions, and optimistic updates.
菜单
Implementation patterns for AFENDA-HYBRID React code: custom hooks, compound components, error boundaries / error.tsx, forms, server actions, and optimistic updates.
Accessibility for React UIs in AFENDA-HYBRID: semantic HTML, ARIA, keyboard support, focus management, and testing. Use for grids, dialogs, bulk selection, notifications, and command surfaces.
React and Next.js App Router architecture for AFENDA-HYBRID: Server vs Client Components, composition, state placement, package layering (ui-core → view-engine → erp-view-pack → apps/web). Use when designing components, fixing import/layer violations, or RSC boundaries.
React performance for AFENDA-HYBRID: runtime rendering (re-renders, keys, virtualization) and build-time delivery (bundles, tree-shaking, code splitting, compiler directives). Use when fixing slow lists, grids, or large client bundles.
Meta-skill: React Quality Orchestrator for AFENDA-HYBRID. Coordinates architecture, performance, accessibility, and design-pattern skills for audits, scoring (Component Quality Index), and confidence-tiered refactors. Use for full-route reviews, legacy refactors, and governance checks.
Official Storybook AI workflow — MCP server, manifests, MCP toolsets (development, docs, testing), and documentation best practices. Use when writing or fixing stories, connecting agents to Storybook, using design-system components without guessing props, or running Storybook tests from an agent. Sources are linked inline.
Vitest (Vite-powered) testing — Jest-compatible API, vi mocks, coverage, environments, projects/workspaces. Use when writing or fixing tests, vitest.config.ts, coverage, or monorepo test commands in AFENDA-HYBRID (@afenda/db, @afenda/ui-core, view-engine, erp-view-pack). Prefer https://vitest.dev for Vitest 4.x when reference snippets disagree.
| name | react-design-patterns |
| description | Implementation patterns for AFENDA-HYBRID React code: custom hooks, compound components, error boundaries / error.tsx, forms, server actions, and optimistic updates. |
| metadata | {"author":"AFENDA team","version":"2026.03.23","source":"React docs + AFENDA-HYBRID codebase analysis","official_docs":"https://react.dev"} |
This skill bridges generic React patterns with how AFENDA ships UI: Radix-style primitives in ui-core, metadata-driven views, ERP chrome, and Next.js server actions in the app.
Provenance: see GENERATION.md.
| Topic | Description | Reference |
|---|---|---|
| Hooks | Naming, composition, dependencies | hooks-patterns |
| Compound components | Context + subcomponents | compound-components |
| Errors | Boundaries, error.tsx, recovery | error-boundaries |
| Forms | Validation, server actions, optimistic UI | form-patterns |
This skill does not:
@afenda/db)| Area | Enforce |
|---|---|
| ui-core | Hooks are generic (e.g. use-debounce, use-media-query); no app-specific server action imports |
| view-engine | Widgets remain controlled/presentational; validation messages map from metadata where applicable |
| erp-view-pack | Pattern components compose ui-core + view-engine; follow _CONVENTIONS.md for "use client" and cn() |
| apps/web | Server actions live under src/lib/actions or colocated patterns; forms use shared validation helpers when present |