From swiftui
Interactive design exploration for SwiftUI screens. Generates 5 variants exploring hierarchy, layout, density, interaction, and brand expression. Triggers on: design screen, explore designs, variant exploration, design direction, try different layouts, design options.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swiftui:beepus-maximus-swiftui-design-screenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running an interactive design exploration workflow. Your job is to help the user explore multiple design directions for a SwiftUI screen, collect feedback, and synthesize a polished final view.
You are running an interactive design exploration workflow. Your job is to help the user explore multiple design directions for a SwiftUI screen, collect feedback, and synthesize a polished final view.
This workflow is about EXPLORATION, not implementation. The output is one polished SwiftUI view, not a full feature.
Before designing anything, answer ONE question:
What does the user SEE in the first half-second — before they read a single word?
This is not about content. It's about the SHAPE of the screen. What dominates?
If your answer is "a List with rows of text" → STOP. That's a spreadsheet, not an app. Go back and find the visual shape.
Write the 0.5-second answer as a comment at the top of every variant:
// 0.5s: Four warm gradient cards stacked on black — a cookbook
This single sentence anchors every decision that follows. If the code you write doesn't produce that shape, something went wrong. Include the 0.5-second answer in the design brief under "half_second_shape".
Before anything else, do all of the following:
Load design memory. Check if .claude/design-memory.md exists. If it does, read it in full. Apply any stored decisions (density preferences, colour choices, interaction conventions) as constraints on all variants you generate. If a stored decision conflicts with something the user requests during the interview, surface the conflict and ask which to keep.
Read project design docs. Read all of these:
Detect scope. From the user's initial message, determine:
Load feature spec. If the screen belongs to a feature with a specification in the project specifications or requirements documents, read it. The spec constrains what data the screen must display and what interactions it must support. Do not design against the spec.
Report preflight results. Tell the user:
Then proceed to Phase 1.
Apply this lens across ALL phases — it is not a separate step but a filter on every design decision.
Users compress an entire experience into two moments: the peak (most intense/emotional) and the end (final impression). Design both deliberately.
During the interview (Phase 1): Ask yourself — what is this screen's peak moment? Is it completing a core task, hitting a milestone, seeing a personalised insight, or finding what they need?
During variant generation (Phase 3): Every variant should have an identifiable peak moment and a considered ending. Even information-heavy screens have a moment the user cares about most — make that moment feel rewarding.
During review (Phase 7): Check that the final design has:
When users take actions, give emotional feedback, not just functional feedback:
Apply this when designing interaction states in Variants D (Interaction Model) and E (Brand Expression) especially.
Ask exactly 5 questions, one at a time. Wait for the user's answer before asking the next question. If the user says "skip interview" or provides all context inline in their initial message, extract answers from what they provided and skip to Phase 2 — do not force questions they already answered.
Adapt the questions based on preflight findings. If you loaded design memory that already answers a question, state the stored decision and ask if it still applies instead of asking from scratch.
"What screen or component are we designing? What data does it display and what actions does it support?"
If preflight already identified the screen and spec, summarise what you found and ask the user to confirm or adjust.
"What's wrong with the current design?" (skip if new screen) "What apps inspire the feel you want? Pick from these or name your own:"
"Pick the position on each axis that fits your vision:"
"On a density scale of 1 (very spacious) to 5 (very compact), where should this screen land?"
"Where does this screen sit in the app's navigation? What screen comes before it and after it? Is it a root tab view, a pushed detail, a sheet, or something else?"
After collecting all answers, create a structured brief at .claude/design-brief.json:
{
"screen": "name of screen",
"type": "new | redesign",
"feature": "feature name if applicable",
"spec": "path to spec or null",
"existing_file": "path to existing view or null",
"data_requirements": ["what the screen must display"],
"interaction_requirements": ["what actions it must support"],
"pain_points": ["current issues, if redesign"],
"inspiration": ["app names"],
"style": {
"clinical_warm": "value from -2 to 2",
"dense_breathing": "value from -2 to 2",
"minimal_rich": "value from -2 to 2",
"playful_serious": "value from -2 to 2",
"density": "1-5"
},
"constraints": {
"ipad": true,
"accessibility_priority": "standard | high | maximum",
"dynamic_type_range": "default | constrained",
"dark_mode_parity": "must-ship | nice-to-have"
},
"navigation_context": {
"position": "root | pushed | sheet | tab",
"before": "screen name or null",
"after": "screen name or null"
},
"half_second_shape": "the 0.5-second visual shape answer from Phase 0",
"design_memory_constraints": ["any constraints from design-memory.md"],
"emotional_design": {
"peak_moment": "what is this screen's most emotionally significant moment",
"ending": "how does the user leave this screen — what's the last impression",
"negative_peaks": ["wait states, error states, or friction points to transform"]
}
}
Tell the user the brief has been saved and summarise it in one paragraph. Then proceed to Phase 3.
Generate 5 SwiftUI view variants in a single temporary file at the feature's location. Use the naming convention {ScreenName}DesignExploration.swift. If no feature location is clear, place it at a DesignExploration/ directory near the relevant feature code.
Each variant must:
swiftui-view-guidelines.mdBefore writing each variant, mentally run through:
swiftui-components skill — pick the right container and components for this variant's approach.ios-hig-quick skill — validate navigation pattern, feedback type, and container choice.swiftui-anti-slop banlist — ensure no banned patterns appear.Explore how information is prioritised on the screen. Try:
One-line summary for the user: what hierarchy strategy this variant uses.
Try a fundamentally different container and grouping strategy. Try:
List vs ScrollView + LazyVGrid vs Form vs custom LayoutOne-line summary: what container and grouping strategy this variant uses.
Build the OPPOSITE density of what the user requested. If they said "breathing" (density 1-2), build compact (density 4-5). If they said "dense" (density 4-5), build spacious (density 1-2). If they said moderate (3), build both extremes and pick the more interesting one.
The purpose is to show tradeoffs the user might not have considered. More density means more information at a glance; more breathing room means easier scanning and a calmer feel.
One-line summary: what density tradeoff this variant demonstrates.
Try different interaction patterns for the same data:
One-line summary: what interaction pattern this variant explores.
Push the visual personality further than the other variants. Try:
One-line summary: what visual personality element this variant pushes.
Structure the file so each variant is a separate struct with its own #Preview:
// MARK: - Variant A: Information Hierarchy
struct {ScreenName}VariantA: View { ... }
#Preview("{ScreenName} — Variant A: Information Hierarchy") { ... }
// MARK: - Variant B: Layout Model
struct {ScreenName}VariantB: View { ... }
#Preview("{ScreenName} — Variant B: Layout Model") { ... }
// ... and so on for C, D, E
## Design Variants
**Variant A — Information Hierarchy**
[screenshot if available]
[one-line description of what this variant explores]
**Variant B — Layout Model**
[screenshot if available]
[one-line description]
**Variant C — Density Contrast**
[screenshot if available]
[one-line description]
**Variant D — Interaction Model**
[screenshot if available]
[one-line description]
**Variant E — Brand Expression**
[screenshot if available]
[one-line description]
Which variant(s) do you like? You can pick one, multiple, or specific elements from different variants.
Ask the user:
Wait for all answers before proceeding. If the user gives partial feedback (e.g., "I like A"), ask targeted follow-up questions about what specifically works and what they would change.
Based on feedback:
Single variant picked cleanly (e.g., "A is perfect" or "A with minor tweaks"): Refine that variant based on the user's specific feedback. Apply changes, rebuild, and present the refined version.
Elements from multiple variants (e.g., "A's hierarchy with D's interaction model"): Create Variant F that combines the specified elements. Build it, verify it compiles, and present it to the user.
Major changes requested: If the user wants something substantially different from all 5 variants, create a new variant incorporating their direction. Treat this as another exploration round.
Support multiple synthesis passes. If the user says "closer, but change X", refine again. Continue until the user says they are satisfied or explicitly moves to finalize.
After each synthesis pass:
Once the user approves a final design:
Move the final view from the temporary exploration file to the proper feature location. Name it according to project conventions (e.g., {ScreenName}View.swift). Remove the variant suffix — this is now the real view.
Clean up temporary files. Delete:
{ScreenName}DesignExploration.swift (the multi-variant file).claude/design-brief.jsonRun the anti-slop checklist on the final code (see Review Checklist below). Fix any violations before declaring done.
Build and lint.
Update design memory. If actionable design decisions were made during this session (density preference, interaction pattern choice, colour decisions, component preferences), update .claude/design-memory.md following the write protocol in the design-memory skill:
.claude/design-memory.md does not exist, offer to create it. Do not force creation.Generate a commit message summary. Produce a brief summary of design decisions suitable for a commit message. Format: [Feature] UI: one-line description of what was designed and key decisions. Do not commit — just present the summary for the user to use when they are ready.
Run this on every variant and on the final output. Every item must pass.
.padding() — spacing varies by semantic levelColor(hex:) or Color.blue — palette colours or semantic styles only.font(.system(size:)) — semantic text styles onlyContentUnavailableView with icon + description + action.sensoryFeedback).monospacedDigit().animation(.default) without value: — all animations scopedbounce: 0 for UI controlsNavigationView — NavigationStack onlyAnyView — @ViewBuilder or concrete typesSpacer() as primary spacing tool — use stack spacing: and paddingAt ANY phase, if the user says "cancel", "stop", "abort", or "nevermind":
{ScreenName}DesignExploration.swift if it exists..claude/design-brief.json if it exists.When presenting variants and collecting feedback, close multi-decision moments with a one-line recommendation:
This reduces conversational round-trips by letting the user approve a recommendation with a single "yes."
/clear), .claude/design-brief.json and the exploration file may be orphaned. The next session should check for and clean up stale exploration files./implement-component for the full build.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub 4eleven7/claude-skills --plugin swiftui