Generate UI specification from requirements and backend API design. Derives screen list, component hierarchy, and user interactions. Triggers: ui, ui spec, screen design
Generates UI specifications with wireframes and component hierarchies from requirements and backend API documents.
/plugin marketplace add samdae/archflow/plugin install archflow@archflow-marketplaceThis skill is limited to using the following tools:
Global Rules: Adheres to
rules/archflow-rules.md.
Model: Opus required. UI derivation needs domain knowledge and pattern matching.
Generate UI specification from requirements + backend API endpoints.
| Tool | Alternative |
|---|---|
| Read | Request user to copy-paste document content |
| AskQuestion | "Select: 1) A 2) B" format |
docs/{serviceName}/
├── spec.md # Input (requirements)
├── arch-be.md # Input (backend API)
└── ui.md # ← This skill's output
Scan docs/, select service, resolve spec.md and arch-be.md paths.
If Service Discovery successful: verify spec.md and arch-be.md exist. Both exist → auto-load. Missing → guide to /spec or /arch.
If Service Discovery failed:
{
"title": "UI Specification",
"questions": [
{
"id": "has_spec",
"prompt": "Do you have a requirements document? (docs/{serviceName}/spec.md)",
"options": [
{"id": "yes", "label": "Yes - I will provide via @filepath"},
{"id": "no", "label": "No - Run /spec first"}
]
},
{
"id": "has_arch_be",
"prompt": "Do you have a backend design document? (docs/{serviceName}/arch-be.md)",
"options": [
{"id": "yes", "label": "Yes - I will provide via @filepath"},
{"id": "no", "label": "No - Run /arch (Backend) first"}
]
}
]
}
Either no → guide to required skill. Both yes → request paths → 0-1.5.
{
"title": "Target Platform",
"questions": [
{
"id": "responsive",
"prompt": "What platforms are you targeting?",
"options": [
{"id": "mobile", "label": "Mobile only - 375px viewport"},
{"id": "desktop", "label": "Desktop only - 1280px+"},
{"id": "responsive", "label": "Both (Responsive) - Mobile First"}
]
}
]
}
Breakpoint hints for responsive:
breakpoints:
mobile: "< 640px"
tablet: "640-1024px"
desktop: "> 1024px"
Record selection in ui.md header, apply to all wireframes.
Extract from path: docs/blog/spec.md → serviceName = "blog" → output: docs/blog/ui.md
Read spec.md (functional requirements) and arch-be.md (API endpoints, schemas).
| Endpoint Pattern | Screen Derivation |
|---|---|
GET /resources | List screen |
GET /resources/:id | Detail screen |
POST /resources | Create form |
PUT /resources/:id | Edit form |
DELETE /resources/:id | Delete confirmation (modal) |
POST /auth/login | Login screen |
POST /auth/register | Registration screen |
Cross-reference spec.md with derived screens. Flag screens without requirements or requirements without screens.
| # | Screen | Route | Related Endpoints | Auth Required | Spec Reference |
|---|---|---|---|---|---|
| 1 | {name} | {route} | {endpoints} | Yes/No | FR-xxx |
"I've derived {N} screens from the API endpoints. Please review:
{Screen List Table}
Should I proceed with detailed UI specifications?"
For each screen:
┌─────────────────────────────────────────────┐
│ [Logo] [Login/Profile] │
├─────────────────────────────────────────────┤
│ │
│ Main content area │
│ │
└─────────────────────────────────────────────┘
{ScreenName}Page:
- Header:
- Logo
- Navigation
- AuthButton
- MainContent:
- {Feature}Section:
- {Component}
- {Component}
- Footer
| State | Trigger | UI Behavior |
|---|---|---|
| loading | Initial fetch | Show skeleton/spinner |
| empty | No data | Show empty state message |
| error | API error | Show error message + retry |
| loaded | Data received | Render content |
| # | Action | Trigger | API Call | Result |
|---|---|---|---|---|
| 1 | {action} | {event} | {endpoint} | {outcome} |
| Component | Used In | Props | Description |
|---|---|---|---|
| Header | All pages | - | Global navigation |
| AuthButton | Header | isLoggedIn, user | Login/profile toggle |
| Pagination | List pages | page, total, onChange | Page navigation |
| ConfirmModal | Delete actions | title, onConfirm | Confirmation dialog |
| LoadingSkeleton | All pages | variant | Loading placeholder |
| EmptyState | List pages | message, action | No data state |
| ErrorMessage | Forms | message | Validation/API error |
recommendation:
ui_library: "{recommended library}"
styling: "{styling approach}"
icons: "{icon library}"
patterns:
layout: "{layout pattern}" # e.g., max-w-4xl mx-auto
spacing: "{spacing system}" # e.g., Tailwind default scale
typography: "{typography approach}" # e.g., prose class for content
# UI Specification: {Feature Name}
> Created: {date}
> Service: {serviceName}
> Platform: {mobile|desktop|responsive}
> Requirements: docs/{serviceName}/spec.md
> Backend API: docs/{serviceName}/arch-be.md
## 0. Responsive Strategy
```yaml
platform: "{type}"
breakpoints: # responsive only
mobile: "< 640px"
tablet: "640-1024px"
desktop: "> 1024px"
approach: "Mobile First"
| # | Screen | Route | Related Endpoints | Auth Required | Spec Reference |
|---|
Purpose: {description} UI Components:
{ASCII wireframe}
Component Hierarchy:
{component tree}
States:
| State | Trigger | UI Behavior |
|---|---|---|
| loading | {behavior} | {detail} |
| empty | {behavior} | {detail} |
| error | {behavior} | {detail} |
| loaded | {behavior} | {detail} |
User Interactions:
| # | Action | Trigger | API Call | Result |
|---|
(Repeat for each screen)
| Component | Props | Usage |
|---|
recommendation:
ui_library: "{lib}"
styling: "{approach}"
icons: "{lib}"
Run
/archFrontend to generate technical architecture. Input:docs/{serviceName}/spec.md+docs/{serviceName}/ui.md
Save: `docs/{serviceName}/ui.md`
## Phase 5: Completion Report
Report: service, screen count, component count, derived-from docs. Next: run `/arch` Frontend.
---
# Integration Flow
[spec] → spec.md ↓ [arch] (Backend) → arch-be.md ↓ [ui] → ui.md ↓ [arch] (Frontend) → arch-fe.md ↓ [build] (Frontend) → Implementation
## Important Notes
1. **Endpoint-driven**: every screen maps to at least one endpoint; screens without endpoints may indicate missing backend features
2. **Domain patterns**: use common UI patterns for the domain (e-commerce, blog, dashboard, etc.)
3. **State handling**: every screen must define all 4 states (loading/empty/error/loaded)
4. **ASCII wireframes**: focus on component structure and hierarchy, not visual design
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.