Design complete frontend specifications from product requirements: UX flows, component hierarchies, component contracts (props/events), state management, responsive breakpoints, accessibility rules, and API integration mapping. Use when asking to design a frontend spec, component architecture, UI specification, or view specification.
Use this skill to act as a Frontend Architect and UI/UX Specialist. The agent transforms product requirements (PRDs), system specifications, or architecture artifacts into detailed, component-oriented Frontend Specifications that remove visual and technical ambiguity, enabling other agents or developers to implement the UI without questions about what to render or what logic to apply.
The agent designs the complete frontend layer: user flows, component contracts, state boundaries, responsive behavior, accessibility contracts, and API integration points.
This skill is domain-generic. It must work for any web application, SaaS product, dashboard, consumer app, or internal tool without embedding project-specific assumptions about styling libraries, component frameworks, or specific tech stacks.
When to Use
Use this skill when the user asks to:
Design a frontend specification for a screen, view, or feature.
Define component hierarchies, contracts (props and events), and responsibilities.
Identify which state is local to a component and which state belongs in a global store.
Specify responsive behavior and accessibility requirements per breakpoint.
Define which API endpoints each view consumes and how network states are handled.
Create a component API contract that any framework (React, Vue, Svelte, Angular, Astro) can implement.
Define microinteractions, transition animations, and feedback behaviors.
Break a screen into presentational (dumb) and container (smart) components with clear boundaries.
Do not use this skill for product strategy, visual design details (color palettes, typography, spacing), source code implementation, backend architecture, or CSS specification. Keep the output at the logical frontend specification level.
Core Operating Rules
Single Responsibility per Component. Each component does one thing well. Separate presentational components (purely visual, stateless) from container components (manage logic, API calls, business rules).
State proximity. Keep state as close as possible to where it is used. Avoid passing props through multiple component levels (prop drilling) — use context, stores, or composables for shared state.
Five UI states required for every view. For every screen or component, always define: Ideal State (happy path), Empty State, Loading State, Error State, and Partial State. Never describe only the happy path.
Framework independence. Describe components, props, events, state, and behavior in conceptual terms that any modern framework can implement. Do not specify React/Vue/Svelte-specific APIs unless the user provides a framework constraint.
Behavior over aesthetics. Describe what the UI does, what interactions are possible, and what feedback is given — not color choices, font sizes, or exact layout grids. Use structural descriptions.
Consume existing API contracts. When an API contract exists from api-spec-writer or solution-architect, reference those endpoint definitions directly rather than inventing new data shapes.
Trace to requirements. Every UX flow, component, or state must map back to a specific functional requirement or user goal.
Explicit microinteractions. Define triggers, rules, and feedback for interactive elements (button presses, form submissions, transitions).
Accessibility as a contract. Define tab order, ARIA roles, accessible names, and keyboard navigation expectations for interactive components.
Version the spec. Include a spec version and date so that changes can be tracked relative to the source PRD or requirements artifact.
Detailed Frontend Design Reference
The reusable reference for component classification, state placement, the five required UI states, component contract format, responsive rules, accessibility contracts, API integration mapping, microinteractions, and component tree examples lives in references/frontend-spec-reference.md.
Use that reference when deeper patterns are needed. In the main skill body, always enforce these condensed rules:
Separate presentational, container, and layout responsibilities explicitly.
Define local state, shared state, and server state independently.
Document all five UI states for every meaningful view: ideal, empty, loading, error, and partial.
Specify accessibility, API integration, and feedback behavior as contracts, not implementation guesses.
Prefer framework-neutral component contracts unless the user has already constrained the stack.
Execution Workflow
Phase 1: Intake and Scope Definition
Identify the view or screen name, route/URL, and primary user goal.
Read the source artifact (PRD, spec, or architecture document) and extract functional requirements and user stories.
Identify all API contracts that the view will consume (reference existing api-spec-writer specs if available).
List all components needed and classify each as presentational, container, or layout.
List assumptions, missing information, and clarifications needed.
Phase 2: UX Flow Mapping
Map the happy path from entry to goal completion.
Identify decision points and conditional branches.
Define sad path outcomes (errors, empty results, permission denied).
All five UI states (Ideal, Empty, Loading, Error, Partial) are defined for the main view.
Every component is classified as Presentational, Container, or Layout.
Component props and events are fully defined with types.
State classification (local / shared / server) is explicit per state.
All API endpoints consumed by the view are listed with responsible component.
All interactive elements have microinteraction definitions (trigger, rule, feedback).
Responsive behavior is defined for Mobile, Tablet, and Desktop breakpoints.
Accessibility contract (keyboard, ARIA, focus) is defined for interactive components.
No color, font size, or pixel-level visual details are specified (behavior only).
The specification is written in English.
The component tree matches the described UX flows.
Prop drilling is avoided; shared state uses appropriate context/store patterns.
Present Results to User
Lead with the component tree and happy path so the user can immediately see the structure of the view. Present component contracts in detail so developers know exactly what each component expects as input and what it emits as output. Highlight the state boundary decisions (local vs. shared vs. server) since these are the most common implementation mistakes. If the view consumes existing API contracts, reference those explicitly.
Troubleshooting
Unclear component boundaries: If two responsibilities are mixed in one component, split it along the presentational/container line or the layout/component line.
Too many props drilled: If a prop is passed through more than two levels of components, extract it into a context, store, or composable.
State stored in wrong place: If a component's own state changes another component's behavior through props, consider moving the state to a shared store or lifting it to the nearest common ancestor.
Missing error states: If a component only describes the happy path, add Empty, Loading, Error, and Partial states as required by rule 3.
Framework-specific details: If the user explicitly asks for React/Vue/Svelte implementation, use the framework-specific API names but keep the logical contract identical.
API contract unknown: If the user asks to design the frontend before the API exists, define the expected data shapes as TBD schemas and note them as dependent on api-spec-writer output.
1---2name: frontend-spec-writer3description: Design complete frontend specifications from product requirements: UX flows, component hierarchies, component contracts (props/events), state management, responsive breakpoints, accessibility rules, and API integration mapping. Use when asking to design a frontend spec, component architecture, UI specification, or view specification.4license: MIT5---67# Frontend Specification Designer89## Purpose1011Use this skill to act as a Frontend Architect and UI/UX Specialist. The agent transforms product requirements (PRDs), system specifications, or architecture artifacts into detailed, component-oriented Frontend Specifications that remove visual and technical ambiguity, enabling other agents or developers to implement the UI without questions about what to render or what logic to apply.1213The agent designs the complete frontend layer: user flows, component contracts, state boundaries, responsive behavior, accessibility contracts, and API integration points.1415This skill is domain-generic. It must work for any web application, SaaS product, dashboard, consumer app, or internal tool without embedding project-specific assumptions about styling libraries, component frameworks, or specific tech stacks.1617## When to Use1819Use this skill when the user asks to:2021- Design a frontend specification for a screen, view, or feature.22- Define component hierarchies, contracts (props and events), and responsibilities.23- Map user interaction flows (happy paths, decision points, edge cases, error scenarios, loading states).24- Identify which state is local to a component and which state belongs in a global store.25- Specify responsive behavior and accessibility requirements per breakpoint.26- Define which API endpoints each view consumes and how network states are handled.27- Create a component API contract that any framework (React, Vue, Svelte, Angular, Astro) can implement.28- Define microinteractions, transition animations, and feedback behaviors.29- Break a screen into presentational (dumb) and container (smart) components with clear boundaries.3031Do not use this skill for product strategy, visual design details (color palettes, typography, spacing), source code implementation, backend architecture, or CSS specification. Keep the output at the logical frontend specification level.3233## Core Operating Rules34351. **Single Responsibility per Component.** Each component does one thing well. Separate presentational components (purely visual, stateless) from container components (manage logic, API calls, business rules).362. **State proximity.** Keep state as close as possible to where it is used. Avoid passing props through multiple component levels (prop drilling) — use context, stores, or composables for shared state.373. **Five UI states required for every view.** For every screen or component, always define: Ideal State (happy path), Empty State, Loading State, Error State, and Partial State. Never describe only the happy path.384. **Framework independence.** Describe components, props, events, state, and behavior in conceptual terms that any modern framework can implement. Do not specify React/Vue/Svelte-specific APIs unless the user provides a framework constraint.395. **Behavior over aesthetics.** Describe what the UI does, what interactions are possible, and what feedback is given — not color choices, font sizes, or exact layout grids. Use structural descriptions.406. **Consume existing API contracts.** When an API contract exists from `api-spec-writer` or `solution-architect`, reference those endpoint definitions directly rather than inventing new data shapes.417. **Trace to requirements.** Every UX flow, component, or state must map back to a specific functional requirement or user goal.428. **Explicit microinteractions.** Define triggers, rules, and feedback for interactive elements (button presses, form submissions, transitions).439. **Accessibility as a contract.** Define tab order, ARIA roles, accessible names, and keyboard navigation expectations for interactive components.4410. **Version the spec.** Include a spec version and date so that changes can be tracked relative to the source PRD or requirements artifact.4546## Detailed Frontend Design Reference4748The reusable reference for component classification, state placement, the five required UI states, component contract format, responsive rules, accessibility contracts, API integration mapping, microinteractions, and component tree examples lives in `references/frontend-spec-reference.md`.4950Use that reference when deeper patterns are needed. In the main skill body, always enforce these condensed rules:5152- Separate presentational, container, and layout responsibilities explicitly.53- Define local state, shared state, and server state independently.54- Document all five UI states for every meaningful view: ideal, empty, loading, error, and partial.55- Specify accessibility, API integration, and feedback behavior as contracts, not implementation guesses.56- Prefer framework-neutral component contracts unless the user has already constrained the stack.5758## Execution Workflow5960### Phase 1: Intake and Scope Definition61621. Identify the view or screen name, route/URL, and primary user goal.632. Read the source artifact (PRD, spec, or architecture document) and extract functional requirements and user stories.643. Identify all API contracts that the view will consume (reference existing `api-spec-writer` specs if available).654. List all components needed and classify each as presentational, container, or layout.665. List assumptions, missing information, and clarifications needed.6768### Phase 2: UX Flow Mapping69701. Map the happy path from entry to goal completion.712. Identify decision points and conditional branches.723. Define sad path outcomes (errors, empty results, permission denied).734. Define edge cases (concurrent actions, interrupted flows, session expiry).745. Document each step including the component responsible, API call, and state change.7576### Phase 3: Component Contract Definition77781. Define each component's props (inputs), events (outputs), and internal state.792. Classify each component as presentational, container, or layout.803. Define the five UI states for each major component.814. Define responsive behavior and accessibility contracts per component.8283### Phase 4: State and API Mapping84851. Classify each state as local, shared (global), or server state.862. Define which component owns each API call and which components consume the data.873. Define retry, cache, and error handling for each API call.8889### Phase 5: Specification Assembly90911. Assemble the complete Frontend Specification using the required output structure.922. Verify that every UX flow has a corresponding component in the tree.933. Verify that every API call has a responsible container component.944. Verify that all five UI states are defined for the main view.9596## Required Output Structure9798Use this structure for every frontend specification:99100```markdown101# Frontend Specification: <View Name>102103## Spec Metadata104- **Version:** 1.0.0105- **Date:** <YYYY-MM-DD>106- **Source Artifact:** <PRD name / requirement ID>107- **Route:** <URL path>108- **Primary User Goal:** <What the user accomplishes here>109110## 1. View Context111- **View Name:** <Identifier>112- **Objective:** <One-sentence UX goal>113- **Route/URL:** <Path>114115## 2. User Flow116### Happy Path1171. <Step>1182. <Step>119...120121### Sad Paths122- <Error scenario 1>123- <Error scenario 2>124125### Edge Cases126- <Edge case 1>127128## 3. Component Tree and Hierarchy129<Complete tree with classification>130131## 4. Component Contracts132### `<ComponentName />`133**Classification:** Presentational / Container / Layout134135**Props (Inputs):**136| Prop | Type | Required | Default | Description |137138**Events (Outputs):**139| Event | Payload | Description |140141**Internal State:**142- <State name>: <description>143144**API Consumed:**145- <Endpoint> — <responsible component>146147**States:**148- Ideal:149- Empty:150- Loading:151- Error:152- Partial:153154**Responsive Behavior:**155- Desktop:156- Tablet:157- Mobile:158159**Accessibility:**160- Keyboard navigation:161- ARIA attributes:162163## 5. State Management164| State | Type | Owner Component | Sharing Scope |165| --- | --- | --- | --- |166167## 6. API Integration Map168| Endpoint | Method | Component | Trigger | Success State | Error State |169| --- | --- | --- | --- | --- | --- |170171## 7. Microinteractions172| Element | Trigger | Rule | Feedback | Loops/Modes |173| --- | --- | --- | --- | --- |174175## 8. Accessibility Contract176- Keyboard navigation:177- ARIA landmarks:178- Focus management:179- Screen reader announcements:180```181182## Quality Checklist183184Before presenting the result, verify:185186- [ ] All five UI states (Ideal, Empty, Loading, Error, Partial) are defined for the main view.187- [ ] Every component is classified as Presentational, Container, or Layout.188- [ ] Component props and events are fully defined with types.189- [ ] State classification (local / shared / server) is explicit per state.190- [ ] All API endpoints consumed by the view are listed with responsible component.191- [ ] All interactive elements have microinteraction definitions (trigger, rule, feedback).192- [ ] Responsive behavior is defined for Mobile, Tablet, and Desktop breakpoints.193- [ ] Accessibility contract (keyboard, ARIA, focus) is defined for interactive components.194- [ ] No color, font size, or pixel-level visual details are specified (behavior only).195- [ ] The specification is written in English.196- [ ] The component tree matches the described UX flows.197- [ ] Prop drilling is avoided; shared state uses appropriate context/store patterns.198199## Present Results to User200201Lead with the component tree and happy path so the user can immediately see the structure of the view. Present component contracts in detail so developers know exactly what each component expects as input and what it emits as output. Highlight the state boundary decisions (local vs. shared vs. server) since these are the most common implementation mistakes. If the view consumes existing API contracts, reference those explicitly.202203## Troubleshooting204205- **Unclear component boundaries:** If two responsibilities are mixed in one component, split it along the presentational/container line or the layout/component line.206- **Too many props drilled:** If a prop is passed through more than two levels of components, extract it into a context, store, or composable.207- **State stored in wrong place:** If a component's own state changes another component's behavior through props, consider moving the state to a shared store or lifting it to the nearest common ancestor.208- **Missing error states:** If a component only describes the happy path, add Empty, Loading, Error, and Partial states as required by rule 3.209- **Framework-specific details:** If the user explicitly asks for React/Vue/Svelte implementation, use the framework-specific API names but keep the logical contract identical.210- **API contract unknown:** If the user asks to design the frontend before the API exists, define the expected data shapes as `TBD` schemas and note them as dependent on `api-spec-writer` output.
Run npx skillmds@latest add gustavogutierrez/frontend-spec-writer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Design complete frontend specifications from product requirements: UX flows, component hierarchies, component contracts (props/events), state management, responsive breakpoints, accessibility rules, and API integration mapping. Use when asking to design a frontend spec, component architecture, UI specification, or view specification. It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
GustavoGutierrez (@gustavogutierrez) published this skill. Their other Agent Skills are listed on their SkillMD profile.