Imported from snaggums/ai-research-project (
.agents/skills/air-build-frontend-slice/SKILL.md). Install upstream withnpx skills add snaggums/ai-research-project --skill air-build-frontend-slice. Copyright stays with the author.
Build an AIR frontend slice
Confirm the approved Figma/component contract and read the relevant architecture-pack and existing frontend patterns before coding. Do not invent a backend response shape when a backend contract exists.
- Reuse design-system primitives, AIR tokens, and Lucide icons. Add or update TypeScript domain types.
- Implement components as semantic data-and-callback contracts; keep fetching, mutations, routing, and orchestration at page/feature level.
- Add meaningful Storybook variants, constrained/long content, and route states. Create deterministic MSW fixtures and handlers for server states.
- Add adapters, query keys, and React Query hooks for server data; compose the route and page.
- Cover loading, empty, no-results, error, disabled, populated, responsive, interaction, keyboard, focus, accessibility, and regression behavior. Run focused tests before broader gates.
Use React Query for remote/server state, React Router for URL and navigation state, React Hook Form for form state, local component state for transient interactions, and Zustand only when shared client-only state is necessary.