UX Analyst
Transform prototype demos from "visual representation" into "behavioral semantics". This skill translates UI mockups into executable behavioral specifications that engineers and other AI agents can use to implement features.
When to Use
Use this skill when:
- User provides Figma links, screenshots, videos, or HTML demos
- User wants to understand how pages/screens behave
- Converting visual designs to implementation requirements
- Before writing SPEC or technical implementation
- Any request to analyze or document user interactions and flows
Workflow
- Check what visual/behavioral inputs are available (Figma, screenshots, video, HTML, PRD)
- If no visual input exists, ask the user to provide one before proceeding
- If scope is unclear (too many screens, ambiguous priority), ask one question to narrow it
- Analyze inputs — extract page purposes, entry/exit conditions, key actions, states
- Write
prd/UX-FLOWS.md to disk (and prd/SCREEN-INVENTORY.md if scope warrants it)
- Report file path(s) and ask if any page behavior needs clarification
Input
This skill accepts:
- PRD (optional but recommended for context)
- Figma designs or links
- HTML/CSS demos
- Screenshots
- Videos of interactions
- User flow diagrams
- Wireframes
Output Documents
Generate these documents in prd/ directory (or user-specified location):
- Required:
prd/UX-FLOWS.md - Main behavioral specification
- Optional:
prd/SCREEN-INVENTORY.md - Screen/Page inventory if the system has many screens
UX-FLOWS.md Structure
1. Document Overview
Briefly describe:
- What this document covers
- Number of key screens/pages
- High-level user journey
2. Screen/Page Definitions
For each key screen/page, document:
2.1 Page Purpose
- What is this page's goal?
- Who uses it?
- What business problem does it solve?
2.2 Entry Conditions
- How does user arrive at this page?
- What must be true before this page is accessible?
- Any authentication/authorization requirements?
- Any prerequisite states (e.g., "must have completed step 1")?
2.3 Exit Conditions
- What triggers leaving this page?
- Where does user go next?
- Are there multiple exit paths?
2.4 Key Actions (Business-Level)
NOT just "click submit button" - describe the business semantics:
| Action |
When Enabled |
State Change |
Failure Handling |
Success Behavior |
Recovery |
| Submit form |
All required fields filled |
Advances to "pending_review" |
Show validation errors |
Redirect to list page |
Resume from last saved draft |
| Delete item |
User has delete permission |
Marks as "archived" |
Show error toast, keep page |
Refresh list, show success toast |
None (soft delete) |
| Approve request |
Request in "pending" state |
Advances to "approved" |
Show error with reason |
Navigate to next item |
Can revert within 24h |
For each action, always specify:
- When Enabled: Under what conditions can this action be triggered?
- State Change: Does this action advance/modify the business state?
- Failure Handling: What happens on failure? What error messages?
- Success Behavior: What happens on success? Page redirect? Toast? State update?
- Recovery: Can interrupted flows be resumed?
2.5 User-Visible States
Document all states the user can see:
- Loading states (what shows while fetching?)
- Empty states (what if no data?)
- Error states (what if something fails?)
- Success states (what confirms completion?)
- Draft/In-progress states (can user save and return later?)
2.6 Blocking Conditions
What prevents user from proceeding?
- Permission checks
- Prerequisites not met
- Business rule blocks (e.g., "cannot submit after deadline")
- System unavailability
- Rate limiting
For each blocking condition:
- What triggers the block?
- What does user see?
- How to resolve?
2.7 Error/Exception Scenarios
What can go wrong and how is it communicated?
- Network errors
- Validation failures
- Permission denied
- Concurrent modification conflicts
- Timeout scenarios
- Service unavailable
For each error:
- User-facing message
- Whether action can be retried
- Whether data is preserved
- Any compensation action needed
Writing Principles
DO: Write Behavior, Not UI
Bad:
- "Click the Submit button"
- "The form has Name and Email fields"
- "Show a success message"
Good:
- "Submit button becomes enabled only when all required fields have valid values and no validation errors exist"
- "Upon submission, advances order to 'pending_review' state; on failure, displays field-level validation errors and preserves all entered data"
- "On success, displays toast notification for 3 seconds, then redirects to /orders with success filter applied"
DO: Include State Transitions
For each action that changes state, document:
Action: Submit Order
Pre-condition: All required fields valid AND order total > 0
Post-state: draft → pending_review
Side effects:
- Order number generated
- Confirmation email queued
- Inventory reserved for 15 minutes
DO: Define Entry/Exit Criteria
Every page should answer:
- How do I get here? (entry)
- What happens next? (exit)
- What blocks me? (blocking)
DON'T: Describe Layout Details
Focus on behavior, not:
- "Button is in top-right corner"
- "The form uses a two-column layout"
- "Card has shadow and rounded corners"
DON'T: Use Generic Actions
Be specific about what each action does:
- "Process submission" - what exactly happens?
- "Show message" - what message, in what context?
- "Save data" - where, with what validation?
SCREEN-INVENTORY.md (Optional)
Use when system has many screens. Structure:
Screen List
| Screen ID |
Screen Name |
Route/URL |
Primary User Role |
Purpose |
| S1 |
Order List |
/orders |
Customer |
View and manage orders |
| S2 |
Order Detail |
/orders/:id |
Customer |
View order details |
| S3 |
Order Edit |
/orders/:id/edit |
Customer |
Modify order |
| S4 |
Order Create |
/orders/new |
Customer |
Create new order |
Navigation Map
Document how screens connect:
S1 (List) → S2 (Detail) → S3 (Edit)
S1 (List) → S4 (Create)
S2 (Detail) → S3 (Edit)
Completion Criteria
Output Location
Default: prd/UX-FLOWS.md and prd/SCREEN-INVENTORY.md
Follow user's specified location if provided.
Always write to disk. Do not output UX files only in the conversation.
1---2name: ux-analyst3description: Transform prototype demos from visual representations into behavioral semantics. Use when users provide Figma designs, HTML demos, screenshots, videos, or any UI mockups and need them converted into structured UX flow documents. Trigger on requests like analyze UX, convert demo to flows, write UX-FLOWS, describe user interactions, map screen behaviors, understand page transitions, ux分析, 写 UX 流程, 页面行为分析, 用户流程语义化, or translate prototype to behavior.4---56# UX Analyst78Transform prototype demos from "visual representation" into "behavioral semantics". This skill translates UI mockups into executable behavioral specifications that engineers and other AI agents can use to implement features.910<HARD-GATE>11Do not write `prd/UX-FLOWS.md` until at least one visual or behavioral input has been provided (Figma, screenshot, video, HTML demo, or wireframe).12If no visual input exists, ask the user to provide one before proceeding.13If input exists but the scope (which pages/screens to cover) is unclear, ask one clarifying question first.14</HARD-GATE>1516## When to Use1718Use this skill when:19- User provides Figma links, screenshots, videos, or HTML demos20- User wants to understand how pages/screens behave21- Converting visual designs to implementation requirements22- Before writing SPEC or technical implementation23- Any request to analyze or document user interactions and flows2425## Workflow26271. Check what visual/behavioral inputs are available (Figma, screenshots, video, HTML, PRD)282. If no visual input exists, ask the user to provide one before proceeding293. If scope is unclear (too many screens, ambiguous priority), ask one question to narrow it304. Analyze inputs — extract page purposes, entry/exit conditions, key actions, states315. Write `prd/UX-FLOWS.md` to disk (and `prd/SCREEN-INVENTORY.md` if scope warrants it)326. Report file path(s) and ask if any page behavior needs clarification3334## Input3536This skill accepts:37- PRD (optional but recommended for context)38- Figma designs or links39- HTML/CSS demos40- Screenshots41- Videos of interactions42- User flow diagrams43- Wireframes4445## Output Documents4647Generate these documents in `prd/` directory (or user-specified location):48491. **Required**: `prd/UX-FLOWS.md` - Main behavioral specification502. **Optional**: `prd/SCREEN-INVENTORY.md` - Screen/Page inventory if the system has many screens5152## UX-FLOWS.md Structure5354### 1. Document Overview5556Briefly describe:57- What this document covers58- Number of key screens/pages59- High-level user journey6061### 2. Screen/Page Definitions6263For **each key screen/page**, document:6465#### 2.1 Page Purpose66- What is this page's goal?67- Who uses it?68- What business problem does it solve?6970#### 2.2 Entry Conditions71- How does user arrive at this page?72- What must be true before this page is accessible?73- Any authentication/authorization requirements?74- Any prerequisite states (e.g., "must have completed step 1")?7576#### 2.3 Exit Conditions77- What triggers leaving this page?78- Where does user go next?79- Are there multiple exit paths?8081#### 2.4 Key Actions (Business-Level)8283**NOT just "click submit button"** - describe the business semantics:8485| Action | When Enabled | State Change | Failure Handling | Success Behavior | Recovery |86|--------|--------------|--------------|------------------|-------------------|----------|87| Submit form | All required fields filled | Advances to "pending_review" | Show validation errors | Redirect to list page | Resume from last saved draft |88| Delete item | User has delete permission | Marks as "archived" | Show error toast, keep page | Refresh list, show success toast | None (soft delete) |89| Approve request | Request in "pending" state | Advances to "approved" | Show error with reason | Navigate to next item | Can revert within 24h |9091For each action, always specify:92- **When Enabled**: Under what conditions can this action be triggered?93- **State Change**: Does this action advance/modify the business state?94- **Failure Handling**: What happens on failure? What error messages?95- **Success Behavior**: What happens on success? Page redirect? Toast? State update?96- **Recovery**: Can interrupted flows be resumed?9798#### 2.5 User-Visible States99100Document all states the user can see:101- Loading states (what shows while fetching?)102- Empty states (what if no data?)103- Error states (what if something fails?)104- Success states (what confirms completion?)105- Draft/In-progress states (can user save and return later?)106107#### 2.6 Blocking Conditions108109What prevents user from proceeding?110- Permission checks111- Prerequisites not met112- Business rule blocks (e.g., "cannot submit after deadline")113- System unavailability114- Rate limiting115116For each blocking condition:117- What triggers the block?118- What does user see?119- How to resolve?120121#### 2.7 Error/Exception Scenarios122123What can go wrong and how is it communicated?124- Network errors125- Validation failures126- Permission denied127- Concurrent modification conflicts128- Timeout scenarios129- Service unavailable130131For each error:132- User-facing message133- Whether action can be retried134- Whether data is preserved135- Any compensation action needed136137## Writing Principles138139### DO: Write Behavior, Not UI140141**Bad:**142- "Click the Submit button"143- "The form has Name and Email fields"144- "Show a success message"145146**Good:**147- "Submit button becomes enabled only when all required fields have valid values and no validation errors exist"148- "Upon submission, advances order to 'pending_review' state; on failure, displays field-level validation errors and preserves all entered data"149- "On success, displays toast notification for 3 seconds, then redirects to /orders with success filter applied"150151### DO: Include State Transitions152153For each action that changes state, document:154```155Action: Submit Order156Pre-condition: All required fields valid AND order total > 0157Post-state: draft → pending_review158Side effects:159 - Order number generated160 - Confirmation email queued161 - Inventory reserved for 15 minutes162```163164### DO: Define Entry/Exit Criteria165166Every page should answer:167- How do I get here? (entry)168- What happens next? (exit)169- What blocks me? (blocking)170171### DON'T: Describe Layout Details172173Focus on behavior, not:174- "Button is in top-right corner"175- "The form uses a two-column layout"176- "Card has shadow and rounded corners"177178### DON'T: Use Generic Actions179180Be specific about what each action does:181- "Process submission" - what exactly happens?182- "Show message" - what message, in what context?183- "Save data" - where, with what validation?184185## SCREEN-INVENTORY.md (Optional)186187Use when system has many screens. Structure:188189### Screen List190191| Screen ID | Screen Name | Route/URL | Primary User Role | Purpose |192|-----------|-------------|------------|-------------------|---------|193| S1 | Order List | /orders | Customer | View and manage orders |194| S2 | Order Detail | /orders/:id | Customer | View order details |195| S3 | Order Edit | /orders/:id/edit | Customer | Modify order |196| S4 | Order Create | /orders/new | Customer | Create new order |197198### Navigation Map199200Document how screens connect:201```202S1 (List) → S2 (Detail) → S3 (Edit)203S1 (List) → S4 (Create)204S2 (Detail) → S3 (Edit)205```206207## Completion Criteria208209- [x] Every key screen has clear purpose documented210- [x] Entry conditions specified for each screen211- [x] Exit conditions specified for each screen212- [x] All key actions documented with:213 - When enabled (preconditions)214 - State changes (if any)215 - Failure handling216 - Success behavior217 - Recovery options218- [x] User-visible states documented219- [x] Blocking conditions identified220- [x] Error scenarios covered221- [x] No generic "click X" descriptions - all are business-level behaviors222- [x] Pages are业务流程 nodes, not just UI screenshots223224## Output Location225226Default: `prd/UX-FLOWS.md` and `prd/SCREEN-INVENTORY.md`227228Follow user's specified location if provided.229230**Always write to disk. Do not output UX files only in the conversation.**