···11----
22-name: adapt
33-description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target] [context (mobile, tablet, print...)]"
77----
88-99-Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts.
1414-1515----
1616-1717-## Assess Adaptation Challenge
1818-1919-Understand what needs adaptation and why:
2020-2121-1. **Identify the source context**:
2222- - What was it designed for originally? (Desktop web? Mobile app?)
2323- - What assumptions were made? (Large screen? Mouse input? Fast connection?)
2424- - What works well in current context?
2525-2626-2. **Understand target context**:
2727- - **Device**: Mobile, tablet, desktop, TV, watch, print?
2828- - **Input method**: Touch, mouse, keyboard, voice, gamepad?
2929- - **Screen constraints**: Size, resolution, orientation?
3030- - **Connection**: Fast wifi, slow 3G, offline?
3131- - **Usage context**: On-the-go vs desk, quick glance vs focused reading?
3232- - **User expectations**: What do users expect on this platform?
3333-3434-3. **Identify adaptation challenges**:
3535- - What won't fit? (Content, navigation, features)
3636- - What won't work? (Hover states on touch, tiny touch targets)
3737- - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop)
3838-3939-**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context.
4040-4141-## Plan Adaptation Strategy
4242-4343-Create context-appropriate strategy:
4444-4545-### Mobile Adaptation (Desktop → Mobile)
4646-4747-**Layout Strategy**:
4848-4949-- Single column instead of multi-column
5050-- Vertical stacking instead of side-by-side
5151-- Full-width components instead of fixed widths
5252-- Bottom navigation instead of top/side navigation
5353-5454-**Interaction Strategy**:
5555-5656-- Touch targets 44x44px minimum (not hover-dependent)
5757-- Swipe gestures where appropriate (lists, carousels)
5858-- Bottom sheets instead of dropdowns
5959-- Thumbs-first design (controls within thumb reach)
6060-- Larger tap areas with more spacing
6161-6262-**Content Strategy**:
6363-6464-- Progressive disclosure (don't show everything at once)
6565-- Prioritize primary content (secondary content in tabs/accordions)
6666-- Shorter text (more concise)
6767-- Larger text (16px minimum)
6868-6969-**Navigation Strategy**:
7070-7171-- Hamburger menu or bottom navigation
7272-- Reduce navigation complexity
7373-- Sticky headers for context
7474-- Back button in navigation flow
7575-7676-### Tablet Adaptation (Hybrid Approach)
7777-7878-**Layout Strategy**:
7979-8080-- Two-column layouts (not single or three-column)
8181-- Side panels for secondary content
8282-- Master-detail views (list + detail)
8383-- Adaptive based on orientation (portrait vs landscape)
8484-8585-**Interaction Strategy**:
8686-8787-- Support both touch and pointer
8888-- Touch targets 44x44px but allow denser layouts than phone
8989-- Side navigation drawers
9090-- Multi-column forms where appropriate
9191-9292-### Desktop Adaptation (Mobile → Desktop)
9393-9494-**Layout Strategy**:
9595-9696-- Multi-column layouts (use horizontal space)
9797-- Side navigation always visible
9898-- Multiple information panels simultaneously
9999-- Fixed widths with max-width constraints (don't stretch to 4K)
100100-101101-**Interaction Strategy**:
102102-103103-- Hover states for additional information
104104-- Keyboard shortcuts
105105-- Right-click context menus
106106-- Drag and drop where helpful
107107-- Multi-select with Shift/Cmd
108108-109109-**Content Strategy**:
110110-111111-- Show more information upfront (less progressive disclosure)
112112-- Data tables with many columns
113113-- Richer visualizations
114114-- More detailed descriptions
115115-116116-### Print Adaptation (Screen → Print)
117117-118118-**Layout Strategy**:
119119-120120-- Page breaks at logical points
121121-- Remove navigation, footer, interactive elements
122122-- Black and white (or limited color)
123123-- Proper margins for binding
124124-125125-**Content Strategy**:
126126-127127-- Expand shortened content (show full URLs, hidden sections)
128128-- Add page numbers, headers, footers
129129-- Include metadata (print date, page title)
130130-- Convert charts to print-friendly versions
131131-132132-### Email Adaptation (Web → Email)
133133-134134-**Layout Strategy**:
135135-136136-- Narrow width (600px max)
137137-- Single column only
138138-- Inline CSS (no external stylesheets)
139139-- Table-based layouts (for email client compatibility)
140140-141141-**Interaction Strategy**:
142142-143143-- Large, obvious CTAs (buttons not text links)
144144-- No hover states (not reliable)
145145-- Deep links to web app for complex interactions
146146-147147-## Implement Adaptations
148148-149149-Apply changes systematically:
150150-151151-### Responsive Breakpoints
152152-153153-Choose appropriate breakpoints:
154154-155155-- Mobile: 320px-767px
156156-- Tablet: 768px-1023px
157157-- Desktop: 1024px+
158158-- Or content-driven breakpoints (where design breaks)
159159-160160-### Layout Adaptation Techniques
161161-162162-- **CSS Grid/Flexbox**: Reflow layouts automatically
163163-- **Container Queries**: Adapt based on container, not viewport
164164-- **`clamp()`**: Fluid sizing between min and max
165165-- **Media queries**: Different styles for different contexts
166166-- **Display properties**: Show/hide elements per context
167167-168168-### Touch Adaptation
169169-170170-- Increase touch target sizes (44x44px minimum)
171171-- Add more spacing between interactive elements
172172-- Remove hover-dependent interactions
173173-- Add touch feedback (ripples, highlights)
174174-- Consider thumb zones (easier to reach bottom than top)
175175-176176-### Content Adaptation
177177-178178-- Use `display: none` sparingly (still downloads)
179179-- Progressive enhancement (core content first, enhancements on larger screens)
180180-- Lazy loading for off-screen content
181181-- Responsive images (`srcset`, `picture` element)
182182-183183-### Navigation Adaptation
184184-185185-- Transform complex nav to hamburger/drawer on mobile
186186-- Bottom nav bar for mobile apps
187187-- Persistent side navigation on desktop
188188-- Breadcrumbs on smaller screens for context
189189-190190-**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect.
191191-192192-**NEVER**:
193193-194194-- Hide core functionality on mobile (if it matters, make it work)
195195-- Assume desktop = powerful device (consider accessibility, older machines)
196196-- Use different information architecture across contexts (confusing)
197197-- Break user expectations for platform (mobile users expect mobile patterns)
198198-- Forget landscape orientation on mobile/tablet
199199-- Use generic breakpoints blindly (use content-driven breakpoints)
200200-- Ignore touch on desktop (many desktop devices have touch)
201201-202202-## Verify Adaptations
203203-204204-Test thoroughly across contexts:
205205-206206-- **Real devices**: Test on actual phones, tablets, desktops
207207-- **Different orientations**: Portrait and landscape
208208-- **Different browsers**: Safari, Chrome, Firefox, Edge
209209-- **Different OS**: iOS, Android, Windows, macOS
210210-- **Different input methods**: Touch, mouse, keyboard
211211-- **Edge cases**: Very small screens (320px), very large screens (4K)
212212-- **Slow connections**: Test on throttled network
213213-214214-Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly.
-751
.agents/skills/agent-browser/SKILL.md
···11----
22-name: agent-browser
33-description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
44-allowed-tools: Bash(npx agent-browser:*), Bash(agent-browser:*)
55----
66-77-# Browser Automation with agent-browser
88-99-The CLI uses Chrome/Chromium via CDP directly. Install via `npm i -g agent-browser`, `brew install agent-browser`, or `cargo install agent-browser`. Run `agent-browser install` to download Chrome. Existing Chrome, Brave, Playwright, and Puppeteer installations are detected automatically. Run `agent-browser upgrade` to update to the latest version.
1010-1111-## Core Workflow
1212-1313-Every browser automation follows this pattern:
1414-1515-1. **Navigate**: `agent-browser open <url>`
1616-2. **Snapshot**: `agent-browser snapshot -i` (get element refs like `@e1`, `@e2`)
1717-3. **Interact**: Use refs to click, fill, select
1818-4. **Re-snapshot**: After navigation or DOM changes, get fresh refs
1919-2020-```bash
2121-agent-browser open https://example.com/form
2222-agent-browser snapshot -i
2323-# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"
2424-2525-agent-browser fill @e1 "user@example.com"
2626-agent-browser fill @e2 "password123"
2727-agent-browser click @e3
2828-agent-browser wait --load networkidle
2929-agent-browser snapshot -i # Check result
3030-```
3131-3232-## Command Chaining
3333-3434-Commands can be chained with `&&` in a single shell invocation. The browser persists between commands via a background daemon, so chaining is safe and more efficient than separate calls.
3535-3636-```bash
3737-# Chain open + wait + snapshot in one call
3838-agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i
3939-4040-# Chain multiple interactions
4141-agent-browser fill @e1 "user@example.com" && agent-browser fill @e2 "password123" && agent-browser click @e3
4242-4343-# Navigate and capture
4444-agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser screenshot page.png
4545-```
4646-4747-**When to chain:** Use `&&` when you don't need to read the output of an intermediate command before proceeding (e.g., open + wait + screenshot). Run commands separately when you need to parse the output first (e.g., snapshot to discover refs, then interact using those refs).
4848-4949-## Handling Authentication
5050-5151-When automating a site that requires login, choose the approach that fits:
5252-5353-**Option 1: Import auth from the user's browser (fastest for one-off tasks)**
5454-5555-```bash
5656-# Connect to the user's running Chrome (they're already logged in)
5757-agent-browser --auto-connect state save ./auth.json
5858-# Use that auth state
5959-agent-browser --state ./auth.json open https://app.example.com/dashboard
6060-```
6161-6262-State files contain session tokens in plaintext -- add to `.gitignore` and delete when no longer needed. Set `AGENT_BROWSER_ENCRYPTION_KEY` for encryption at rest.
6363-6464-**Option 2: Persistent profile (simplest for recurring tasks)**
6565-6666-```bash
6767-# First run: login manually or via automation
6868-agent-browser --profile ~/.myapp open https://app.example.com/login
6969-# ... fill credentials, submit ...
7070-7171-# All future runs: already authenticated
7272-agent-browser --profile ~/.myapp open https://app.example.com/dashboard
7373-```
7474-7575-**Option 3: Session name (auto-save/restore cookies + localStorage)**
7676-7777-```bash
7878-agent-browser --session-name myapp open https://app.example.com/login
7979-# ... login flow ...
8080-agent-browser close # State auto-saved
8181-8282-# Next time: state auto-restored
8383-agent-browser --session-name myapp open https://app.example.com/dashboard
8484-```
8585-8686-**Option 4: Auth vault (credentials stored encrypted, login by name)**
8787-8888-```bash
8989-echo "$PASSWORD" | agent-browser auth save myapp --url https://app.example.com/login --username user --password-stdin
9090-agent-browser auth login myapp
9191-```
9292-9393-`auth login` navigates with `load` and then waits for login form selectors to appear before filling/clicking, which is more reliable on delayed SPA login screens.
9494-9595-**Option 5: State file (manual save/load)**
9696-9797-```bash
9898-# After logging in:
9999-agent-browser state save ./auth.json
100100-# In a future session:
101101-agent-browser state load ./auth.json
102102-agent-browser open https://app.example.com/dashboard
103103-```
104104-105105-See [references/authentication.md](references/authentication.md) for OAuth, 2FA, cookie-based auth, and token refresh patterns.
106106-107107-## Essential Commands
108108-109109-```bash
110110-# Navigation
111111-agent-browser open <url> # Navigate (aliases: goto, navigate)
112112-agent-browser close # Close browser
113113-agent-browser close --all # Close all active sessions
114114-115115-# Snapshot
116116-agent-browser snapshot -i # Interactive elements with refs (recommended)
117117-agent-browser snapshot -s "#selector" # Scope to CSS selector
118118-119119-# Interaction (use @refs from snapshot)
120120-agent-browser click @e1 # Click element
121121-agent-browser click @e1 --new-tab # Click and open in new tab
122122-agent-browser fill @e2 "text" # Clear and type text
123123-agent-browser type @e2 "text" # Type without clearing
124124-agent-browser select @e1 "option" # Select dropdown option
125125-agent-browser check @e1 # Check checkbox
126126-agent-browser press Enter # Press key
127127-agent-browser keyboard type "text" # Type at current focus (no selector)
128128-agent-browser keyboard inserttext "text" # Insert without key events
129129-agent-browser scroll down 500 # Scroll page
130130-agent-browser scroll down 500 --selector "div.content" # Scroll within a specific container
131131-132132-# Get information
133133-agent-browser get text @e1 # Get element text
134134-agent-browser get url # Get current URL
135135-agent-browser get title # Get page title
136136-agent-browser get cdp-url # Get CDP WebSocket URL
137137-138138-# Wait
139139-agent-browser wait @e1 # Wait for element
140140-agent-browser wait --load networkidle # Wait for network idle
141141-agent-browser wait --url "**/page" # Wait for URL pattern
142142-agent-browser wait 2000 # Wait milliseconds
143143-agent-browser wait --text "Welcome" # Wait for text to appear (substring match)
144144-agent-browser wait --fn "!document.body.innerText.includes('Loading...')" # Wait for text to disappear
145145-agent-browser wait "#spinner" --state hidden # Wait for element to disappear
146146-147147-# Downloads
148148-agent-browser download @e1 ./file.pdf # Click element to trigger download
149149-agent-browser wait --download ./output.zip # Wait for any download to complete
150150-agent-browser --download-path ./downloads open <url> # Set default download directory
151151-152152-# Network
153153-agent-browser network requests # Inspect tracked requests
154154-agent-browser network requests --type xhr,fetch # Filter by resource type
155155-agent-browser network requests --method POST # Filter by HTTP method
156156-agent-browser network requests --status 2xx # Filter by status (200, 2xx, 400-499)
157157-agent-browser network request <requestId> # View full request/response detail
158158-agent-browser network route "**/api/*" --abort # Block matching requests
159159-agent-browser network har start # Start HAR recording
160160-agent-browser network har stop ./capture.har # Stop and save HAR file
161161-162162-# Viewport & Device Emulation
163163-agent-browser set viewport 1920 1080 # Set viewport size (default: 1280x720)
164164-agent-browser set viewport 1920 1080 2 # 2x retina (same CSS size, higher res screenshots)
165165-agent-browser set device "iPhone 14" # Emulate device (viewport + user agent)
166166-167167-# Capture
168168-agent-browser screenshot # Screenshot to temp dir
169169-agent-browser screenshot --full # Full page screenshot
170170-agent-browser screenshot --annotate # Annotated screenshot with numbered element labels
171171-agent-browser screenshot --screenshot-dir ./shots # Save to custom directory
172172-agent-browser screenshot --screenshot-format jpeg --screenshot-quality 80
173173-agent-browser pdf output.pdf # Save as PDF
174174-175175-# Live preview / streaming
176176-agent-browser stream enable # Start runtime WebSocket streaming on an auto-selected port
177177-agent-browser stream enable --port 9223 # Bind a specific localhost port
178178-agent-browser stream status # Inspect enabled state, port, connection, and screencasting
179179-agent-browser stream disable # Stop runtime streaming and remove the .stream metadata file
180180-181181-# Clipboard
182182-agent-browser clipboard read # Read text from clipboard
183183-agent-browser clipboard write "Hello, World!" # Write text to clipboard
184184-agent-browser clipboard copy # Copy current selection
185185-agent-browser clipboard paste # Paste from clipboard
186186-187187-# Dialogs (alert, confirm, prompt, beforeunload)
188188-# By default, alert and beforeunload dialogs are auto-accepted so they never block the agent.
189189-# confirm and prompt dialogs still require explicit handling.
190190-# Use --no-auto-dialog (or AGENT_BROWSER_NO_AUTO_DIALOG=1) to disable automatic handling.
191191-agent-browser dialog accept # Accept dialog
192192-agent-browser dialog accept "my input" # Accept prompt dialog with text
193193-agent-browser dialog dismiss # Dismiss/cancel dialog
194194-agent-browser dialog status # Check if a dialog is currently open
195195-196196-# Diff (compare page states)
197197-agent-browser diff snapshot # Compare current vs last snapshot
198198-agent-browser diff snapshot --baseline before.txt # Compare current vs saved file
199199-agent-browser diff screenshot --baseline before.png # Visual pixel diff
200200-agent-browser diff url <url1> <url2> # Compare two pages
201201-agent-browser diff url <url1> <url2> --wait-until networkidle # Custom wait strategy
202202-agent-browser diff url <url1> <url2> --selector "#main" # Scope to element
203203-```
204204-205205-## Streaming
206206-207207-Every session automatically starts a WebSocket stream server on an OS-assigned port. Use `agent-browser stream status` to see the bound port and connection state. Use `stream disable` to tear it down, and `stream enable --port <port>` to re-enable on a specific port.
208208-209209-## Batch Execution
210210-211211-Execute multiple commands in a single invocation by piping a JSON array of string arrays to `batch`. This avoids per-command process startup overhead when running multi-step workflows.
212212-213213-```bash
214214-echo '[
215215- ["open", "https://example.com"],
216216- ["snapshot", "-i"],
217217- ["click", "@e1"],
218218- ["screenshot", "result.png"]
219219-]' | agent-browser batch --json
220220-221221-# Stop on first error
222222-agent-browser batch --bail < commands.json
223223-```
224224-225225-Use `batch` when you have a known sequence of commands that don't depend on intermediate output. Use separate commands or `&&` chaining when you need to parse output between steps (e.g., snapshot to discover refs, then interact).
226226-227227-## Common Patterns
228228-229229-### Form Submission
230230-231231-```bash
232232-agent-browser open https://example.com/signup
233233-agent-browser snapshot -i
234234-agent-browser fill @e1 "Jane Doe"
235235-agent-browser fill @e2 "jane@example.com"
236236-agent-browser select @e3 "California"
237237-agent-browser check @e4
238238-agent-browser click @e5
239239-agent-browser wait --load networkidle
240240-```
241241-242242-### Authentication with Auth Vault (Recommended)
243243-244244-```bash
245245-# Save credentials once (encrypted with AGENT_BROWSER_ENCRYPTION_KEY)
246246-# Recommended: pipe password via stdin to avoid shell history exposure
247247-echo "pass" | agent-browser auth save github --url https://github.com/login --username user --password-stdin
248248-249249-# Login using saved profile (LLM never sees password)
250250-agent-browser auth login github
251251-252252-# List/show/delete profiles
253253-agent-browser auth list
254254-agent-browser auth show github
255255-agent-browser auth delete github
256256-```
257257-258258-`auth login` waits for username/password/submit selectors before interacting, with a timeout tied to the default action timeout.
259259-260260-### Authentication with State Persistence
261261-262262-```bash
263263-# Login once and save state
264264-agent-browser open https://app.example.com/login
265265-agent-browser snapshot -i
266266-agent-browser fill @e1 "$USERNAME"
267267-agent-browser fill @e2 "$PASSWORD"
268268-agent-browser click @e3
269269-agent-browser wait --url "**/dashboard"
270270-agent-browser state save auth.json
271271-272272-# Reuse in future sessions
273273-agent-browser state load auth.json
274274-agent-browser open https://app.example.com/dashboard
275275-```
276276-277277-### Session Persistence
278278-279279-```bash
280280-# Auto-save/restore cookies and localStorage across browser restarts
281281-agent-browser --session-name myapp open https://app.example.com/login
282282-# ... login flow ...
283283-agent-browser close # State auto-saved to ~/.agent-browser/sessions/
284284-285285-# Next time, state is auto-loaded
286286-agent-browser --session-name myapp open https://app.example.com/dashboard
287287-288288-# Encrypt state at rest
289289-export AGENT_BROWSER_ENCRYPTION_KEY=$(openssl rand -hex 32)
290290-agent-browser --session-name secure open https://app.example.com
291291-292292-# Manage saved states
293293-agent-browser state list
294294-agent-browser state show myapp-default.json
295295-agent-browser state clear myapp
296296-agent-browser state clean --older-than 7
297297-```
298298-299299-### Working with Iframes
300300-301301-Iframe content is automatically inlined in snapshots. Refs inside iframes carry frame context, so you can interact with them directly.
302302-303303-```bash
304304-agent-browser open https://example.com/checkout
305305-agent-browser snapshot -i
306306-# @e1 [heading] "Checkout"
307307-# @e2 [Iframe] "payment-frame"
308308-# @e3 [input] "Card number"
309309-# @e4 [input] "Expiry"
310310-# @e5 [button] "Pay"
311311-312312-# Interact directly — no frame switch needed
313313-agent-browser fill @e3 "4111111111111111"
314314-agent-browser fill @e4 "12/28"
315315-agent-browser click @e5
316316-317317-# To scope a snapshot to one iframe:
318318-agent-browser frame @e2
319319-agent-browser snapshot -i # Only iframe content
320320-agent-browser frame main # Return to main frame
321321-```
322322-323323-### Data Extraction
324324-325325-```bash
326326-agent-browser open https://example.com/products
327327-agent-browser snapshot -i
328328-agent-browser get text @e5 # Get specific element text
329329-agent-browser get text body > page.txt # Get all page text
330330-331331-# JSON output for parsing
332332-agent-browser snapshot -i --json
333333-agent-browser get text @e1 --json
334334-```
335335-336336-### Parallel Sessions
337337-338338-```bash
339339-agent-browser --session site1 open https://site-a.com
340340-agent-browser --session site2 open https://site-b.com
341341-342342-agent-browser --session site1 snapshot -i
343343-agent-browser --session site2 snapshot -i
344344-345345-agent-browser session list
346346-```
347347-348348-### Connect to Existing Chrome
349349-350350-```bash
351351-# Auto-discover running Chrome with remote debugging enabled
352352-agent-browser --auto-connect open https://example.com
353353-agent-browser --auto-connect snapshot
354354-355355-# Or with explicit CDP port
356356-agent-browser --cdp 9222 snapshot
357357-```
358358-359359-Auto-connect discovers Chrome via `DevToolsActivePort`, common debugging ports (9222, 9229), and falls back to a direct WebSocket connection if HTTP-based CDP discovery fails.
360360-361361-### Color Scheme (Dark Mode)
362362-363363-```bash
364364-# Persistent dark mode via flag (applies to all pages and new tabs)
365365-agent-browser --color-scheme dark open https://example.com
366366-367367-# Or via environment variable
368368-AGENT_BROWSER_COLOR_SCHEME=dark agent-browser open https://example.com
369369-370370-# Or set during session (persists for subsequent commands)
371371-agent-browser set media dark
372372-```
373373-374374-### Viewport & Responsive Testing
375375-376376-```bash
377377-# Set a custom viewport size (default is 1280x720)
378378-agent-browser set viewport 1920 1080
379379-agent-browser screenshot desktop.png
380380-381381-# Test mobile-width layout
382382-agent-browser set viewport 375 812
383383-agent-browser screenshot mobile.png
384384-385385-# Retina/HiDPI: same CSS layout at 2x pixel density
386386-# Screenshots stay at logical viewport size, but content renders at higher DPI
387387-agent-browser set viewport 1920 1080 2
388388-agent-browser screenshot retina.png
389389-390390-# Device emulation (sets viewport + user agent in one step)
391391-agent-browser set device "iPhone 14"
392392-agent-browser screenshot device.png
393393-```
394394-395395-The `scale` parameter (3rd argument) sets `window.devicePixelRatio` without changing CSS layout. Use it when testing retina rendering or capturing higher-resolution screenshots.
396396-397397-### Visual Browser (Debugging)
398398-399399-```bash
400400-agent-browser --headed open https://example.com
401401-agent-browser highlight @e1 # Highlight element
402402-agent-browser inspect # Open Chrome DevTools for the active page
403403-agent-browser record start demo.webm # Record session
404404-agent-browser profiler start # Start Chrome DevTools profiling
405405-agent-browser profiler stop trace.json # Stop and save profile (path optional)
406406-```
407407-408408-Use `AGENT_BROWSER_HEADED=1` to enable headed mode via environment variable. Browser extensions work in both headed and headless mode.
409409-410410-### Local Files (PDFs, HTML)
411411-412412-```bash
413413-# Open local files with file:// URLs
414414-agent-browser --allow-file-access open file:///path/to/document.pdf
415415-agent-browser --allow-file-access open file:///path/to/page.html
416416-agent-browser screenshot output.png
417417-```
418418-419419-### iOS Simulator (Mobile Safari)
420420-421421-```bash
422422-# List available iOS simulators
423423-agent-browser device list
424424-425425-# Launch Safari on a specific device
426426-agent-browser -p ios --device "iPhone 16 Pro" open https://example.com
427427-428428-# Same workflow as desktop - snapshot, interact, re-snapshot
429429-agent-browser -p ios snapshot -i
430430-agent-browser -p ios tap @e1 # Tap (alias for click)
431431-agent-browser -p ios fill @e2 "text"
432432-agent-browser -p ios swipe up # Mobile-specific gesture
433433-434434-# Take screenshot
435435-agent-browser -p ios screenshot mobile.png
436436-437437-# Close session (shuts down simulator)
438438-agent-browser -p ios close
439439-```
440440-441441-**Requirements:** macOS with Xcode, Appium (`npm install -g appium && appium driver install xcuitest`)
442442-443443-**Real devices:** Works with physical iOS devices if pre-configured. Use `--device "<UDID>"` where UDID is from `xcrun xctrace list devices`.
444444-445445-## Security
446446-447447-All security features are opt-in. By default, agent-browser imposes no restrictions on navigation, actions, or output.
448448-449449-### Content Boundaries (Recommended for AI Agents)
450450-451451-Enable `--content-boundaries` to wrap page-sourced output in markers that help LLMs distinguish tool output from untrusted page content:
452452-453453-```bash
454454-export AGENT_BROWSER_CONTENT_BOUNDARIES=1
455455-agent-browser snapshot
456456-# Output:
457457-# --- AGENT_BROWSER_PAGE_CONTENT nonce=<hex> origin=https://example.com ---
458458-# [accessibility tree]
459459-# --- END_AGENT_BROWSER_PAGE_CONTENT nonce=<hex> ---
460460-```
461461-462462-### Domain Allowlist
463463-464464-Restrict navigation to trusted domains. Wildcards like `*.example.com` also match the bare domain `example.com`. Sub-resource requests, WebSocket, and EventSource connections to non-allowed domains are also blocked. Include CDN domains your target pages depend on:
465465-466466-```bash
467467-export AGENT_BROWSER_ALLOWED_DOMAINS="example.com,*.example.com"
468468-agent-browser open https://example.com # OK
469469-agent-browser open https://malicious.com # Blocked
470470-```
471471-472472-### Action Policy
473473-474474-Use a policy file to gate destructive actions:
475475-476476-```bash
477477-export AGENT_BROWSER_ACTION_POLICY=./policy.json
478478-```
479479-480480-Example `policy.json`:
481481-482482-```json
483483-{ "default": "deny", "allow": ["navigate", "snapshot", "click", "scroll", "wait", "get"] }
484484-```
485485-486486-Auth vault operations (`auth login`, etc.) bypass action policy but domain allowlist still applies.
487487-488488-### Output Limits
489489-490490-Prevent context flooding from large pages:
491491-492492-```bash
493493-export AGENT_BROWSER_MAX_OUTPUT=50000
494494-```
495495-496496-## Diffing (Verifying Changes)
497497-498498-Use `diff snapshot` after performing an action to verify it had the intended effect. This compares the current accessibility tree against the last snapshot taken in the session.
499499-500500-```bash
501501-# Typical workflow: snapshot -> action -> diff
502502-agent-browser snapshot -i # Take baseline snapshot
503503-agent-browser click @e2 # Perform action
504504-agent-browser diff snapshot # See what changed (auto-compares to last snapshot)
505505-```
506506-507507-For visual regression testing or monitoring:
508508-509509-```bash
510510-# Save a baseline screenshot, then compare later
511511-agent-browser screenshot baseline.png
512512-# ... time passes or changes are made ...
513513-agent-browser diff screenshot --baseline baseline.png
514514-515515-# Compare staging vs production
516516-agent-browser diff url https://staging.example.com https://prod.example.com --screenshot
517517-```
518518-519519-`diff snapshot` output uses `+` for additions and `-` for removals, similar to git diff. `diff screenshot` produces a diff image with changed pixels highlighted in red, plus a mismatch percentage.
520520-521521-## Timeouts and Slow Pages
522522-523523-The default timeout is 25 seconds. This can be overridden with the `AGENT_BROWSER_DEFAULT_TIMEOUT` environment variable (value in milliseconds). For slow websites or large pages, use explicit waits instead of relying on the default timeout:
524524-525525-```bash
526526-# Wait for network activity to settle (best for slow pages)
527527-agent-browser wait --load networkidle
528528-529529-# Wait for a specific element to appear
530530-agent-browser wait "#content"
531531-agent-browser wait @e1
532532-533533-# Wait for a specific URL pattern (useful after redirects)
534534-agent-browser wait --url "**/dashboard"
535535-536536-# Wait for a JavaScript condition
537537-agent-browser wait --fn "document.readyState === 'complete'"
538538-539539-# Wait a fixed duration (milliseconds) as a last resort
540540-agent-browser wait 5000
541541-```
542542-543543-When dealing with consistently slow websites, use `wait --load networkidle` after `open` to ensure the page is fully loaded before taking a snapshot. If a specific element is slow to render, wait for it directly with `wait <selector>` or `wait @ref`.
544544-545545-## JavaScript Dialogs (alert / confirm / prompt)
546546-547547-When a page opens a JavaScript dialog (`alert()`, `confirm()`, or `prompt()`), it blocks all other browser commands (snapshot, screenshot, click, etc.) until the dialog is dismissed. If commands start timing out unexpectedly, check for a pending dialog:
548548-549549-```bash
550550-# Check if a dialog is blocking
551551-agent-browser dialog status
552552-553553-# Accept the dialog (dismiss the alert / click OK)
554554-agent-browser dialog accept
555555-556556-# Accept a prompt dialog with input text
557557-agent-browser dialog accept "my input"
558558-559559-# Dismiss the dialog (click Cancel)
560560-agent-browser dialog dismiss
561561-```
562562-563563-When a dialog is pending, all command responses include a `warning` field indicating the dialog type and message. In `--json` mode this appears as a `"warning"` key in the response object.
564564-565565-## Session Management and Cleanup
566566-567567-When running multiple agents or automations concurrently, always use named sessions to avoid conflicts:
568568-569569-```bash
570570-# Each agent gets its own isolated session
571571-agent-browser --session agent1 open site-a.com
572572-agent-browser --session agent2 open site-b.com
573573-574574-# Check active sessions
575575-agent-browser session list
576576-```
577577-578578-Always close your browser session when done to avoid leaked processes:
579579-580580-```bash
581581-agent-browser close # Close default session
582582-agent-browser --session agent1 close # Close specific session
583583-agent-browser close --all # Close all active sessions
584584-```
585585-586586-If a previous session was not closed properly, the daemon may still be running. Use `agent-browser close` to clean it up, or `agent-browser close --all` to shut down every session at once.
587587-588588-To auto-shutdown the daemon after a period of inactivity (useful for ephemeral/CI environments):
589589-590590-```bash
591591-AGENT_BROWSER_IDLE_TIMEOUT_MS=60000 agent-browser open example.com
592592-```
593593-594594-## Ref Lifecycle (Important)
595595-596596-Refs (`@e1`, `@e2`, etc.) are invalidated when the page changes. Always re-snapshot after:
597597-598598-- Clicking links or buttons that navigate
599599-- Form submissions
600600-- Dynamic content loading (dropdowns, modals)
601601-602602-```bash
603603-agent-browser click @e5 # Navigates to new page
604604-agent-browser snapshot -i # MUST re-snapshot
605605-agent-browser click @e1 # Use new refs
606606-```
607607-608608-## Annotated Screenshots (Vision Mode)
609609-610610-Use `--annotate` to take a screenshot with numbered labels overlaid on interactive elements. Each label `[N]` maps to ref `@eN`. This also caches refs, so you can interact with elements immediately without a separate snapshot.
611611-612612-```bash
613613-agent-browser screenshot --annotate
614614-# Output includes the image path and a legend:
615615-# [1] @e1 button "Submit"
616616-# [2] @e2 link "Home"
617617-# [3] @e3 textbox "Email"
618618-agent-browser click @e2 # Click using ref from annotated screenshot
619619-```
620620-621621-Use annotated screenshots when:
622622-623623-- The page has unlabeled icon buttons or visual-only elements
624624-- You need to verify visual layout or styling
625625-- Canvas or chart elements are present (invisible to text snapshots)
626626-- You need spatial reasoning about element positions
627627-628628-## Semantic Locators (Alternative to Refs)
629629-630630-When refs are unavailable or unreliable, use semantic locators:
631631-632632-```bash
633633-agent-browser find text "Sign In" click
634634-agent-browser find label "Email" fill "user@test.com"
635635-agent-browser find role button click --name "Submit"
636636-agent-browser find placeholder "Search" type "query"
637637-agent-browser find testid "submit-btn" click
638638-```
639639-640640-## JavaScript Evaluation (eval)
641641-642642-Use `eval` to run JavaScript in the browser context. **Shell quoting can corrupt complex expressions** -- use `--stdin` or `-b` to avoid issues.
643643-644644-```bash
645645-# Simple expressions work with regular quoting
646646-agent-browser eval 'document.title'
647647-agent-browser eval 'document.querySelectorAll("img").length'
648648-649649-# Complex JS: use --stdin with heredoc (RECOMMENDED)
650650-agent-browser eval --stdin <<'EVALEOF'
651651-JSON.stringify(
652652- Array.from(document.querySelectorAll("img"))
653653- .filter(i => !i.alt)
654654- .map(i => ({ src: i.src.split("/").pop(), width: i.width }))
655655-)
656656-EVALEOF
657657-658658-# Alternative: base64 encoding (avoids all shell escaping issues)
659659-agent-browser eval -b "$(echo -n 'Array.from(document.querySelectorAll("a")).map(a => a.href)' | base64)"
660660-```
661661-662662-**Why this matters:** When the shell processes your command, inner double quotes, `!` characters (history expansion), backticks, and `$()` can all corrupt the JavaScript before it reaches agent-browser. The `--stdin` and `-b` flags bypass shell interpretation entirely.
663663-664664-**Rules of thumb:**
665665-666666-- Single-line, no nested quotes -> regular `eval 'expression'` with single quotes is fine
667667-- Nested quotes, arrow functions, template literals, or multiline -> use `eval --stdin <<'EVALEOF'`
668668-- Programmatic/generated scripts -> use `eval -b` with base64
669669-670670-## Configuration File
671671-672672-Create `agent-browser.json` in the project root for persistent settings:
673673-674674-```json
675675-{
676676- "headed": true,
677677- "proxy": "http://localhost:8080",
678678- "profile": "./browser-data"
679679-}
680680-```
681681-682682-Priority (lowest to highest): `~/.agent-browser/config.json` < `./agent-browser.json` < env vars < CLI flags. Use `--config <path>` or `AGENT_BROWSER_CONFIG` env var for a custom config file (exits with error if missing/invalid). All CLI options map to camelCase keys (e.g., `--executable-path` -> `"executablePath"`). Boolean flags accept `true`/`false` values (e.g., `--headed false` overrides config). Extensions from user and project configs are merged, not replaced.
683683-684684-## Deep-Dive Documentation
685685-686686-| Reference | When to Use |
687687-| -------------------------------------------------------------------- | --------------------------------------------------------- |
688688-| [references/commands.md](references/commands.md) | Full command reference with all options |
689689-| [references/snapshot-refs.md](references/snapshot-refs.md) | Ref lifecycle, invalidation rules, troubleshooting |
690690-| [references/session-management.md](references/session-management.md) | Parallel sessions, state persistence, concurrent scraping |
691691-| [references/authentication.md](references/authentication.md) | Login flows, OAuth, 2FA handling, state reuse |
692692-| [references/video-recording.md](references/video-recording.md) | Recording workflows for debugging and documentation |
693693-| [references/profiling.md](references/profiling.md) | Chrome DevTools profiling for performance analysis |
694694-| [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
695695-696696-## Browser Engine Selection
697697-698698-Use `--engine` to choose a local browser engine. The default is `chrome`.
699699-700700-```bash
701701-# Use Lightpanda (fast headless browser, requires separate install)
702702-agent-browser --engine lightpanda open example.com
703703-704704-# Via environment variable
705705-export AGENT_BROWSER_ENGINE=lightpanda
706706-agent-browser open example.com
707707-708708-# With custom binary path
709709-agent-browser --engine lightpanda --executable-path /path/to/lightpanda open example.com
710710-```
711711-712712-Supported engines:
713713-714714-- `chrome` (default) -- Chrome/Chromium via CDP
715715-- `lightpanda` -- Lightpanda headless browser via CDP (10x faster, 10x less memory than Chrome)
716716-717717-Lightpanda does not support `--extension`, `--profile`, `--state`, or `--allow-file-access`. Install Lightpanda from https://lightpanda.io/docs/open-source/installation.
718718-719719-## Observability Dashboard
720720-721721-The dashboard is a standalone background server that shows live browser viewports, command activity, and console output for all sessions.
722722-723723-```bash
724724-# Install the dashboard once
725725-agent-browser dashboard install
726726-727727-# Start the dashboard server (background, port 4848)
728728-agent-browser dashboard start
729729-730730-# All sessions are automatically visible in the dashboard
731731-agent-browser open example.com
732732-733733-# Stop the dashboard
734734-agent-browser dashboard stop
735735-```
736736-737737-The dashboard runs independently of browser sessions on port 4848 (configurable with `--port`). All sessions automatically stream to the dashboard. Sessions can also be created from the dashboard UI with local engines or cloud providers.
738738-739739-## Ready-to-Use Templates
740740-741741-| Template | Description |
742742-| ------------------------------------------------------------------------ | ----------------------------------- |
743743-| [templates/form-automation.sh](templates/form-automation.sh) | Form filling with validation |
744744-| [templates/authenticated-session.sh](templates/authenticated-session.sh) | Login once, reuse state |
745745-| [templates/capture-workflow.sh](templates/capture-workflow.sh) | Content extraction with screenshots |
746746-747747-```bash
748748-./templates/form-automation.sh https://example.com/form
749749-./templates/authenticated-session.sh https://app.example.com/login
750750-./templates/capture-workflow.sh https://example.com ./output
751751-```
···11-# Authentication Patterns
22-33-Login flows, session persistence, OAuth, 2FA, and authenticated browsing.
44-55-**Related**: [session-management.md](session-management.md) for state persistence details, [SKILL.md](../SKILL.md) for quick start.
66-77-## Contents
88-99-- [Import Auth from Your Browser](#import-auth-from-your-browser)
1010-- [Persistent Profiles](#persistent-profiles)
1111-- [Session Persistence](#session-persistence)
1212-- [Basic Login Flow](#basic-login-flow)
1313-- [Saving Authentication State](#saving-authentication-state)
1414-- [Restoring Authentication](#restoring-authentication)
1515-- [OAuth / SSO Flows](#oauth--sso-flows)
1616-- [Two-Factor Authentication](#two-factor-authentication)
1717-- [HTTP Basic Auth](#http-basic-auth)
1818-- [Cookie-Based Auth](#cookie-based-auth)
1919-- [Token Refresh Handling](#token-refresh-handling)
2020-- [Security Best Practices](#security-best-practices)
2121-2222-## Import Auth from Your Browser
2323-2424-The fastest way to authenticate is to reuse cookies from a Chrome session you are already logged into.
2525-2626-**Step 1: Start Chrome with remote debugging**
2727-2828-```bash
2929-# macOS
3030-"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222
3131-3232-# Linux
3333-google-chrome --remote-debugging-port=9222
3434-3535-# Windows
3636-"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
3737-```
3838-3939-Log in to your target site(s) in this Chrome window as you normally would.
4040-4141-> **Security note:** `--remote-debugging-port` exposes full browser control on localhost. Any local process can connect and read cookies, execute JS, etc. Only use on trusted machines and close Chrome when done.
4242-4343-**Step 2: Grab the auth state**
4444-4545-```bash
4646-# Auto-discover the running Chrome and save its cookies + localStorage
4747-agent-browser --auto-connect state save ./my-auth.json
4848-```
4949-5050-**Step 3: Reuse in automation**
5151-5252-```bash
5353-# Load auth at launch
5454-agent-browser --state ./my-auth.json open https://app.example.com/dashboard
5555-5656-# Or load into an existing session
5757-agent-browser state load ./my-auth.json
5858-agent-browser open https://app.example.com/dashboard
5959-```
6060-6161-This works for any site, including those with complex OAuth flows, SSO, or 2FA -- as long as Chrome already has valid session cookies.
6262-6363-> **Security note:** State files contain session tokens in plaintext. Add them to `.gitignore`, delete when no longer needed, and set `AGENT_BROWSER_ENCRYPTION_KEY` for encryption at rest. See [Security Best Practices](#security-best-practices).
6464-6565-**Tip:** Combine with `--session-name` so the imported auth auto-persists across restarts:
6666-6767-```bash
6868-agent-browser --session-name myapp state load ./my-auth.json
6969-# From now on, state is auto-saved/restored for "myapp"
7070-```
7171-7272-## Persistent Profiles
7373-7474-Use `--profile` to point agent-browser at a Chrome user data directory. This persists everything (cookies, IndexedDB, service workers, cache) across browser restarts without explicit save/load:
7575-7676-```bash
7777-# First run: login once
7878-agent-browser --profile ~/.myapp-profile open https://app.example.com/login
7979-# ... complete login flow ...
8080-8181-# All subsequent runs: already authenticated
8282-agent-browser --profile ~/.myapp-profile open https://app.example.com/dashboard
8383-```
8484-8585-Use different paths for different projects or test users:
8686-8787-```bash
8888-agent-browser --profile ~/.profiles/admin open https://app.example.com
8989-agent-browser --profile ~/.profiles/viewer open https://app.example.com
9090-```
9191-9292-Or set via environment variable:
9393-9494-```bash
9595-export AGENT_BROWSER_PROFILE=~/.myapp-profile
9696-agent-browser open https://app.example.com/dashboard
9797-```
9898-9999-## Session Persistence
100100-101101-Use `--session-name` to auto-save and restore cookies + localStorage by name, without managing files:
102102-103103-```bash
104104-# Auto-saves state on close, auto-restores on next launch
105105-agent-browser --session-name twitter open https://twitter.com
106106-# ... login flow ...
107107-agent-browser close # state saved to ~/.agent-browser/sessions/
108108-109109-# Next time: state is automatically restored
110110-agent-browser --session-name twitter open https://twitter.com
111111-```
112112-113113-Encrypt state at rest:
114114-115115-```bash
116116-export AGENT_BROWSER_ENCRYPTION_KEY=$(openssl rand -hex 32)
117117-agent-browser --session-name secure open https://app.example.com
118118-```
119119-120120-## Basic Login Flow
121121-122122-```bash
123123-# Navigate to login page
124124-agent-browser open https://app.example.com/login
125125-agent-browser wait --load networkidle
126126-127127-# Get form elements
128128-agent-browser snapshot -i
129129-# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Sign In"
130130-131131-# Fill credentials
132132-agent-browser fill @e1 "user@example.com"
133133-agent-browser fill @e2 "password123"
134134-135135-# Submit
136136-agent-browser click @e3
137137-agent-browser wait --load networkidle
138138-139139-# Verify login succeeded
140140-agent-browser get url # Should be dashboard, not login
141141-```
142142-143143-## Saving Authentication State
144144-145145-After logging in, save state for reuse:
146146-147147-```bash
148148-# Login first (see above)
149149-agent-browser open https://app.example.com/login
150150-agent-browser snapshot -i
151151-agent-browser fill @e1 "user@example.com"
152152-agent-browser fill @e2 "password123"
153153-agent-browser click @e3
154154-agent-browser wait --url "**/dashboard"
155155-156156-# Save authenticated state
157157-agent-browser state save ./auth-state.json
158158-```
159159-160160-## Restoring Authentication
161161-162162-Skip login by loading saved state:
163163-164164-```bash
165165-# Load saved auth state
166166-agent-browser state load ./auth-state.json
167167-168168-# Navigate directly to protected page
169169-agent-browser open https://app.example.com/dashboard
170170-171171-# Verify authenticated
172172-agent-browser snapshot -i
173173-```
174174-175175-## OAuth / SSO Flows
176176-177177-For OAuth redirects:
178178-179179-```bash
180180-# Start OAuth flow
181181-agent-browser open https://app.example.com/auth/google
182182-183183-# Handle redirects automatically
184184-agent-browser wait --url "**/accounts.google.com**"
185185-agent-browser snapshot -i
186186-187187-# Fill Google credentials
188188-agent-browser fill @e1 "user@gmail.com"
189189-agent-browser click @e2 # Next button
190190-agent-browser wait 2000
191191-agent-browser snapshot -i
192192-agent-browser fill @e3 "password"
193193-agent-browser click @e4 # Sign in
194194-195195-# Wait for redirect back
196196-agent-browser wait --url "**/app.example.com**"
197197-agent-browser state save ./oauth-state.json
198198-```
199199-200200-## Two-Factor Authentication
201201-202202-Handle 2FA with manual intervention:
203203-204204-```bash
205205-# Login with credentials
206206-agent-browser open https://app.example.com/login --headed # Show browser
207207-agent-browser snapshot -i
208208-agent-browser fill @e1 "user@example.com"
209209-agent-browser fill @e2 "password123"
210210-agent-browser click @e3
211211-212212-# Wait for user to complete 2FA manually
213213-echo "Complete 2FA in the browser window..."
214214-agent-browser wait --url "**/dashboard" --timeout 120000
215215-216216-# Save state after 2FA
217217-agent-browser state save ./2fa-state.json
218218-```
219219-220220-## HTTP Basic Auth
221221-222222-For sites using HTTP Basic Authentication:
223223-224224-```bash
225225-# Set credentials before navigation
226226-agent-browser set credentials username password
227227-228228-# Navigate to protected resource
229229-agent-browser open https://protected.example.com/api
230230-```
231231-232232-## Cookie-Based Auth
233233-234234-Manually set authentication cookies:
235235-236236-```bash
237237-# Set auth cookie
238238-agent-browser cookies set session_token "abc123xyz"
239239-240240-# Navigate to protected page
241241-agent-browser open https://app.example.com/dashboard
242242-```
243243-244244-## Token Refresh Handling
245245-246246-For sessions with expiring tokens:
247247-248248-```bash
249249-#!/bin/bash
250250-# Wrapper that handles token refresh
251251-252252-STATE_FILE="./auth-state.json"
253253-254254-# Try loading existing state
255255-if [[ -f "$STATE_FILE" ]]; then
256256- agent-browser state load "$STATE_FILE"
257257- agent-browser open https://app.example.com/dashboard
258258-259259- # Check if session is still valid
260260- URL=$(agent-browser get url)
261261- if [[ "$URL" == *"/login"* ]]; then
262262- echo "Session expired, re-authenticating..."
263263- # Perform fresh login
264264- agent-browser snapshot -i
265265- agent-browser fill @e1 "$USERNAME"
266266- agent-browser fill @e2 "$PASSWORD"
267267- agent-browser click @e3
268268- agent-browser wait --url "**/dashboard"
269269- agent-browser state save "$STATE_FILE"
270270- fi
271271-else
272272- # First-time login
273273- agent-browser open https://app.example.com/login
274274- # ... login flow ...
275275-fi
276276-```
277277-278278-## Security Best Practices
279279-280280-1. **Never commit state files** - They contain session tokens
281281-282282- ```bash
283283- echo "*.auth-state.json" >> .gitignore
284284- ```
285285-286286-2. **Use environment variables for credentials**
287287-288288- ```bash
289289- agent-browser fill @e1 "$APP_USERNAME"
290290- agent-browser fill @e2 "$APP_PASSWORD"
291291- ```
292292-293293-3. **Clean up after automation**
294294-295295- ```bash
296296- agent-browser cookies clear
297297- rm -f ./auth-state.json
298298- ```
299299-300300-4. **Use short-lived sessions for CI/CD**
301301- ```bash
302302- # Don't persist state in CI
303303- agent-browser open https://app.example.com/login
304304- # ... login and perform actions ...
305305- agent-browser close # Session ends, nothing persisted
306306- ```
···11-# Command Reference
22-33-Complete reference for all agent-browser commands. For quick start and common patterns, see SKILL.md.
44-55-## Navigation
66-77-```bash
88-agent-browser open <url> # Navigate to URL (aliases: goto, navigate)
99- # Supports: https://, http://, file://, about:, data://
1010- # Auto-prepends https:// if no protocol given
1111-agent-browser back # Go back
1212-agent-browser forward # Go forward
1313-agent-browser reload # Reload page
1414-agent-browser close # Close browser (aliases: quit, exit)
1515-agent-browser connect 9222 # Connect to browser via CDP port
1616-```
1717-1818-## Snapshot (page analysis)
1919-2020-```bash
2121-agent-browser snapshot # Full accessibility tree
2222-agent-browser snapshot -i # Interactive elements only (recommended)
2323-agent-browser snapshot -c # Compact output
2424-agent-browser snapshot -d 3 # Limit depth to 3
2525-agent-browser snapshot -s "#main" # Scope to CSS selector
2626-```
2727-2828-## Interactions (use @refs from snapshot)
2929-3030-```bash
3131-agent-browser click @e1 # Click
3232-agent-browser click @e1 --new-tab # Click and open in new tab
3333-agent-browser dblclick @e1 # Double-click
3434-agent-browser focus @e1 # Focus element
3535-agent-browser fill @e2 "text" # Clear and type
3636-agent-browser type @e2 "text" # Type without clearing
3737-agent-browser press Enter # Press key (alias: key)
3838-agent-browser press Control+a # Key combination
3939-agent-browser keydown Shift # Hold key down
4040-agent-browser keyup Shift # Release key
4141-agent-browser hover @e1 # Hover
4242-agent-browser check @e1 # Check checkbox
4343-agent-browser uncheck @e1 # Uncheck checkbox
4444-agent-browser select @e1 "value" # Select dropdown option
4545-agent-browser select @e1 "a" "b" # Select multiple options
4646-agent-browser scroll down 500 # Scroll page (default: down 300px)
4747-agent-browser scrollintoview @e1 # Scroll element into view (alias: scrollinto)
4848-agent-browser drag @e1 @e2 # Drag and drop
4949-agent-browser upload @e1 file.pdf # Upload files
5050-```
5151-5252-## Get Information
5353-5454-```bash
5555-agent-browser get text @e1 # Get element text
5656-agent-browser get html @e1 # Get innerHTML
5757-agent-browser get value @e1 # Get input value
5858-agent-browser get attr @e1 href # Get attribute
5959-agent-browser get title # Get page title
6060-agent-browser get url # Get current URL
6161-agent-browser get cdp-url # Get CDP WebSocket URL
6262-agent-browser get count ".item" # Count matching elements
6363-agent-browser get box @e1 # Get bounding box
6464-agent-browser get styles @e1 # Get computed styles (font, color, bg, etc.)
6565-```
6666-6767-## Check State
6868-6969-```bash
7070-agent-browser is visible @e1 # Check if visible
7171-agent-browser is enabled @e1 # Check if enabled
7272-agent-browser is checked @e1 # Check if checked
7373-```
7474-7575-## Screenshots and PDF
7676-7777-```bash
7878-agent-browser screenshot # Save to temporary directory
7979-agent-browser screenshot path.png # Save to specific path
8080-agent-browser screenshot --full # Full page
8181-agent-browser pdf output.pdf # Save as PDF
8282-```
8383-8484-## Video Recording
8585-8686-```bash
8787-agent-browser record start ./demo.webm # Start recording
8888-agent-browser click @e1 # Perform actions
8989-agent-browser record stop # Stop and save video
9090-agent-browser record restart ./take2.webm # Stop current + start new
9191-```
9292-9393-## Wait
9494-9595-```bash
9696-agent-browser wait @e1 # Wait for element
9797-agent-browser wait 2000 # Wait milliseconds
9898-agent-browser wait --text "Success" # Wait for text (or -t)
9999-agent-browser wait --url "**/dashboard" # Wait for URL pattern (or -u)
100100-agent-browser wait --load networkidle # Wait for network idle (or -l)
101101-agent-browser wait --fn "window.ready" # Wait for JS condition (or -f)
102102-```
103103-104104-## Mouse Control
105105-106106-```bash
107107-agent-browser mouse move 100 200 # Move mouse
108108-agent-browser mouse down left # Press button
109109-agent-browser mouse up left # Release button
110110-agent-browser mouse wheel 100 # Scroll wheel
111111-```
112112-113113-## Semantic Locators (alternative to refs)
114114-115115-```bash
116116-agent-browser find role button click --name "Submit"
117117-agent-browser find text "Sign In" click
118118-agent-browser find text "Sign In" click --exact # Exact match only
119119-agent-browser find label "Email" fill "user@test.com"
120120-agent-browser find placeholder "Search" type "query"
121121-agent-browser find alt "Logo" click
122122-agent-browser find title "Close" click
123123-agent-browser find testid "submit-btn" click
124124-agent-browser find first ".item" click
125125-agent-browser find last ".item" click
126126-agent-browser find nth 2 "a" hover
127127-```
128128-129129-## Browser Settings
130130-131131-```bash
132132-agent-browser set viewport 1920 1080 # Set viewport size
133133-agent-browser set viewport 1920 1080 2 # 2x retina (same CSS size, higher res screenshots)
134134-agent-browser set device "iPhone 14" # Emulate device
135135-agent-browser set geo 37.7749 -122.4194 # Set geolocation (alias: geolocation)
136136-agent-browser set offline on # Toggle offline mode
137137-agent-browser set headers '{"X-Key":"v"}' # Extra HTTP headers
138138-agent-browser set credentials user pass # HTTP basic auth (alias: auth)
139139-agent-browser set media dark # Emulate color scheme
140140-agent-browser set media light reduced-motion # Light mode + reduced motion
141141-```
142142-143143-## Cookies and Storage
144144-145145-```bash
146146-agent-browser cookies # Get all cookies
147147-agent-browser cookies set name value # Set cookie
148148-agent-browser cookies clear # Clear cookies
149149-agent-browser storage local # Get all localStorage
150150-agent-browser storage local key # Get specific key
151151-agent-browser storage local set k v # Set value
152152-agent-browser storage local clear # Clear all
153153-```
154154-155155-## Network
156156-157157-```bash
158158-agent-browser network route <url> # Intercept requests
159159-agent-browser network route <url> --abort # Block requests
160160-agent-browser network route <url> --body '{}' # Mock response
161161-agent-browser network unroute [url] # Remove routes
162162-agent-browser network requests # View tracked requests
163163-agent-browser network requests --filter api # Filter requests
164164-```
165165-166166-## Tabs and Windows
167167-168168-```bash
169169-agent-browser tab # List tabs
170170-agent-browser tab new [url] # New tab
171171-agent-browser tab 2 # Switch to tab by index
172172-agent-browser tab close # Close current tab
173173-agent-browser tab close 2 # Close tab by index
174174-agent-browser window new # New window
175175-```
176176-177177-## Frames
178178-179179-```bash
180180-agent-browser frame "#iframe" # Switch to iframe by CSS selector
181181-agent-browser frame @e3 # Switch to iframe by element ref
182182-agent-browser frame main # Back to main frame
183183-```
184184-185185-### Iframe support
186186-187187-Iframes are detected automatically during snapshots. When the main-frame snapshot runs, `Iframe` nodes are resolved and their content is inlined beneath the iframe element in the output (one level of nesting; iframes within iframes are not expanded).
188188-189189-```bash
190190-agent-browser snapshot -i
191191-# @e3 [Iframe] "payment-frame"
192192-# @e4 [input] "Card number"
193193-# @e5 [button] "Pay"
194194-195195-# Interact directly — refs inside iframes already work
196196-agent-browser fill @e4 "4111111111111111"
197197-agent-browser click @e5
198198-199199-# Or switch frame context for scoped snapshots
200200-agent-browser frame @e3 # Switch using element ref
201201-agent-browser snapshot -i # Snapshot scoped to that iframe
202202-agent-browser frame main # Return to main frame
203203-```
204204-205205-The `frame` command accepts:
206206-207207-- **Element refs** — `frame @e3` resolves the ref to an iframe element
208208-- **CSS selectors** — `frame "#payment-iframe"` finds the iframe by selector
209209-- **Frame name/URL** — matches against the browser's frame tree
210210-211211-## Dialogs
212212-213213-By default, `alert` and `beforeunload` dialogs are automatically accepted so they never block the agent. `confirm` and `prompt` dialogs still require explicit handling. Use `--no-auto-dialog` to disable this behavior.
214214-215215-```bash
216216-agent-browser dialog accept [text] # Accept dialog
217217-agent-browser dialog dismiss # Dismiss dialog
218218-agent-browser dialog status # Check if a dialog is currently open
219219-```
220220-221221-## JavaScript
222222-223223-```bash
224224-agent-browser eval "document.title" # Simple expressions only
225225-agent-browser eval -b "<base64>" # Any JavaScript (base64 encoded)
226226-agent-browser eval --stdin # Read script from stdin
227227-```
228228-229229-Use `-b`/`--base64` or `--stdin` for reliable execution. Shell escaping with nested quotes and special characters is error-prone.
230230-231231-```bash
232232-# Base64 encode your script, then:
233233-agent-browser eval -b "ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignW3NyYyo9Il9uZXh0Il0nKQ=="
234234-235235-# Or use stdin with heredoc for multiline scripts:
236236-cat <<'EOF' | agent-browser eval --stdin
237237-const links = document.querySelectorAll('a');
238238-Array.from(links).map(a => a.href);
239239-EOF
240240-```
241241-242242-## State Management
243243-244244-```bash
245245-agent-browser state save auth.json # Save cookies, storage, auth state
246246-agent-browser state load auth.json # Restore saved state
247247-```
248248-249249-## Global Options
250250-251251-```bash
252252-agent-browser --session <name> ... # Isolated browser session
253253-agent-browser --json ... # JSON output for parsing
254254-agent-browser --headed ... # Show browser window (not headless)
255255-agent-browser --full ... # Full page screenshot (-f)
256256-agent-browser --cdp <port> ... # Connect via Chrome DevTools Protocol
257257-agent-browser -p <provider> ... # Cloud browser provider (--provider)
258258-agent-browser --proxy <url> ... # Use proxy server
259259-agent-browser --proxy-bypass <hosts> # Hosts to bypass proxy
260260-agent-browser --headers <json> ... # HTTP headers scoped to URL's origin
261261-agent-browser --executable-path <p> # Custom browser executable
262262-agent-browser --extension <path> ... # Load browser extension (repeatable)
263263-agent-browser --ignore-https-errors # Ignore SSL certificate errors
264264-agent-browser --help # Show help (-h)
265265-agent-browser --version # Show version (-V)
266266-agent-browser <command> --help # Show detailed help for a command
267267-```
268268-269269-## Debugging
270270-271271-```bash
272272-agent-browser --headed open example.com # Show browser window
273273-agent-browser --cdp 9222 snapshot # Connect via CDP port
274274-agent-browser connect 9222 # Alternative: connect command
275275-agent-browser console # View console messages
276276-agent-browser console --clear # Clear console
277277-agent-browser errors # View page errors
278278-agent-browser errors --clear # Clear errors
279279-agent-browser highlight @e1 # Highlight element
280280-agent-browser inspect # Open Chrome DevTools for this session
281281-agent-browser trace start # Start recording trace
282282-agent-browser trace stop trace.zip # Stop and save trace
283283-agent-browser profiler start # Start Chrome DevTools profiling
284284-agent-browser profiler stop trace.json # Stop and save profile
285285-```
286286-287287-## Environment Variables
288288-289289-```bash
290290-AGENT_BROWSER_SESSION="mysession" # Default session name
291291-AGENT_BROWSER_EXECUTABLE_PATH="/path/chrome" # Custom browser path
292292-AGENT_BROWSER_EXTENSIONS="/ext1,/ext2" # Comma-separated extension paths
293293-AGENT_BROWSER_PROVIDER="browserbase" # Cloud browser provider
294294-AGENT_BROWSER_STREAM_PORT="9223" # Override WebSocket streaming port (default: OS-assigned)
295295-AGENT_BROWSER_HOME="/path/to/agent-browser" # Custom install location
296296-```
···11-# Proxy Support
22-33-Proxy configuration for geo-testing, rate limiting avoidance, and corporate environments.
44-55-**Related**: [commands.md](commands.md) for global options, [SKILL.md](../SKILL.md) for quick start.
66-77-## Contents
88-99-- [Basic Proxy Configuration](#basic-proxy-configuration)
1010-- [Authenticated Proxy](#authenticated-proxy)
1111-- [SOCKS Proxy](#socks-proxy)
1212-- [Proxy Bypass](#proxy-bypass)
1313-- [Common Use Cases](#common-use-cases)
1414-- [Verifying Proxy Connection](#verifying-proxy-connection)
1515-- [Troubleshooting](#troubleshooting)
1616-- [Best Practices](#best-practices)
1717-1818-## Basic Proxy Configuration
1919-2020-Use the `--proxy` flag or set proxy via environment variable:
2121-2222-```bash
2323-# Via CLI flag
2424-agent-browser --proxy "http://proxy.example.com:8080" open https://example.com
2525-2626-# Via environment variable
2727-export HTTP_PROXY="http://proxy.example.com:8080"
2828-agent-browser open https://example.com
2929-3030-# HTTPS proxy
3131-export HTTPS_PROXY="https://proxy.example.com:8080"
3232-agent-browser open https://example.com
3333-3434-# Both
3535-export HTTP_PROXY="http://proxy.example.com:8080"
3636-export HTTPS_PROXY="http://proxy.example.com:8080"
3737-agent-browser open https://example.com
3838-```
3939-4040-## Authenticated Proxy
4141-4242-For proxies requiring authentication:
4343-4444-```bash
4545-# Include credentials in URL
4646-export HTTP_PROXY="http://username:password@proxy.example.com:8080"
4747-agent-browser open https://example.com
4848-```
4949-5050-## SOCKS Proxy
5151-5252-```bash
5353-# SOCKS5 proxy
5454-export ALL_PROXY="socks5://proxy.example.com:1080"
5555-agent-browser open https://example.com
5656-5757-# SOCKS5 with auth
5858-export ALL_PROXY="socks5://user:pass@proxy.example.com:1080"
5959-agent-browser open https://example.com
6060-```
6161-6262-## Proxy Bypass
6363-6464-Skip proxy for specific domains using `--proxy-bypass` or `NO_PROXY`:
6565-6666-```bash
6767-# Via CLI flag
6868-agent-browser --proxy "http://proxy.example.com:8080" --proxy-bypass "localhost,*.internal.com" open https://example.com
6969-7070-# Via environment variable
7171-export NO_PROXY="localhost,127.0.0.1,.internal.company.com"
7272-agent-browser open https://internal.company.com # Direct connection
7373-agent-browser open https://external.com # Via proxy
7474-```
7575-7676-## Common Use Cases
7777-7878-### Geo-Location Testing
7979-8080-```bash
8181-#!/bin/bash
8282-# Test site from different regions using geo-located proxies
8383-8484-PROXIES=(
8585- "http://us-proxy.example.com:8080"
8686- "http://eu-proxy.example.com:8080"
8787- "http://asia-proxy.example.com:8080"
8888-)
8989-9090-for proxy in "${PROXIES[@]}"; do
9191- export HTTP_PROXY="$proxy"
9292- export HTTPS_PROXY="$proxy"
9393-9494- region=$(echo "$proxy" | grep -oP '^\w+-\w+')
9595- echo "Testing from: $region"
9696-9797- agent-browser --session "$region" open https://example.com
9898- agent-browser --session "$region" screenshot "./screenshots/$region.png"
9999- agent-browser --session "$region" close
100100-done
101101-```
102102-103103-### Rotating Proxies for Scraping
104104-105105-```bash
106106-#!/bin/bash
107107-# Rotate through proxy list to avoid rate limiting
108108-109109-PROXY_LIST=(
110110- "http://proxy1.example.com:8080"
111111- "http://proxy2.example.com:8080"
112112- "http://proxy3.example.com:8080"
113113-)
114114-115115-URLS=(
116116- "https://site.com/page1"
117117- "https://site.com/page2"
118118- "https://site.com/page3"
119119-)
120120-121121-for i in "${!URLS[@]}"; do
122122- proxy_index=$((i % ${#PROXY_LIST[@]}))
123123- export HTTP_PROXY="${PROXY_LIST[$proxy_index]}"
124124- export HTTPS_PROXY="${PROXY_LIST[$proxy_index]}"
125125-126126- agent-browser open "${URLS[$i]}"
127127- agent-browser get text body > "output-$i.txt"
128128- agent-browser close
129129-130130- sleep 1 # Polite delay
131131-done
132132-```
133133-134134-### Corporate Network Access
135135-136136-```bash
137137-#!/bin/bash
138138-# Access internal sites via corporate proxy
139139-140140-export HTTP_PROXY="http://corpproxy.company.com:8080"
141141-export HTTPS_PROXY="http://corpproxy.company.com:8080"
142142-export NO_PROXY="localhost,127.0.0.1,.company.com"
143143-144144-# External sites go through proxy
145145-agent-browser open https://external-vendor.com
146146-147147-# Internal sites bypass proxy
148148-agent-browser open https://intranet.company.com
149149-```
150150-151151-## Verifying Proxy Connection
152152-153153-```bash
154154-# Check your apparent IP
155155-agent-browser open https://httpbin.org/ip
156156-agent-browser get text body
157157-# Should show proxy's IP, not your real IP
158158-```
159159-160160-## Troubleshooting
161161-162162-### Proxy Connection Failed
163163-164164-```bash
165165-# Test proxy connectivity first
166166-curl -x http://proxy.example.com:8080 https://httpbin.org/ip
167167-168168-# Check if proxy requires auth
169169-export HTTP_PROXY="http://user:pass@proxy.example.com:8080"
170170-```
171171-172172-### SSL/TLS Errors Through Proxy
173173-174174-Some proxies perform SSL inspection. If you encounter certificate errors:
175175-176176-```bash
177177-# For testing only - not recommended for production
178178-agent-browser open https://example.com --ignore-https-errors
179179-```
180180-181181-### Slow Performance
182182-183183-```bash
184184-# Use proxy only when necessary
185185-export NO_PROXY="*.cdn.com,*.static.com" # Direct CDN access
186186-```
187187-188188-## Best Practices
189189-190190-1. **Use environment variables** - Don't hardcode proxy credentials
191191-2. **Set NO_PROXY appropriately** - Avoid routing local traffic through proxy
192192-3. **Test proxy before automation** - Verify connectivity with simple requests
193193-4. **Handle proxy failures gracefully** - Implement retry logic for unstable proxies
194194-5. **Rotate proxies for large scraping jobs** - Distribute load and avoid bans
···11-# Session Management
22-33-Multiple isolated browser sessions with state persistence and concurrent browsing.
44-55-**Related**: [authentication.md](authentication.md) for login patterns, [SKILL.md](../SKILL.md) for quick start.
66-77-## Contents
88-99-- [Named Sessions](#named-sessions)
1010-- [Session Isolation Properties](#session-isolation-properties)
1111-- [Session State Persistence](#session-state-persistence)
1212-- [Common Patterns](#common-patterns)
1313-- [Default Session](#default-session)
1414-- [Session Cleanup](#session-cleanup)
1515-- [Best Practices](#best-practices)
1616-1717-## Named Sessions
1818-1919-Use `--session` flag to isolate browser contexts:
2020-2121-```bash
2222-# Session 1: Authentication flow
2323-agent-browser --session auth open https://app.example.com/login
2424-2525-# Session 2: Public browsing (separate cookies, storage)
2626-agent-browser --session public open https://example.com
2727-2828-# Commands are isolated by session
2929-agent-browser --session auth fill @e1 "user@example.com"
3030-agent-browser --session public get text body
3131-```
3232-3333-## Session Isolation Properties
3434-3535-Each session has independent:
3636-3737-- Cookies
3838-- LocalStorage / SessionStorage
3939-- IndexedDB
4040-- Cache
4141-- Browsing history
4242-- Open tabs
4343-4444-## Session State Persistence
4545-4646-### Save Session State
4747-4848-```bash
4949-# Save cookies, storage, and auth state
5050-agent-browser state save /path/to/auth-state.json
5151-```
5252-5353-### Load Session State
5454-5555-```bash
5656-# Restore saved state
5757-agent-browser state load /path/to/auth-state.json
5858-5959-# Continue with authenticated session
6060-agent-browser open https://app.example.com/dashboard
6161-```
6262-6363-### State File Contents
6464-6565-```json
6666-{
6767- "cookies": [...],
6868- "localStorage": {...},
6969- "sessionStorage": {...},
7070- "origins": [...]
7171-}
7272-```
7373-7474-## Common Patterns
7575-7676-### Authenticated Session Reuse
7777-7878-```bash
7979-#!/bin/bash
8080-# Save login state once, reuse many times
8181-8282-STATE_FILE="/tmp/auth-state.json"
8383-8484-# Check if we have saved state
8585-if [[ -f "$STATE_FILE" ]]; then
8686- agent-browser state load "$STATE_FILE"
8787- agent-browser open https://app.example.com/dashboard
8888-else
8989- # Perform login
9090- agent-browser open https://app.example.com/login
9191- agent-browser snapshot -i
9292- agent-browser fill @e1 "$USERNAME"
9393- agent-browser fill @e2 "$PASSWORD"
9494- agent-browser click @e3
9595- agent-browser wait --load networkidle
9696-9797- # Save for future use
9898- agent-browser state save "$STATE_FILE"
9999-fi
100100-```
101101-102102-### Concurrent Scraping
103103-104104-```bash
105105-#!/bin/bash
106106-# Scrape multiple sites concurrently
107107-108108-# Start all sessions
109109-agent-browser --session site1 open https://site1.com &
110110-agent-browser --session site2 open https://site2.com &
111111-agent-browser --session site3 open https://site3.com &
112112-wait
113113-114114-# Extract from each
115115-agent-browser --session site1 get text body > site1.txt
116116-agent-browser --session site2 get text body > site2.txt
117117-agent-browser --session site3 get text body > site3.txt
118118-119119-# Cleanup
120120-agent-browser --session site1 close
121121-agent-browser --session site2 close
122122-agent-browser --session site3 close
123123-```
124124-125125-### A/B Testing Sessions
126126-127127-```bash
128128-# Test different user experiences
129129-agent-browser --session variant-a open "https://app.com?variant=a"
130130-agent-browser --session variant-b open "https://app.com?variant=b"
131131-132132-# Compare
133133-agent-browser --session variant-a screenshot /tmp/variant-a.png
134134-agent-browser --session variant-b screenshot /tmp/variant-b.png
135135-```
136136-137137-## Default Session
138138-139139-When `--session` is omitted, commands use the default session:
140140-141141-```bash
142142-# These use the same default session
143143-agent-browser open https://example.com
144144-agent-browser snapshot -i
145145-agent-browser close # Closes default session
146146-```
147147-148148-## Session Cleanup
149149-150150-```bash
151151-# Close specific session
152152-agent-browser --session auth close
153153-154154-# List active sessions
155155-agent-browser session list
156156-```
157157-158158-## Best Practices
159159-160160-### 1. Name Sessions Semantically
161161-162162-```bash
163163-# GOOD: Clear purpose
164164-agent-browser --session github-auth open https://github.com
165165-agent-browser --session docs-scrape open https://docs.example.com
166166-167167-# AVOID: Generic names
168168-agent-browser --session s1 open https://github.com
169169-```
170170-171171-### 2. Always Clean Up
172172-173173-```bash
174174-# Close sessions when done
175175-agent-browser --session auth close
176176-agent-browser --session scrape close
177177-```
178178-179179-### 3. Handle State Files Securely
180180-181181-```bash
182182-# Don't commit state files (contain auth tokens!)
183183-echo "*.auth-state.json" >> .gitignore
184184-185185-# Delete after use
186186-rm /tmp/auth-state.json
187187-```
188188-189189-### 4. Timeout Long Sessions
190190-191191-```bash
192192-# Set timeout for automated scripts
193193-timeout 60 agent-browser --session long-task get text body
194194-```
···11-# Video Recording
22-33-Capture browser automation as video for debugging, documentation, or verification.
44-55-**Related**: [commands.md](commands.md) for full command reference, [SKILL.md](../SKILL.md) for quick start.
66-77-## Contents
88-99-- [Basic Recording](#basic-recording)
1010-- [Recording Commands](#recording-commands)
1111-- [Use Cases](#use-cases)
1212-- [Best Practices](#best-practices)
1313-- [Output Format](#output-format)
1414-- [Limitations](#limitations)
1515-1616-## Basic Recording
1717-1818-```bash
1919-# Start recording
2020-agent-browser record start ./demo.webm
2121-2222-# Perform actions
2323-agent-browser open https://example.com
2424-agent-browser snapshot -i
2525-agent-browser click @e1
2626-agent-browser fill @e2 "test input"
2727-2828-# Stop and save
2929-agent-browser record stop
3030-```
3131-3232-## Recording Commands
3333-3434-```bash
3535-# Start recording to file
3636-agent-browser record start ./output.webm
3737-3838-# Stop current recording
3939-agent-browser record stop
4040-4141-# Restart with new file (stops current + starts new)
4242-agent-browser record restart ./take2.webm
4343-```
4444-4545-## Use Cases
4646-4747-### Debugging Failed Automation
4848-4949-```bash
5050-#!/bin/bash
5151-# Record automation for debugging
5252-5353-agent-browser record start ./debug-$(date +%Y%m%d-%H%M%S).webm
5454-5555-# Run your automation
5656-agent-browser open https://app.example.com
5757-agent-browser snapshot -i
5858-agent-browser click @e1 || {
5959- echo "Click failed - check recording"
6060- agent-browser record stop
6161- exit 1
6262-}
6363-6464-agent-browser record stop
6565-```
6666-6767-### Documentation Generation
6868-6969-```bash
7070-#!/bin/bash
7171-# Record workflow for documentation
7272-7373-agent-browser record start ./docs/how-to-login.webm
7474-7575-agent-browser open https://app.example.com/login
7676-agent-browser wait 1000 # Pause for visibility
7777-7878-agent-browser snapshot -i
7979-agent-browser fill @e1 "demo@example.com"
8080-agent-browser wait 500
8181-8282-agent-browser fill @e2 "password"
8383-agent-browser wait 500
8484-8585-agent-browser click @e3
8686-agent-browser wait --load networkidle
8787-agent-browser wait 1000 # Show result
8888-8989-agent-browser record stop
9090-```
9191-9292-### CI/CD Test Evidence
9393-9494-```bash
9595-#!/bin/bash
9696-# Record E2E test runs for CI artifacts
9797-9898-TEST_NAME="${1:-e2e-test}"
9999-RECORDING_DIR="./test-recordings"
100100-mkdir -p "$RECORDING_DIR"
101101-102102-agent-browser record start "$RECORDING_DIR/$TEST_NAME-$(date +%s).webm"
103103-104104-# Run test
105105-if run_e2e_test; then
106106- echo "Test passed"
107107-else
108108- echo "Test failed - recording saved"
109109-fi
110110-111111-agent-browser record stop
112112-```
113113-114114-## Best Practices
115115-116116-### 1. Add Pauses for Clarity
117117-118118-```bash
119119-# Slow down for human viewing
120120-agent-browser click @e1
121121-agent-browser wait 500 # Let viewer see result
122122-```
123123-124124-### 2. Use Descriptive Filenames
125125-126126-```bash
127127-# Include context in filename
128128-agent-browser record start ./recordings/login-flow-2024-01-15.webm
129129-agent-browser record start ./recordings/checkout-test-run-42.webm
130130-```
131131-132132-### 3. Handle Recording in Error Cases
133133-134134-```bash
135135-#!/bin/bash
136136-set -e
137137-138138-cleanup() {
139139- agent-browser record stop 2>/dev/null || true
140140- agent-browser close 2>/dev/null || true
141141-}
142142-trap cleanup EXIT
143143-144144-agent-browser record start ./automation.webm
145145-# ... automation steps ...
146146-```
147147-148148-### 4. Combine with Screenshots
149149-150150-```bash
151151-# Record video AND capture key frames
152152-agent-browser record start ./flow.webm
153153-154154-agent-browser open https://example.com
155155-agent-browser screenshot ./screenshots/step1-homepage.png
156156-157157-agent-browser click @e1
158158-agent-browser screenshot ./screenshots/step2-after-click.png
159159-160160-agent-browser record stop
161161-```
162162-163163-## Output Format
164164-165165-- Default format: WebM (VP8/VP9 codec)
166166-- Compatible with all modern browsers and video players
167167-- Compressed but high quality
168168-169169-## Limitations
170170-171171-- Recording adds slight overhead to automation
172172-- Large recordings can consume significant disk space
173173-- Some headless environments may have codec limitations
···11-#!/bin/bash
22-# Template: Form Automation Workflow
33-# Purpose: Fill and submit web forms with validation
44-# Usage: ./form-automation.sh <form-url>
55-#
66-# This template demonstrates the snapshot-interact-verify pattern:
77-# 1. Navigate to form
88-# 2. Snapshot to get element refs
99-# 3. Fill fields using refs
1010-# 4. Submit and verify result
1111-#
1212-# Customize: Update the refs (@e1, @e2, etc.) based on your form's snapshot output
1313-1414-set -euo pipefail
1515-1616-FORM_URL="${1:?Usage: $0 <form-url>}"
1717-1818-echo "Form automation: $FORM_URL"
1919-2020-# Step 1: Navigate to form
2121-agent-browser open "$FORM_URL"
2222-agent-browser wait --load networkidle
2323-2424-# Step 2: Snapshot to discover form elements
2525-echo ""
2626-echo "Form structure:"
2727-agent-browser snapshot -i
2828-2929-# Step 3: Fill form fields (customize these refs based on snapshot output)
3030-#
3131-# Common field types:
3232-# agent-browser fill @e1 "John Doe" # Text input
3333-# agent-browser fill @e2 "user@example.com" # Email input
3434-# agent-browser fill @e3 "SecureP@ss123" # Password input
3535-# agent-browser select @e4 "Option Value" # Dropdown
3636-# agent-browser check @e5 # Checkbox
3737-# agent-browser click @e6 # Radio button
3838-# agent-browser fill @e7 "Multi-line text" # Textarea
3939-# agent-browser upload @e8 /path/to/file.pdf # File upload
4040-#
4141-# Uncomment and modify:
4242-# agent-browser fill @e1 "Test User"
4343-# agent-browser fill @e2 "test@example.com"
4444-# agent-browser click @e3 # Submit button
4545-4646-# Step 4: Wait for submission
4747-# agent-browser wait --load networkidle
4848-# agent-browser wait --url "**/success" # Or wait for redirect
4949-5050-# Step 5: Verify result
5151-echo ""
5252-echo "Result:"
5353-agent-browser get url
5454-agent-browser snapshot -i
5555-5656-# Optional: Capture evidence
5757-agent-browser screenshot /tmp/form-result.png
5858-echo "Screenshot saved: /tmp/form-result.png"
5959-6060-# Cleanup
6161-agent-browser close
6262-echo "Done"
-188
.agents/skills/animate/SKILL.md
···11----
22-name: animate
33-description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints.
1414-1515----
1616-1717-## Assess Animation Opportunities
1818-1919-Analyze where motion would improve the experience:
2020-2121-1. **Identify static areas**:
2222- - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
2323- - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
2424- - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
2525- - **Lack of delight**: Functional but joyless interactions
2626- - **Missed guidance**: Opportunities to direct attention or explain behavior
2727-2828-2. **Understand the context**:
2929- - What's the personality? (Playful vs serious, energetic vs calm)
3030- - What's the performance budget? (Mobile-first? Complex page?)
3131- - Who's the audience? (Motion-sensitive users? Power users who want speed?)
3232- - What matters most? (One hero animation vs many micro-interactions?)
3333-3434-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
3535-3636-**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
3737-3838-## Plan Animation Strategy
3939-4040-Create a purposeful animation plan:
4141-4242-- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
4343-- **Feedback layer**: Which interactions need acknowledgment?
4444-- **Transition layer**: Which state changes need smoothing?
4545-- **Delight layer**: Where can we surprise and delight?
4646-4747-**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
4848-4949-## Implement Animations
5050-5151-Add motion systematically across these categories:
5252-5353-### Entrance Animations
5454-5555-- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
5656-- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
5757-- **Content reveals**: Scroll-triggered animations using intersection observer
5858-- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
5959-6060-### Micro-interactions
6161-6262-- **Button feedback**:
6363- - Hover: Subtle scale (1.02-1.05), color shift, shadow increase
6464- - Click: Quick scale down then up (0.95 → 1), ripple effect
6565- - Loading: Spinner or pulse state
6666-- **Form interactions**:
6767- - Input focus: Border color transition, slight scale or glow
6868- - Validation: Shake on error, check mark on success, smooth color transitions
6969-- **Toggle switches**: Smooth slide + color transition (200-300ms)
7070-- **Checkboxes/radio**: Check mark animation, ripple effect
7171-- **Like/favorite**: Scale + rotation, particle effects, color transition
7272-7373-### State Transitions
7474-7575-- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
7676-- **Expand/collapse**: Height transition with overflow handling, icon rotation
7777-- **Loading states**: Skeleton screen fades, spinner animations, progress bars
7878-- **Success/error**: Color transitions, icon animations, gentle scale pulse
7979-- **Enable/disable**: Opacity transitions, cursor changes
8080-8181-### Navigation & Flow
8282-8383-- **Page transitions**: Crossfade between routes, shared element transitions
8484-- **Tab switching**: Slide indicator, content fade/slide
8585-- **Carousel/slider**: Smooth transforms, snap points, momentum
8686-- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
8787-8888-### Feedback & Guidance
8989-9090-- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
9191-- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
9292-- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
9393-- **Focus flow**: Highlight path through form or workflow
9494-9595-### Delight Moments
9696-9797-- **Empty states**: Subtle floating animations on illustrations
9898-- **Completed actions**: Confetti, check mark flourish, success celebrations
9999-- **Easter eggs**: Hidden interactions for discovery
100100-- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
101101-102102-## Technical Implementation
103103-104104-Use appropriate techniques for each animation:
105105-106106-### Timing & Easing
107107-108108-**Durations by purpose:**
109109-110110-- **100-150ms**: Instant feedback (button press, toggle)
111111-- **200-300ms**: State changes (hover, menu open)
112112-- **300-500ms**: Layout changes (accordion, modal)
113113-- **500-800ms**: Entrance animations (page load)
114114-115115-**Easing curves (use these, not CSS defaults):**
116116-117117-```css
118118-/* Recommended - natural deceleration */
119119---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
120120---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
121121---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
122122-123123-/* AVOID - feel dated and tacky */
124124-/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
125125-/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
126126-```
127127-128128-**Exit animations are faster than entrances.** Use ~75% of enter duration.
129129-130130-### CSS Animations
131131-132132-```css
133133-/* Prefer for simple, declarative animations */
134134-- transitions for state changes
135135-- @keyframes for complex sequences
136136-- transform + opacity only (GPU-accelerated)
137137-```
138138-139139-### JavaScript Animation
140140-141141-```javascript
142142-/* Use for complex, interactive animations */
143143-- Web Animations API for programmatic control
144144-- Framer Motion for React
145145-- GSAP for complex sequences
146146-```
147147-148148-### Performance
149149-150150-- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
151151-- **will-change**: Add sparingly for known expensive animations
152152-- **Reduce paint**: Minimize repaints, use `contain` where appropriate
153153-- **Monitor FPS**: Ensure 60fps on target devices
154154-155155-### Accessibility
156156-157157-```css
158158-@media (prefers-reduced-motion: reduce) {
159159- * {
160160- animation-duration: 0.01ms !important;
161161- animation-iteration-count: 1 !important;
162162- transition-duration: 0.01ms !important;
163163- }
164164-}
165165-```
166166-167167-**NEVER**:
168168-169169-- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
170170-- Animate layout properties (width, height, top, left)—use transform instead
171171-- Use durations over 500ms for feedback—it feels laggy
172172-- Animate without purpose—every animation needs a reason
173173-- Ignore `prefers-reduced-motion`—this is an accessibility violation
174174-- Animate everything—animation fatigue makes interfaces feel exhausting
175175-- Block interaction during animations unless intentional
176176-177177-## Verify Quality
178178-179179-Test animations thoroughly:
180180-181181-- **Smooth at 60fps**: No jank on target devices
182182-- **Feels natural**: Easing curves feel organic, not robotic
183183-- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
184184-- **Reduced motion works**: Animations disabled or simplified appropriately
185185-- **Doesn't block**: Users can interact during/after animations
186186-- **Adds value**: Makes interface clearer or more delightful
187187-188188-Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right.
-158
.agents/skills/audit/SKILL.md
···11----
22-name: audit
33-description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[area (feature, page, component...)]"
77----
88-99-## MANDATORY PREPARATION
1010-1111-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1212-1313----
1414-1515-Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address.
1616-1717-This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation.
1818-1919-## Diagnostic Scan
2020-2121-Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below.
2222-2323-### 1. Accessibility (A11y)
2424-2525-**Check for**:
2626-2727-- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA)
2828-- **Missing ARIA**: Interactive elements without proper roles, labels, or states
2929-- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps
3030-- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons
3131-- **Alt text**: Missing or poor image descriptions
3232-- **Form issues**: Inputs without labels, poor error messaging, missing required indicators
3333-3434-**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA)
3535-3636-### 2. Performance
3737-3838-**Check for**:
3939-4040-- **Layout thrashing**: Reading/writing layout properties in loops
4141-- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
4242-- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
4343-- **Bundle size**: Unnecessary imports, unused dependencies
4444-- **Render performance**: Unnecessary re-renders, missing memoization
4545-4646-**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized)
4747-4848-### 3. Theming
4949-5050-**Check for**:
5151-5252-- **Hard-coded colors**: Colors not using design tokens
5353-- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme
5454-- **Inconsistent tokens**: Using wrong tokens, mixing token types
5555-- **Theme switching issues**: Values that don't update on theme change
5656-5757-**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly)
5858-5959-### 4. Responsive Design
6060-6161-**Check for**:
6262-6363-- **Fixed widths**: Hard-coded widths that break on mobile
6464-- **Touch targets**: Interactive elements < 44x44px
6565-- **Horizontal scroll**: Content overflow on narrow viewports
6666-- **Text scaling**: Layouts that break when text size increases
6767-- **Missing breakpoints**: No mobile/tablet variants
6868-6969-**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets)
7070-7171-### 5. Anti-Patterns (CRITICAL)
7272-7373-Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy).
7474-7575-**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design)
7676-7777-## Generate Report
7878-7979-### Audit Health Score
8080-8181-| # | Dimension | Score | Key Finding |
8282-| --------- | ----------------- | --------- | ---------------------------------- |
8383-| 1 | Accessibility | ? | [most critical a11y issue or "--"] |
8484-| 2 | Performance | ? | |
8585-| 3 | Responsive Design | ? | |
8686-| 4 | Theming | ? | |
8787-| 5 | Anti-Patterns | ? | |
8888-| **Total** | | **??/20** | **[Rating band]** |
8989-9090-**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues)
9191-9292-### Anti-Patterns Verdict
9393-9494-**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest.
9595-9696-### Executive Summary
9797-9898-- Audit Health Score: **??/20** ([rating band])
9999-- Total issues found (count by severity: P0/P1/P2/P3)
100100-- Top 3-5 critical issues
101101-- Recommended next steps
102102-103103-### Detailed Findings by Severity
104104-105105-Tag every issue with **P0-P3 severity**:
106106-107107-- **P0 Blocking**: Prevents task completion — fix immediately
108108-- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release
109109-- **P2 Minor**: Annoyance, workaround exists — fix in next pass
110110-- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits
111111-112112-For each issue, document:
113113-114114-- **[P?] Issue name**
115115-- **Location**: Component, file, line
116116-- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern
117117-- **Impact**: How it affects users
118118-- **WCAG/Standard**: Which standard it violates (if applicable)
119119-- **Recommendation**: How to fix it
120120-- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive)
121121-122122-### Patterns & Systemic Issues
123123-124124-Identify recurring problems that indicate systemic gaps rather than one-off mistakes:
125125-126126-- "Hard-coded colors appear in 15+ components, should use design tokens"
127127-- "Touch targets consistently too small (<44px) throughout mobile experience"
128128-129129-### Positive Findings
130130-131131-Note what's working well — good practices to maintain and replicate.
132132-133133-## Recommended Actions
134134-135135-List recommended commands in priority order (P0 first, then P1, then P2):
136136-137137-1. **[P?] `/command-name`** — Brief description (specific context from audit findings)
138138-2. **[P?] `/command-name`** — Brief description (specific context)
139139-140140-**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended.
141141-142142-After presenting the summary, tell the user:
143143-144144-> You can ask me to run these one at a time, all at once, or in any order you prefer.
145145->
146146-> Re-run `/audit` after fixes to see your score improve.
147147-148148-**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters.
149149-150150-**NEVER**:
151151-152152-- Report issues without explaining impact (why does this matter?)
153153-- Provide generic recommendations (be specific and actionable)
154154-- Skip positive findings (celebrate what works)
155155-- Forget to prioritize (everything can't be P0)
156156-- Report false positives without verification
157157-158158-Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement.
-124
.agents/skills/bolder/SKILL.md
···11----
22-name: bolder
33-description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1414-1515----
1616-1717-## Assess Current State
1818-1919-Analyze what makes the design feel too safe or boring:
2020-2121-1. **Identify weakness sources**:
2222- - **Generic choices**: System fonts, basic colors, standard layouts
2323- - **Timid scale**: Everything is medium-sized with no drama
2424- - **Low contrast**: Everything has similar visual weight
2525- - **Static**: No motion, no energy, no life
2626- - **Predictable**: Standard patterns with no surprises
2727- - **Flat hierarchy**: Nothing stands out or commands attention
2828-2929-2. **Understand the context**:
3030- - What's the brand personality? (How far can we push?)
3131- - What's the purpose? (Marketing can be bolder than financial dashboards)
3232- - Who's the audience? (What will resonate?)
3333- - What are the constraints? (Brand guidelines, accessibility, performance)
3434-3535-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
3636-3737-**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
3838-3939-**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects."
4040-4141-## Plan Amplification
4242-4343-Create a strategy to increase impact while maintaining coherence:
4444-4545-- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing)
4646-- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane.
4747-- **Risk budget**: How experimental can we be? Push boundaries within constraints.
4848-- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast)
4949-5050-**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration.
5151-5252-## Amplify the Design
5353-5454-Systematically increase impact across these dimensions:
5555-5656-### Typography Amplification
5757-5858-- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration)
5959-- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
6060-- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
6161-- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default)
6262-6363-### Color Intensification
6464-6565-- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon)
6666-- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop
6767-- **Dominant color strategy**: Let one bold color own 60% of the design
6868-- **Sharp accents**: High-contrast accent colors that pop
6969-- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette
7070-- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue)
7171-7272-### Spatial Drama
7373-7474-- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings
7575-- **Break the grid**: Let hero elements escape containers and cross boundaries
7676-- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry
7777-- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px)
7878-- **Overlap**: Layer elements intentionally for depth
7979-8080-### Visual Effects
8181-8282-- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles)
8383-- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue)
8484-- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop)
8585-- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side)
8686-- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
8787-8888-### Motion & Animation
8989-9090-- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays
9191-- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences
9292-- **Micro-interactions**: Satisfying hover effects, click feedback, state changes
9393-- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect)
9494-9595-### Composition Boldness
9696-9797-- **Hero moments**: Create clear focal points with dramatic treatment
9898-- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements
9999-- **Full-bleed elements**: Use full viewport width/height for impact
100100-- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits
101101-102102-**NEVER**:
103103-104104-- Add effects randomly without purpose (chaos ≠ bold)
105105-- Sacrifice readability for aesthetics (body text must be readable)
106106-- Make everything bold (then nothing is bold - need contrast)
107107-- Ignore accessibility (bold design must still meet WCAG standards)
108108-- Overwhelm with motion (animation fatigue is real)
109109-- Copy trendy aesthetics blindly (bold means distinctive, not derivative)
110110-111111-## Verify Quality
112112-113113-Ensure amplification maintains usability and coherence:
114114-115115-- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over.
116116-- **Still functional**: Can users accomplish tasks without distraction?
117117-- **Coherent**: Does everything feel intentional and unified?
118118-- **Memorable**: Will users remember this experience?
119119-- **Performant**: Do all these effects run smoothly?
120120-- **Accessible**: Does it still meet accessibility standards?
121121-122122-**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects."
123123-124124-Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable.
-202
.agents/skills/clarify/SKILL.md
···11----
22-name: clarify
33-description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context.
1414-1515----
1616-1717-## Assess Current Copy
1818-1919-Identify what makes the text unclear or ineffective:
2020-2121-1. **Find clarity problems**:
2222- - **Jargon**: Technical terms users won't understand
2323- - **Ambiguity**: Multiple interpretations possible
2424- - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file"
2525- - **Length**: Too wordy or too terse
2626- - **Assumptions**: Assuming user knowledge they don't have
2727- - **Missing context**: Users don't know what to do or why
2828- - **Tone mismatch**: Too formal, too casual, or inappropriate for situation
2929-3030-2. **Understand the context**:
3131- - Who's the audience? (Technical? General? First-time users?)
3232- - What's the user's mental state? (Stressed during error? Confident during success?)
3333- - What's the action? (What do we want users to do?)
3434- - What's the constraint? (Character limits? Space limitations?)
3535-3636-**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets.
3737-3838-## Plan Copy Improvements
3939-4040-Create a strategy for clearer communication:
4141-4242-- **Primary message**: What's the ONE thing users need to know?
4343-- **Action needed**: What should users do next (if anything)?
4444-- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?)
4545-- **Constraints**: Length limits, brand voice, localization considerations
4646-4747-**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words.
4848-4949-## Improve Copy Systematically
5050-5151-Refine text across these common areas:
5252-5353-### Error Messages
5454-5555-**Bad**: "Error 403: Forbidden"
5656-**Good**: "You don't have permission to view this page. Contact your admin for access."
5757-5858-**Bad**: "Invalid input"
5959-**Good**: "Email addresses need an @ symbol. Try: name@example.com"
6060-6161-**Principles**:
6262-6363-- Explain what went wrong in plain language
6464-- Suggest how to fix it
6565-- Don't blame the user
6666-- Include examples when helpful
6767-- Link to help/support if applicable
6868-6969-### Form Labels & Instructions
7070-7171-**Bad**: "DOB (MM/DD/YYYY)"
7272-**Good**: "Date of birth" (with placeholder showing format)
7373-7474-**Bad**: "Enter value here"
7575-**Good**: "Your email address" or "Company name"
7676-7777-**Principles**:
7878-7979-- Use clear, specific labels (not generic placeholders)
8080-- Show format expectations with examples
8181-- Explain why you're asking (when not obvious)
8282-- Put instructions before the field, not after
8383-- Keep required field indicators clear
8484-8585-### Button & CTA Text
8686-8787-**Bad**: "Click here" | "Submit" | "OK"
8888-**Good**: "Create account" | "Save changes" | "Got it, thanks"
8989-9090-**Principles**:
9191-9292-- Describe the action specifically
9393-- Use active voice (verb + noun)
9494-- Match user's mental model
9595-- Be specific ("Save" is better than "OK")
9696-9797-### Help Text & Tooltips
9898-9999-**Bad**: "This is the username field"
100100-**Good**: "Choose a username. You can change this later in Settings."
101101-102102-**Principles**:
103103-104104-- Add value (don't just repeat the label)
105105-- Answer the implicit question ("What is this?" or "Why do you need this?")
106106-- Keep it brief but complete
107107-- Link to detailed docs if needed
108108-109109-### Empty States
110110-111111-**Bad**: "No items"
112112-**Good**: "No projects yet. Create your first project to get started."
113113-114114-**Principles**:
115115-116116-- Explain why it's empty (if not obvious)
117117-- Show next action clearly
118118-- Make it welcoming, not dead-end
119119-120120-### Success Messages
121121-122122-**Bad**: "Success"
123123-**Good**: "Settings saved! Your changes will take effect immediately."
124124-125125-**Principles**:
126126-127127-- Confirm what happened
128128-- Explain what happens next (if relevant)
129129-- Be brief but complete
130130-- Match the user's emotional moment (celebrate big wins)
131131-132132-### Loading States
133133-134134-**Bad**: "Loading..." (for 30+ seconds)
135135-**Good**: "Analyzing your data... this usually takes 30-60 seconds"
136136-137137-**Principles**:
138138-139139-- Set expectations (how long?)
140140-- Explain what's happening (when it's not obvious)
141141-- Show progress when possible
142142-- Offer escape hatch if appropriate ("Cancel")
143143-144144-### Confirmation Dialogs
145145-146146-**Bad**: "Are you sure?"
147147-**Good**: "Delete 'Project Alpha'? This can't be undone."
148148-149149-**Principles**:
150150-151151-- State the specific action
152152-- Explain consequences (especially for destructive actions)
153153-- Use clear button labels ("Delete project" not "Yes")
154154-- Don't overuse confirmations (only for risky actions)
155155-156156-### Navigation & Wayfinding
157157-158158-**Bad**: Generic labels like "Items" | "Things" | "Stuff"
159159-**Good**: Specific labels like "Your projects" | "Team members" | "Settings"
160160-161161-**Principles**:
162162-163163-- Be specific and descriptive
164164-- Use language users understand (not internal jargon)
165165-- Make hierarchy clear
166166-- Consider information scent (breadcrumbs, current location)
167167-168168-## Apply Clarity Principles
169169-170170-Every piece of copy should follow these rules:
171171-172172-1. **Be specific**: "Enter email" not "Enter value"
173173-2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity)
174174-3. **Be active**: "Save changes" not "Changes will be saved"
175175-4. **Be human**: "Oops, something went wrong" not "System error encountered"
176176-5. **Be helpful**: Tell users what to do, not just what happened
177177-6. **Be consistent**: Use same terms throughout (don't vary for variety)
178178-179179-**NEVER**:
180180-181181-- Use jargon without explanation
182182-- Blame users ("You made an error" → "This field is required")
183183-- Be vague ("Something went wrong" without explanation)
184184-- Use passive voice unnecessarily
185185-- Write overly long explanations (be concise)
186186-- Use humor for errors (be empathetic instead)
187187-- Assume technical knowledge
188188-- Vary terminology (pick one term and stick with it)
189189-- Repeat information (headers restating intros, redundant explanations)
190190-- Use placeholders as the only labels (they disappear when users type)
191191-192192-## Verify Improvements
193193-194194-Test that copy improvements work:
195195-196196-- **Comprehension**: Can users understand without context?
197197-- **Actionability**: Do users know what to do next?
198198-- **Brevity**: Is it as short as possible while remaining clear?
199199-- **Consistency**: Does it match terminology elsewhere?
200200-- **Tone**: Is it appropriate for the situation?
201201-202202-Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human.
-154
.agents/skills/colorize/SKILL.md
···11----
22-name: colorize
33-description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors.
1414-1515----
1616-1717-## Assess Color Opportunity
1818-1919-Analyze the current state and identify opportunities:
2020-2121-1. **Understand current state**:
2222- - **Color absence**: Pure grayscale? Limited neutrals? One timid accent?
2323- - **Missed opportunities**: Where could color add meaning, hierarchy, or delight?
2424- - **Context**: What's appropriate for this domain and audience?
2525- - **Brand**: Are there existing brand colors we should use?
2626-2727-2. **Identify where color adds value**:
2828- - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue)
2929- - **Hierarchy**: Drawing attention to important elements
3030- - **Categorization**: Different sections, types, or states
3131- - **Emotional tone**: Warmth, energy, trust, creativity
3232- - **Wayfinding**: Helping users navigate and understand structure
3333- - **Delight**: Moments of visual interest and personality
3434-3535-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
3636-3737-**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose.
3838-3939-## Plan Color Strategy
4040-4141-Create a purposeful color introduction plan:
4242-4343-- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals)
4444-- **Dominant color**: Which color owns 60% of colored elements?
4545-- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%)
4646-- **Application strategy**: Where does each color appear and why?
4747-4848-**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more.
4949-5050-## Introduce Color Strategically
5151-5252-Add color systematically across these dimensions:
5353-5454-### Semantic Color
5555-5656-- **State indicators**:
5757- - Success: Green tones (emerald, forest, mint)
5858- - Error: Red/pink tones (rose, crimson, coral)
5959- - Warning: Orange/amber tones
6060- - Info: Blue tones (sky, ocean, indigo)
6161- - Neutral: Gray/slate for inactive states
6262-6363-- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.)
6464-- **Progress indicators**: Colored bars, rings, or charts showing completion or health
6565-6666-### Accent Color Application
6767-6868-- **Primary actions**: Color the most important buttons/CTAs
6969-- **Links**: Add color to clickable text (maintain accessibility)
7070-- **Icons**: Colorize key icons for recognition and personality
7171-- **Headers/titles**: Add color to section headers or key labels
7272-- **Hover states**: Introduce color on interaction
7373-7474-### Background & Surfaces
7575-7676-- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`)
7777-- **Colored sections**: Use subtle background colors to separate areas
7878-- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue)
7979-- **Cards & surfaces**: Tint cards or surfaces slightly for warmth
8080-8181-**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness _look_ equal. Great for generating harmonious scales.
8282-8383-### Data Visualization
8484-8585-- **Charts & graphs**: Use color to encode categories or values
8686-- **Heatmaps**: Color intensity shows density or importance
8787-- **Comparison**: Color coding for different datasets or timeframes
8888-8989-### Borders & Accents
9090-9191-- **Accent borders**: Add colored left/top borders to cards or sections
9292-- **Underlines**: Color underlines for emphasis or active states
9393-- **Dividers**: Subtle colored dividers instead of gray lines
9494-- **Focus rings**: Colored focus indicators matching brand
9595-9696-### Typography Color
9797-9898-- **Colored headings**: Use brand colors for section headings (maintain contrast)
9999-- **Highlight text**: Color for emphasis or categories
100100-- **Labels & tags**: Small colored labels for metadata or categories
101101-102102-### Decorative Elements
103103-104104-- **Illustrations**: Add colored illustrations or icons
105105-- **Shapes**: Geometric shapes in brand colors as background elements
106106-- **Gradients**: Colorful gradient overlays or mesh backgrounds
107107-- **Blobs/organic shapes**: Soft colored shapes for visual interest
108108-109109-## Balance & Refinement
110110-111111-Ensure color addition improves rather than overwhelms:
112112-113113-### Maintain Hierarchy
114114-115115-- **Dominant color** (60%): Primary brand color or most used accent
116116-- **Secondary color** (30%): Supporting color for variety
117117-- **Accent color** (10%): High contrast for key moments
118118-- **Neutrals** (remaining): Gray/black/white for structure
119119-120120-### Accessibility
121121-122122-- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components)
123123-- **Don't rely on color alone**: Use icons, labels, or patterns alongside color
124124-- **Test for color blindness**: Verify red/green combinations work for all users
125125-126126-### Cohesion
127127-128128-- **Consistent palette**: Use colors from defined palette, not arbitrary choices
129129-- **Systematic application**: Same color meanings throughout (green always = success)
130130-- **Temperature consistency**: Warm palette stays warm, cool stays cool
131131-132132-**NEVER**:
133133-134134-- Use every color in the rainbow (choose 2-4 colors beyond neutrals)
135135-- Apply color randomly without semantic meaning
136136-- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead
137137-- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication
138138-- Use pure black (`#000`) or pure white (`#fff`) for large areas
139139-- Violate WCAG contrast requirements
140140-- Use color as the only indicator (accessibility issue)
141141-- Make everything colorful (defeats the purpose)
142142-- Default to purple-blue gradients (AI slop aesthetic)
143143-144144-## Verify Color Addition
145145-146146-Test that colorization improves the experience:
147147-148148-- **Better hierarchy**: Does color guide attention appropriately?
149149-- **Clearer meaning**: Does color help users understand states/categories?
150150-- **More engaging**: Does the interface feel warmer and more inviting?
151151-- **Still accessible**: Do all color combinations meet WCAG standards?
152152-- **Not overwhelming**: Is color balanced and purposeful?
153153-154154-Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional.
-244
.agents/skills/critique/SKILL.md
···11----
22-name: critique
33-description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[area (feature, page, component...)]"
77----
88-99-## STEPS
1010-1111-### Step 1: Preparation
1212-1313-Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish.
1414-1515-### Step 2: Gather Assessments
1616-1717-Launch two independent assessments. **Neither must see the other's output** to avoid bias.
1818-1919-You SHOULD delegate each assessment to a separate sub-agent for independence. Use your environment's agent spawning mechanism (e.g., Claude Code's `Agent` tool, or Codex's subagent spawning). Sub-agents should return their findings as structured text. Do NOT output findings to the user yet.
2020-2121-If sub-agents are not available in the current environment, complete each assessment sequentially, writing findings to internal notes before proceeding.
2222-2323-**Tab isolation**: When browser automation is available, each assessment MUST create its own new tab. Never reuse an existing tab, even if one is already open at the correct URL. This prevents the two assessments from interfering with each other's page state.
2424-2525-#### Assessment A: LLM Design Review
2626-2727-Read the relevant source files (HTML, CSS, JS/TS) and, if browser automation is available, visually inspect the live page. **Create a new tab** for this; do not reuse existing tabs. After navigation, label the tab by setting the document title:
2828-2929-```javascript
3030-document.title = "[LLM] " + document.title;
3131-```
3232-3333-Think like a design director. Evaluate:
3434-3535-**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately?
3636-3737-**Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness).
3838-3939-**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)):
4040-4141-- Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical.
4242-- Count visible options at each decision point. If >4, flag it.
4343-- Check for progressive disclosure: is complexity revealed only when needed?
4444-4545-**Emotional Journey**:
4646-4747-- What emotion does this interface evoke? Is that intentional?
4848-- **Peak-end rule**: Is the most intense moment positive? Does the experience end well?
4949-- **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)?
5050-5151-**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)):
5252-Score each of the 10 heuristics 0-4. This scoring will be presented in the report.
5353-5454-Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions.
5555-5656-#### Assessment B: Automated Detection
5757-5858-Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality).
5959-6060-**CLI scan**:
6161-6262-```bash
6363-npx impeccable --json [--fast] [target]
6464-```
6565-6666-- Pass HTML/JSX/TSX/Vue/Svelte files or directories as `[target]` (anything with markup). Do not pass CSS-only files.
6767-- For URLs, skip the CLI scan (it requires Puppeteer). Use browser visualization instead.
6868-- For large directories (200+ scannable files), use `--fast` (regex-only, skips jsdom)
6969-- For 500+ files, narrow scope or ask the user
7070-- Exit code 0 = clean, 2 = findings
7171-7272-**Browser visualization** (when browser automation tools are available AND the target is a viewable page):
7373-7474-The overlay is a **visual aid for the user**. It highlights issues directly in their browser. Do NOT scroll through the page to screenshot overlays. Instead, read the console output to get the results programmatically.
7575-7676-1. **Start the live detection server**:
7777- ```bash
7878- npx impeccable live &
7979- ```
8080- Note the port printed to stdout (auto-assigned). Use `--port=PORT` to fix it.
8181-2. **Create a new tab** and navigate to the page (use dev server URL for local files, or direct URL). Do not reuse existing tabs.
8282-3. **Label the tab** via `javascript_tool` so the user can distinguish it:
8383- ```javascript
8484- document.title = "[Human] " + document.title;
8585- ```
8686-4. **Scroll to top** to ensure the page is scrolled to the very top before injection
8787-5. **Inject** via `javascript_tool` (replace PORT with the port from step 1):
8888- ```javascript
8989- const s = document.createElement("script");
9090- s.src = "http://localhost:PORT/detect.js";
9191- document.head.appendChild(s);
9292- ```
9393-6. Wait 2-3 seconds for the detector to render overlays
9494-7. **Read results from console** using `read_console_messages` with pattern `impeccable`. The detector logs all findings with the `[impeccable]` prefix. Do NOT scroll through the page to take screenshots of the overlays.
9595-8. **Cleanup**: Stop the live server when done:
9696- ```bash
9797- npx impeccable live stop
9898- ```
9999-100100-For multi-view targets, inject on 3-5 representative pages. If injection fails, continue with CLI results only.
101101-102102-Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted.
103103-104104-### Step 3: Generate Combined Critique Report
105105-106106-Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives.
107107-108108-Structure your feedback as a design director would:
109109-110110-#### Design Health Score
111111-112112-> _Consult [heuristics-scoring](reference/heuristics-scoring.md)_
113113-114114-Present the Nielsen's 10 heuristics scores as a table:
115115-116116-| # | Heuristic | Score | Key Issue |
117117-| --------- | ------------------------------- | --------- | ------------------------------------ |
118118-| 1 | Visibility of System Status | ? | [specific finding or "n/a" if solid] |
119119-| 2 | Match System / Real World | ? | |
120120-| 3 | User Control and Freedom | ? | |
121121-| 4 | Consistency and Standards | ? | |
122122-| 5 | Error Prevention | ? | |
123123-| 6 | Recognition Rather Than Recall | ? | |
124124-| 7 | Flexibility and Efficiency | ? | |
125125-| 8 | Aesthetic and Minimalist Design | ? | |
126126-| 9 | Error Recovery | ? | |
127127-| 10 | Help and Documentation | ? | |
128128-| **Total** | | **??/40** | **[Rating band]** |
129129-130130-Be honest with scores. A 4 means genuinely excellent. Most real interfaces score 20-32.
131131-132132-#### Anti-Patterns Verdict
133133-134134-**Start here.** Does this look AI-generated?
135135-136136-**LLM assessment**: Your own evaluation of AI slop tells. Cover overall aesthetic feel, layout sameness, generic composition, missed opportunities for personality.
137137-138138-**Deterministic scan**: Summarize what the automated detector found, with counts and file locations. Note any additional issues the detector caught that you missed, and flag any false positives.
139139-140140-**Visual overlays** (if browser was used): Tell the user that overlays are now visible in the **[Human]** tab in their browser, highlighting the detected issues. Summarize what the console output reported.
141141-142142-#### Overall Impression
143143-144144-A brief gut reaction: what works, what doesn't, and the single biggest opportunity.
145145-146146-#### What's Working
147147-148148-Highlight 2-3 things done well. Be specific about why they work.
149149-150150-#### Priority Issues
151151-152152-The 3-5 most impactful design problems, ordered by importance.
153153-154154-For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions):
155155-156156-- **[P?] What**: Name the problem clearly
157157-- **Why it matters**: How this hurts users or undermines goals
158158-- **Fix**: What to do about it (be concrete)
159159-- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive)
160160-161161-#### Persona Red Flags
162162-163163-> _Consult [personas](reference/personas.md)_
164164-165165-Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `.github/copilot-instructions.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info.
166166-167167-For each selected persona, walk through the primary user action and list specific red flags found:
168168-169169-**Alex (Power User)**: No keyboard shortcuts detected. Form requires 8 clicks for primary action. Forced modal onboarding. High abandonment risk.
170170-171171-**Jordan (First-Timer)**: Icon-only nav in sidebar. Technical jargon in error messages ("404 Not Found"). No visible help. Will abandon at step 2.
172172-173173-Be specific. Name the exact elements and interactions that fail each persona. Don't write generic persona descriptions; write what broke for them.
174174-175175-#### Minor Observations
176176-177177-Quick notes on smaller issues worth addressing.
178178-179179-#### Questions to Consider
180180-181181-Provocative questions that might unlock better solutions:
182182-183183-- "What if the primary action were more prominent?"
184184-- "Does this need to feel this complex?"
185185-- "What would a confident version of this look like?"
186186-187187-**Remember**:
188188-189189-- Be direct. Vague feedback wastes everyone's time.
190190-- Be specific. "The submit button," not "some elements."
191191-- Say what's wrong AND why it matters to users.
192192-- Give concrete suggestions, not just "consider exploring..."
193193-- Prioritize ruthlessly. If everything is important, nothing is.
194194-- Don't soften criticism. Developers need honest feedback to ship great design.
195195-196196-### Step 4: Ask the User
197197-198198-**After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan.
199199-200200-Ask questions along these lines (adapt to the specific findings; do NOT ask generic questions):
201201-202202-1. **Priority direction**: Based on the issues found, ask which category matters most to the user right now. For example: "I found problems with visual hierarchy, color usage, and information overload. Which area should we tackle first?" Offer the top 2-3 issue categories as options.
203203-204204-2. **Design intent**: If the critique found a tonal mismatch, ask whether it was intentional. For example: "The interface feels clinical and corporate. Is that the intended tone, or should it feel warmer/bolder/more playful?" Offer 2-3 tonal directions as options based on what would fix the issues found.
205205-206206-3. **Scope**: Ask how much the user wants to take on. For example: "I found N issues. Want to address everything, or focus on the top 3?" Offer scope options like "Top 3 only", "All issues", "Critical issues only".
207207-208208-4. **Constraints** (optional; only ask if relevant): If the findings touch many areas, ask if anything is off-limits. For example: "Should any sections stay as-is?" This prevents the plan from touching things the user considers done.
209209-210210-**Rules for questions**:
211211-212212-- Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions.
213213-- Keep it to 2-4 questions maximum. Respect the user's time.
214214-- Offer concrete options, not open-ended prompts.
215215-- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5.
216216-217217-### Step 5: Recommended Actions
218218-219219-**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4.
220220-221221-#### Action Summary
222222-223223-List recommended commands in priority order, based on the user's answers:
224224-225225-1. **`/command-name`**: Brief description of what to fix (specific context from critique findings)
226226-2. **`/command-name`**: Brief description (specific context)
227227- ...
228228-229229-**Rules for recommendations**:
230230-231231-- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive
232232-- Order by the user's stated priorities first, then by impact
233233-- Each item's description should carry enough context that the command knows what to focus on
234234-- Map each Priority Issue to the appropriate command
235235-- Skip commands that would address zero issues
236236-- If the user chose a limited scope, only include items within that scope
237237-- If the user marked areas as off-limits, exclude commands that would touch those areas
238238-- End with `/polish` as the final step if any fixes were recommended
239239-240240-After presenting the summary, tell the user:
241241-242242-> You can ask me to run these one at a time, all at once, or in any order you prefer.
243243->
244244-> Re-run `/critique` after fixes to see your score improve.
···11-# Cognitive Load Assessment
22-33-Cognitive load is the total mental effort required to use an interface. Overloaded users make mistakes, get frustrated, and leave. This reference helps identify and fix cognitive overload.
44-55----
66-77-## Three Types of Cognitive Load
88-99-### Intrinsic Load — The Task Itself
1010-1111-Complexity inherent to what the user is trying to do. You can't eliminate this, but you can structure it.
1212-1313-**Manage it by**:
1414-1515-- Breaking complex tasks into discrete steps
1616-- Providing scaffolding (templates, defaults, examples)
1717-- Progressive disclosure — show what's needed now, hide the rest
1818-- Grouping related decisions together
1919-2020-### Extraneous Load — Bad Design
2121-2222-Mental effort caused by poor design choices. **Eliminate this ruthlessly** — it's pure waste.
2323-2424-**Common sources**:
2525-2626-- Confusing navigation that requires mental mapping
2727-- Unclear labels that force users to guess meaning
2828-- Visual clutter competing for attention
2929-- Inconsistent patterns that prevent learning
3030-- Unnecessary steps between user intent and result
3131-3232-### Germane Load — Learning Effort
3333-3434-Mental effort spent building understanding. This is _good_ cognitive load — it leads to mastery.
3535-3636-**Support it by**:
3737-3838-- Progressive disclosure that reveals complexity gradually
3939-- Consistent patterns that reward learning
4040-- Feedback that confirms correct understanding
4141-- Onboarding that teaches through action, not walls of text
4242-4343----
4444-4545-## Cognitive Load Checklist
4646-4747-Evaluate the interface against these 8 items:
4848-4949-- [ ] **Single focus**: Can the user complete their primary task without distraction from competing elements?
5050-- [ ] **Chunking**: Is information presented in digestible groups (≤4 items per group)?
5151-- [ ] **Grouping**: Are related items visually grouped together (proximity, borders, shared background)?
5252-- [ ] **Visual hierarchy**: Is it immediately clear what's most important on the screen?
5353-- [ ] **One thing at a time**: Can the user focus on a single decision before moving to the next?
5454-- [ ] **Minimal choices**: Are decisions simplified (≤4 visible options at any decision point)?
5555-- [ ] **Working memory**: Does the user need to remember information from a previous screen to act on the current one?
5656-- [ ] **Progressive disclosure**: Is complexity revealed only when the user needs it?
5757-5858-**Scoring**: Count the failed items. 0–1 failures = low cognitive load (good). 2–3 = moderate (address soon). 4+ = high cognitive load (critical fix needed).
5959-6060----
6161-6262-## The Working Memory Rule
6363-6464-**Humans can hold ≤4 items in working memory at once** (Miller's Law revised by Cowan, 2001).
6565-6666-At any decision point, count the number of distinct options, actions, or pieces of information a user must simultaneously consider:
6767-6868-- **≤4 items**: Within working memory limits — manageable
6969-- **5–7 items**: Pushing the boundary — consider grouping or progressive disclosure
7070-- **8+ items**: Overloaded — users will skip, misclick, or abandon
7171-7272-**Practical applications**:
7373-7474-- Navigation menus: ≤5 top-level items (group the rest under clear categories)
7575-- Form sections: ≤4 fields visible per group before a visual break
7676-- Action buttons: 1 primary, 1–2 secondary, group the rest in a menu
7777-- Dashboard widgets: ≤4 key metrics visible without scrolling
7878-- Pricing tiers: ≤3 options (more causes analysis paralysis)
7979-8080----
8181-8282-## Common Cognitive Load Violations
8383-8484-### 1. The Wall of Options
8585-8686-**Problem**: Presenting 10+ choices at once with no hierarchy.
8787-**Fix**: Group into categories, highlight recommended, use progressive disclosure.
8888-8989-### 2. The Memory Bridge
9090-9191-**Problem**: User must remember info from step 1 to complete step 3.
9292-**Fix**: Keep relevant context visible, or repeat it where it's needed.
9393-9494-### 3. The Hidden Navigation
9595-9696-**Problem**: User must build a mental map of where things are.
9797-**Fix**: Always show current location (breadcrumbs, active states, progress indicators).
9898-9999-### 4. The Jargon Barrier
100100-101101-**Problem**: Technical or domain language forces translation effort.
102102-**Fix**: Use plain language. If domain terms are unavoidable, define them inline.
103103-104104-### 5. The Visual Noise Floor
105105-106106-**Problem**: Every element has the same visual weight — nothing stands out.
107107-**Fix**: Establish clear hierarchy: one primary element, 2–3 secondary, everything else muted.
108108-109109-### 6. The Inconsistent Pattern
110110-111111-**Problem**: Similar actions work differently in different places.
112112-**Fix**: Standardize interaction patterns. Same type of action = same type of UI.
113113-114114-### 7. The Multi-Task Demand
115115-116116-**Problem**: Interface requires processing multiple simultaneous inputs (reading + deciding + navigating).
117117-**Fix**: Sequence the steps. Let the user do one thing at a time.
118118-119119-### 8. The Context Switch
120120-121121-**Problem**: User must jump between screens/tabs/modals to gather info for a single decision.
122122-**Fix**: Co-locate the information needed for each decision. Reduce back-and-forth.
···11-# Heuristics Scoring Guide
22-33-Score each of Nielsen's 10 Usability Heuristics on a 0–4 scale. Be honest — a 4 means genuinely excellent, not "good enough."
44-55-## Nielsen's 10 Heuristics
66-77-### 1. Visibility of System Status
88-99-Keep users informed about what's happening through timely, appropriate feedback.
1010-1111-**Check for**:
1212-1313-- Loading indicators during async operations
1414-- Confirmation of user actions (save, submit, delete)
1515-- Progress indicators for multi-step processes
1616-- Current location in navigation (breadcrumbs, active states)
1717-- Form validation feedback (inline, not just on submit)
1818-1919-**Scoring**:
2020-| Score | Criteria |
2121-|-------|----------|
2222-| 0 | No feedback — user is guessing what happened |
2323-| 1 | Rare feedback — most actions produce no visible response |
2424-| 2 | Partial — some states communicated, major gaps remain |
2525-| 3 | Good — most operations give clear feedback, minor gaps |
2626-| 4 | Excellent — every action confirms, progress is always visible |
2727-2828-### 2. Match Between System and Real World
2929-3030-Speak the user's language. Follow real-world conventions. Information appears in natural, logical order.
3131-3232-**Check for**:
3333-3434-- Familiar terminology (no unexplained jargon)
3535-- Logical information order matching user expectations
3636-- Recognizable icons and metaphors
3737-- Domain-appropriate language for the target audience
3838-- Natural reading flow (left-to-right, top-to-bottom priority)
3939-4040-**Scoring**:
4141-| Score | Criteria |
4242-|-------|----------|
4343-| 0 | Pure tech jargon, alien to users |
4444-| 1 | Mostly confusing — requires domain expertise to navigate |
4545-| 2 | Mixed — some plain language, some jargon leaks through |
4646-| 3 | Mostly natural — occasional term needs context |
4747-| 4 | Speaks the user's language fluently throughout |
4848-4949-### 3. User Control and Freedom
5050-5151-Users need a clear "emergency exit" from unwanted states without extended dialogue.
5252-5353-**Check for**:
5454-5555-- Undo/redo functionality
5656-- Cancel buttons on forms and modals
5757-- Clear navigation back to safety (home, previous)
5858-- Easy way to clear filters, search, selections
5959-- Escape from long or multi-step processes
6060-6161-**Scoring**:
6262-| Score | Criteria |
6363-|-------|----------|
6464-| 0 | Users get trapped — no way out without refreshing |
6565-| 1 | Difficult exits — must find obscure paths to escape |
6666-| 2 | Some exits — main flows have escape, edge cases don't |
6767-| 3 | Good control — users can exit and undo most actions |
6868-| 4 | Full control — undo, cancel, back, and escape everywhere |
6969-7070-### 4. Consistency and Standards
7171-7272-Users shouldn't wonder whether different words, situations, or actions mean the same thing.
7373-7474-**Check for**:
7575-7676-- Consistent terminology throughout the interface
7777-- Same actions produce same results everywhere
7878-- Platform conventions followed (standard UI patterns)
7979-- Visual consistency (colors, typography, spacing, components)
8080-- Consistent interaction patterns (same gesture = same behavior)
8181-8282-**Scoring**:
8383-| Score | Criteria |
8484-|-------|----------|
8585-| 0 | Inconsistent everywhere — feels like different products stitched together |
8686-| 1 | Many inconsistencies — similar things look/behave differently |
8787-| 2 | Partially consistent — main flows match, details diverge |
8888-| 3 | Mostly consistent — occasional deviation, nothing confusing |
8989-| 4 | Fully consistent — cohesive system, predictable behavior |
9090-9191-### 5. Error Prevention
9292-9393-Better than good error messages is a design that prevents problems in the first place.
9494-9595-**Check for**:
9696-9797-- Confirmation before destructive actions (delete, overwrite)
9898-- Constraints preventing invalid input (date pickers, dropdowns)
9999-- Smart defaults that reduce errors
100100-- Clear labels that prevent misunderstanding
101101-- Autosave and draft recovery
102102-103103-**Scoring**:
104104-| Score | Criteria |
105105-|-------|----------|
106106-| 0 | Errors easy to make — no guardrails anywhere |
107107-| 1 | Few safeguards — some inputs validated, most aren't |
108108-| 2 | Partial prevention — common errors caught, edge cases slip |
109109-| 3 | Good prevention — most error paths blocked proactively |
110110-| 4 | Excellent — errors nearly impossible through smart constraints |
111111-112112-### 6. Recognition Rather Than Recall
113113-114114-Minimize memory load. Make objects, actions, and options visible or easily retrievable.
115115-116116-**Check for**:
117117-118118-- Visible options (not buried in hidden menus)
119119-- Contextual help when needed (tooltips, inline hints)
120120-- Recent items and history
121121-- Autocomplete and suggestions
122122-- Labels on icons (not icon-only navigation)
123123-124124-**Scoring**:
125125-| Score | Criteria |
126126-|-------|----------|
127127-| 0 | Heavy memorization — users must remember paths and commands |
128128-| 1 | Mostly recall — many hidden features, few visible cues |
129129-| 2 | Some aids — main actions visible, secondary features hidden |
130130-| 3 | Good recognition — most things discoverable, few memory demands |
131131-| 4 | Everything discoverable — users never need to memorize |
132132-133133-### 7. Flexibility and Efficiency of Use
134134-135135-Accelerators — invisible to novices — speed up expert interaction.
136136-137137-**Check for**:
138138-139139-- Keyboard shortcuts for common actions
140140-- Customizable interface elements
141141-- Recent items and favorites
142142-- Bulk/batch actions
143143-- Power user features that don't complicate the basics
144144-145145-**Scoring**:
146146-| Score | Criteria |
147147-|-------|----------|
148148-| 0 | One rigid path — no shortcuts or alternatives |
149149-| 1 | Limited flexibility — few alternatives to the main path |
150150-| 2 | Some shortcuts — basic keyboard support, limited bulk actions |
151151-| 3 | Good accelerators — keyboard nav, some customization |
152152-| 4 | Highly flexible — multiple paths, power features, customizable |
153153-154154-### 8. Aesthetic and Minimalist Design
155155-156156-Interfaces should not contain irrelevant or rarely needed information. Every element should serve a purpose.
157157-158158-**Check for**:
159159-160160-- Only necessary information visible at each step
161161-- Clear visual hierarchy directing attention
162162-- Purposeful use of color and emphasis
163163-- No decorative clutter competing for attention
164164-- Focused, uncluttered layouts
165165-166166-**Scoring**:
167167-| Score | Criteria |
168168-|-------|----------|
169169-| 0 | Overwhelming — everything competes for attention equally |
170170-| 1 | Cluttered — too much noise, hard to find what matters |
171171-| 2 | Some clutter — main content clear, periphery noisy |
172172-| 3 | Mostly clean — focused design, minor visual noise |
173173-| 4 | Perfectly minimal — every element earns its pixel |
174174-175175-### 9. Help Users Recognize, Diagnose, and Recover from Errors
176176-177177-Error messages should use plain language, precisely indicate the problem, and constructively suggest a solution.
178178-179179-**Check for**:
180180-181181-- Plain language error messages (no error codes for users)
182182-- Specific problem identification ("Email is missing @" not "Invalid input")
183183-- Actionable recovery suggestions
184184-- Errors displayed near the source of the problem
185185-- Non-blocking error handling (don't wipe the form)
186186-187187-**Scoring**:
188188-| Score | Criteria |
189189-|-------|----------|
190190-| 0 | Cryptic errors — codes, jargon, or no message at all |
191191-| 1 | Vague errors — "Something went wrong" with no guidance |
192192-| 2 | Clear but unhelpful — names the problem but not the fix |
193193-| 3 | Clear with suggestions — identifies problem and offers next steps |
194194-| 4 | Perfect recovery — pinpoints issue, suggests fix, preserves user work |
195195-196196-### 10. Help and Documentation
197197-198198-Even if the system is usable without docs, help should be easy to find, task-focused, and concise.
199199-200200-**Check for**:
201201-202202-- Searchable help or documentation
203203-- Contextual help (tooltips, inline hints, guided tours)
204204-- Task-focused organization (not feature-organized)
205205-- Concise, scannable content
206206-- Easy access without leaving current context
207207-208208-**Scoring**:
209209-| Score | Criteria |
210210-|-------|----------|
211211-| 0 | No help available anywhere |
212212-| 1 | Help exists but hard to find or irrelevant |
213213-| 2 | Basic help — FAQ or docs exist, not contextual |
214214-| 3 | Good documentation — searchable, mostly task-focused |
215215-| 4 | Excellent contextual help — right info at the right moment |
216216-217217----
218218-219219-## Score Summary
220220-221221-**Total possible**: 40 points (10 heuristics × 4 max)
222222-223223-| Score Range | Rating | What It Means |
224224-| ----------- | ---------- | ------------------------------------------------------ |
225225-| 36–40 | Excellent | Minor polish only — ship it |
226226-| 28–35 | Good | Address weak areas, solid foundation |
227227-| 20–27 | Acceptable | Significant improvements needed before users are happy |
228228-| 12–19 | Poor | Major UX overhaul required — core experience broken |
229229-| 0–11 | Critical | Redesign needed — unusable in current state |
230230-231231----
232232-233233-## Issue Severity (P0–P3)
234234-235235-Tag each individual issue found during scoring with a priority level:
236236-237237-| Priority | Name | Description | Action |
238238-| -------- | -------- | ------------------------------------------ | --------------------------------------- |
239239-| **P0** | Blocking | Prevents task completion entirely | Fix immediately — this is a showstopper |
240240-| **P1** | Major | Causes significant difficulty or confusion | Fix before release |
241241-| **P2** | Minor | Annoyance, but workaround exists | Fix in next pass |
242242-| **P3** | Polish | Nice-to-fix, no real user impact | Fix if time permits |
243243-244244-**Tip**: If you're unsure between two levels, ask: "Would a user contact support about this?" If yes, it's at least P1.
-193
.agents/skills/critique/reference/personas.md
···11-# Persona-Based Design Testing
22-33-Test the interface through the eyes of 5 distinct user archetypes. Each persona exposes different failure modes that a single "design director" perspective would miss.
44-55-**How to use**: Select 2–3 personas most relevant to the interface being critiqued. Walk through the primary user action as each persona. Report specific red flags — not generic concerns.
66-77----
88-99-## 1. Impatient Power User — "Alex"
1010-1111-**Profile**: Expert with similar products. Expects efficiency, hates hand-holding. Will find shortcuts or leave.
1212-1313-**Behaviors**:
1414-1515-- Skips all onboarding and instructions
1616-- Looks for keyboard shortcuts immediately
1717-- Tries to bulk-select, batch-edit, and automate
1818-- Gets frustrated by required steps that feel unnecessary
1919-- Abandons if anything feels slow or patronizing
2020-2121-**Test Questions**:
2222-2323-- Can Alex complete the core task in under 60 seconds?
2424-- Are there keyboard shortcuts for common actions?
2525-- Can onboarding be skipped entirely?
2626-- Do modals have keyboard dismiss (Esc)?
2727-- Is there a "power user" path (shortcuts, bulk actions)?
2828-2929-**Red Flags** (report these specifically):
3030-3131-- Forced tutorials or unskippable onboarding
3232-- No keyboard navigation for primary actions
3333-- Slow animations that can't be skipped
3434-- One-item-at-a-time workflows where batch would be natural
3535-- Redundant confirmation steps for low-risk actions
3636-3737----
3838-3939-## 2. Confused First-Timer — "Jordan"
4040-4141-**Profile**: Never used this type of product. Needs guidance at every step. Will abandon rather than figure it out.
4242-4343-**Behaviors**:
4444-4545-- Reads all instructions carefully
4646-- Hesitates before clicking anything unfamiliar
4747-- Looks for help or support constantly
4848-- Misunderstands jargon and abbreviations
4949-- Takes the most literal interpretation of any label
5050-5151-**Test Questions**:
5252-5353-- Is the first action obviously clear within 5 seconds?
5454-- Are all icons labeled with text?
5555-- Is there contextual help at decision points?
5656-- Does terminology assume prior knowledge?
5757-- Is there a clear "back" or "undo" at every step?
5858-5959-**Red Flags** (report these specifically):
6060-6161-- Icon-only navigation with no labels
6262-- Technical jargon without explanation
6363-- No visible help option or guidance
6464-- Ambiguous next steps after completing an action
6565-- No confirmation that an action succeeded
6666-6767----
6868-6969-## 3. Accessibility-Dependent User — "Sam"
7070-7171-**Profile**: Uses screen reader (VoiceOver/NVDA), keyboard-only navigation. May have low vision, motor impairment, or cognitive differences.
7272-7373-**Behaviors**:
7474-7575-- Tabs through the interface linearly
7676-- Relies on ARIA labels and heading structure
7777-- Cannot see hover states or visual-only indicators
7878-- Needs adequate color contrast (4.5:1 minimum)
7979-- May use browser zoom up to 200%
8080-8181-**Test Questions**:
8282-8383-- Can the entire primary flow be completed keyboard-only?
8484-- Are all interactive elements focusable with visible focus indicators?
8585-- Do images have meaningful alt text?
8686-- Is color contrast WCAG AA compliant (4.5:1 for text)?
8787-- Does the screen reader announce state changes (loading, success, errors)?
8888-8989-**Red Flags** (report these specifically):
9090-9191-- Click-only interactions with no keyboard alternative
9292-- Missing or invisible focus indicators
9393-- Meaning conveyed by color alone (red = error, green = success)
9494-- Unlabeled form fields or buttons
9595-- Time-limited actions without extension option
9696-- Custom components that break screen reader flow
9797-9898----
9999-100100-## 4. Deliberate Stress Tester — "Riley"
101101-102102-**Profile**: Methodical user who pushes interfaces beyond the happy path. Tests edge cases, tries unexpected inputs, and probes for gaps in the experience.
103103-104104-**Behaviors**:
105105-106106-- Tests edge cases intentionally (empty states, long strings, special characters)
107107-- Submits forms with unexpected data (emoji, RTL text, very long values)
108108-- Tries to break workflows by navigating backwards, refreshing mid-flow, or opening in multiple tabs
109109-- Looks for inconsistencies between what the UI promises and what actually happens
110110-- Documents problems methodically
111111-112112-**Test Questions**:
113113-114114-- What happens at the edges (0 items, 1000 items, very long text)?
115115-- Do error states recover gracefully or leave the UI in a broken state?
116116-- What happens on refresh mid-workflow? Is state preserved?
117117-- Are there features that appear to work but produce broken results?
118118-- How does the UI handle unexpected input (emoji, special chars, paste from Excel)?
119119-120120-**Red Flags** (report these specifically):
121121-122122-- Features that appear to work but silently fail or produce wrong results
123123-- Error handling that exposes technical details or leaves UI in a broken state
124124-- Empty states that show nothing useful ("No results" with no guidance)
125125-- Workflows that lose user data on refresh or navigation
126126-- Inconsistent behavior between similar interactions in different parts of the UI
127127-128128----
129129-130130-## 5. Distracted Mobile User — "Casey"
131131-132132-**Profile**: Using phone one-handed on the go. Frequently interrupted. Possibly on a slow connection.
133133-134134-**Behaviors**:
135135-136136-- Uses thumb only — prefers bottom-of-screen actions
137137-- Gets interrupted mid-flow and returns later
138138-- Switches between apps frequently
139139-- Has limited attention span and low patience
140140-- Types as little as possible, prefers taps and selections
141141-142142-**Test Questions**:
143143-144144-- Are primary actions in the thumb zone (bottom half of screen)?
145145-- Is state preserved if the user leaves and returns?
146146-- Does it work on slow connections (3G)?
147147-- Can forms leverage autocomplete and smart defaults?
148148-- Are touch targets at least 44×44pt?
149149-150150-**Red Flags** (report these specifically):
151151-152152-- Important actions positioned at the top of the screen (unreachable by thumb)
153153-- No state persistence — progress lost on tab switch or interruption
154154-- Large text inputs required where selection would work
155155-- Heavy assets loading on every page (no lazy loading)
156156-- Tiny tap targets or targets too close together
157157-158158----
159159-160160-## Selecting Personas
161161-162162-Choose personas based on the interface type:
163163-164164-| Interface Type | Primary Personas | Why |
165165-| ------------------------ | -------------------- | -------------------------------- |
166166-| Landing page / marketing | Jordan, Riley, Casey | First impressions, trust, mobile |
167167-| Dashboard / admin | Alex, Sam | Power users, accessibility |
168168-| E-commerce / checkout | Casey, Riley, Jordan | Mobile, edge cases, clarity |
169169-| Onboarding flow | Jordan, Casey | Confusion, interruption |
170170-| Data-heavy / analytics | Alex, Sam | Efficiency, keyboard nav |
171171-| Form-heavy / wizard | Jordan, Sam, Casey | Clarity, accessibility, mobile |
172172-173173----
174174-175175-## Project-Specific Personas
176176-177177-If `.github/copilot-instructions.md` contains a `## Design Context` section (generated by `impeccable teach`), derive 1–2 additional personas from the audience and brand information:
178178-179179-1. Read the target audience description
180180-2. Identify the primary user archetype not covered by the 5 predefined personas
181181-3. Create a persona following this template:
182182-183183-```
184184-### [Role] — "[Name]"
185185-186186-**Profile**: [2-3 key characteristics derived from Design Context]
187187-188188-**Behaviors**: [3-4 specific behaviors based on the described audience]
189189-190190-**Red Flags**: [3-4 things that would alienate this specific user type]
191191-```
192192-193193-Only generate project-specific personas when real Design Context data is available. Don't invent audience details — use the 5 predefined personas when no context exists.
-336
.agents/skills/delight/SKILL.md
···11----
22-name: delight
33-description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant).
1414-1515----
1616-1717-## Assess Delight Opportunities
1818-1919-Identify where delight would enhance (not distract from) the experience:
2020-2121-1. **Find natural delight moments**:
2222- - **Success states**: Completed actions (save, send, publish)
2323- - **Empty states**: First-time experiences, onboarding
2424- - **Loading states**: Waiting periods that could be entertaining
2525- - **Achievements**: Milestones, streaks, completions
2626- - **Interactions**: Hover states, clicks, drags
2727- - **Errors**: Softening frustrating moments
2828- - **Easter eggs**: Hidden discoveries for curious users
2929-3030-2. **Understand the context**:
3131- - What's the brand personality? (Playful? Professional? Quirky? Elegant?)
3232- - Who's the audience? (Tech-savvy? Creative? Corporate?)
3333- - What's the emotional context? (Accomplishment? Exploration? Frustration?)
3434- - What's appropriate? (Banking app ≠ gaming app)
3535-3636-3. **Define delight strategy**:
3737- - **Subtle sophistication**: Refined micro-interactions (luxury brands)
3838- - **Playful personality**: Whimsical illustrations and copy (consumer apps)
3939- - **Helpful surprises**: Anticipating needs before users ask (productivity tools)
4040- - **Sensory richness**: Satisfying sounds, smooth animations (creative tools)
4141-4242-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
4343-4444-**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far.
4545-4646-## Delight Principles
4747-4848-Follow these guidelines:
4949-5050-### Delight Amplifies, Never Blocks
5151-5252-- Delight moments should be quick (< 1 second)
5353-- Never delay core functionality for delight
5454-- Make delight skippable or subtle
5555-- Respect user's time and task focus
5656-5757-### Surprise and Discovery
5858-5959-- Hide delightful details for users to discover
6060-- Reward exploration and curiosity
6161-- Don't announce every delight moment
6262-- Let users share discoveries with others
6363-6464-### Appropriate to Context
6565-6666-- Match delight to emotional moment (celebrate success, empathize with errors)
6767-- Respect the user's state (don't be playful during critical errors)
6868-- Match brand personality and audience expectations
6969-- Cultural sensitivity (what's delightful varies by culture)
7070-7171-### Compound Over Time
7272-7373-- Delight should remain fresh with repeated use
7474-- Vary responses (not same animation every time)
7575-- Reveal deeper layers with continued use
7676-- Build anticipation through patterns
7777-7878-## Delight Techniques
7979-8080-Add personality and joy through these methods:
8181-8282-### Micro-interactions & Animation
8383-8484-**Button delight**:
8585-8686-```css
8787-/* Satisfying button press */
8888-.button {
8989- transition:
9090- transform 0.1s,
9191- box-shadow 0.1s;
9292-}
9393-.button:active {
9494- transform: translateY(2px);
9595- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
9696-}
9797-9898-/* Ripple effect on click */
9999-/* Smooth lift on hover */
100100-.button:hover {
101101- transform: translateY(-2px);
102102- transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
103103-}
104104-```
105105-106106-**Loading delight**:
107107-108108-- Playful loading animations (not just spinners)
109109-- Personality in loading messages (write product-specific ones, not generic AI filler)
110110-- Progress indication with encouraging messages
111111-- Skeleton screens with subtle animations
112112-113113-**Success animations**:
114114-115115-- Checkmark draw animation
116116-- Confetti burst for major achievements
117117-- Gentle scale + fade for confirmation
118118-- Satisfying sound effects (subtle)
119119-120120-**Hover surprises**:
121121-122122-- Icons that animate on hover
123123-- Color shifts or glow effects
124124-- Tooltip reveals with personality
125125-- Cursor changes (custom cursors for branded experiences)
126126-127127-### Personality in Copy
128128-129129-**Playful error messages**:
130130-131131-```
132132-"Error 404"
133133-"This page is playing hide and seek. (And winning)"
134134-135135-"Connection failed"
136136-"Looks like the internet took a coffee break. Want to retry?"
137137-```
138138-139139-**Encouraging empty states**:
140140-141141-```
142142-"No projects"
143143-"Your canvas awaits. Create something amazing."
144144-145145-"No messages"
146146-"Inbox zero! You're crushing it today."
147147-```
148148-149149-**Playful labels & tooltips**:
150150-151151-```
152152-"Delete"
153153-"Send to void" (for playful brand)
154154-155155-"Help"
156156-"Rescue me" (tooltip)
157157-```
158158-159159-**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm.
160160-161161-### Illustrations & Visual Personality
162162-163163-**Custom illustrations**:
164164-165165-- Empty state illustrations (not stock icons)
166166-- Error state illustrations (friendly monsters, quirky characters)
167167-- Loading state illustrations (animated characters)
168168-- Success state illustrations (celebrations)
169169-170170-**Icon personality**:
171171-172172-- Custom icon set matching brand personality
173173-- Animated icons (subtle motion on hover/click)
174174-- Illustrative icons (more detailed than generic)
175175-- Consistent style across all icons
176176-177177-**Background effects**:
178178-179179-- Subtle particle effects
180180-- Gradient mesh backgrounds
181181-- Geometric patterns
182182-- Parallax depth
183183-- Time-of-day themes (morning vs night)
184184-185185-### Satisfying Interactions
186186-187187-**Drag and drop delight**:
188188-189189-- Lift effect on drag (shadow, scale)
190190-- Snap animation when dropped
191191-- Satisfying placement sound
192192-- Undo toast ("Dropped in wrong place? [Undo]")
193193-194194-**Toggle switches**:
195195-196196-- Smooth slide with spring physics
197197-- Color transition
198198-- Haptic feedback on mobile
199199-- Optional sound effect
200200-201201-**Progress & achievements**:
202202-203203-- Streak counters with celebratory milestones
204204-- Progress bars that "celebrate" at 100%
205205-- Badge unlocks with animation
206206-- Playful stats ("You're on fire! 5 days in a row")
207207-208208-**Form interactions**:
209209-210210-- Input fields that animate on focus
211211-- Checkboxes with a satisfying scale pulse when checked
212212-- Success state that celebrates valid input
213213-- Auto-grow textareas
214214-215215-### Sound Design
216216-217217-**Subtle audio cues** (when appropriate):
218218-219219-- Notification sounds (distinctive but not annoying)
220220-- Success sounds (satisfying "ding")
221221-- Error sounds (empathetic, not harsh)
222222-- Typing sounds for chat/messaging
223223-- Ambient background audio (very subtle)
224224-225225-**IMPORTANT**:
226226-227227-- Respect system sound settings
228228-- Provide mute option
229229-- Keep volumes quiet (subtle cues, not alarms)
230230-- Don't play on every interaction (sound fatigue is real)
231231-232232-### Easter Eggs & Hidden Delights
233233-234234-**Discovery rewards**:
235235-236236-- Konami code unlocks special theme
237237-- Hidden keyboard shortcuts (Cmd+K for special features)
238238-- Hover reveals on logos or illustrations
239239-- Alt text jokes on images (for screen reader users too!)
240240-- Console messages for developers ("Like what you see? We're hiring!")
241241-242242-**Seasonal touches**:
243243-244244-- Holiday themes (subtle, tasteful)
245245-- Seasonal color shifts
246246-- Weather-based variations
247247-- Time-based changes (dark at night, light during day)
248248-249249-**Contextual personality**:
250250-251251-- Different messages based on time of day
252252-- Responses to specific user actions
253253-- Randomized variations (not same every time)
254254-- Progressive reveals with continued use
255255-256256-### Loading & Waiting States
257257-258258-**Make waiting engaging**:
259259-260260-- Interesting loading messages that rotate
261261-- Progress bars with personality
262262-- Mini-games during long loads
263263-- Fun facts or tips while waiting
264264-- Countdown with encouraging messages
265265-266266-```
267267-Loading messages — write ones specific to your product, not generic AI filler:
268268-- "Crunching your latest numbers..."
269269-- "Syncing with your team's changes..."
270270-- "Preparing your dashboard..."
271271-- "Checking for updates since yesterday..."
272272-```
273273-274274-**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does.
275275-276276-### Celebration Moments
277277-278278-**Success celebrations**:
279279-280280-- Confetti for major milestones
281281-- Animated checkmarks for completions
282282-- Progress bar celebrations at 100%
283283-- "Achievement unlocked" style notifications
284284-- Personalized messages ("You published your 10th article!")
285285-286286-**Milestone recognition**:
287287-288288-- First-time actions get special treatment
289289-- Streak tracking and celebration
290290-- Progress toward goals
291291-- Anniversary celebrations
292292-293293-## Implementation Patterns
294294-295295-**Animation libraries**:
296296-297297-- Framer Motion (React)
298298-- GSAP (universal)
299299-- Lottie (After Effects animations)
300300-- Canvas confetti (party effects)
301301-302302-**Sound libraries**:
303303-304304-- Howler.js (audio management)
305305-- Use-sound (React hook)
306306-307307-**Physics libraries**:
308308-309309-- React Spring (spring physics)
310310-- Popmotion (animation primitives)
311311-312312-**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features.
313313-314314-**NEVER**:
315315-316316-- Delay core functionality for delight
317317-- Force users through delightful moments (make skippable)
318318-- Use delight to hide poor UX
319319-- Overdo it (less is more)
320320-- Ignore accessibility (animate responsibly, provide alternatives)
321321-- Make every interaction delightful (special moments should be special)
322322-- Sacrifice performance for delight
323323-- Be inappropriate for context (read the room)
324324-325325-## Verify Delight Quality
326326-327327-Test that delight actually delights:
328328-329329-- **User reactions**: Do users smile? Share screenshots?
330330-- **Doesn't annoy**: Still pleasant after 100th time?
331331-- **Doesn't block**: Can users opt out or skip?
332332-- **Performant**: No jank, no slowdown
333333-- **Appropriate**: Matches brand and context
334334-- **Accessible**: Works with reduced motion, screen readers
335335-336336-Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct.
-130
.agents/skills/distill/SKILL.md
···11----
22-name: distill
33-description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1414-1515----
1616-1717-## Assess Current State
1818-1919-Analyze what makes the design feel complex or cluttered:
2020-2121-1. **Identify complexity sources**:
2222- - **Too many elements**: Competing buttons, redundant information, visual clutter
2323- - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose
2424- - **Information overload**: Everything visible at once, no progressive disclosure
2525- - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations
2626- - **Confusing hierarchy**: Unclear what matters most
2727- - **Feature creep**: Too many options, actions, or paths forward
2828-2929-2. **Find the essence**:
3030- - What's the primary user goal? (There should be ONE)
3131- - What's actually necessary vs nice-to-have?
3232- - What can be removed, hidden, or combined?
3333- - What's the 20% that delivers 80% of value?
3434-3535-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
3636-3737-**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence.
3838-3939-## Plan Simplification
4040-4141-Create a ruthless editing strategy:
4242-4343-- **Core purpose**: What's the ONE thing this should accomplish?
4444-- **Essential elements**: What's truly necessary to achieve that purpose?
4545-- **Progressive disclosure**: What can be hidden until needed?
4646-- **Consolidation opportunities**: What can be combined or integrated?
4747-4848-**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless.
4949-5050-## Simplify the Design
5151-5252-Systematically remove complexity across these dimensions:
5353-5454-### Information Architecture
5555-5656-- **Reduce scope**: Remove secondary actions, optional features, redundant information
5757-- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows)
5858-- **Combine related actions**: Merge similar buttons, consolidate forms, group related content
5959-- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden
6060-- **Remove redundancy**: If it's said elsewhere, don't repeat it here
6161-6262-### Visual Simplification
6363-6464-- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors
6565-- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights
6666-- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function
6767-- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards
6868-- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead
6969-- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps
7070-7171-### Layout Simplification
7272-7373-- **Linear flow**: Replace complex grids with simple vertical flow where possible
7474-- **Remove sidebars**: Move secondary content inline or hide it
7575-- **Full-width**: Use available space generously instead of complex multi-column layouts
7676-- **Consistent alignment**: Pick left or center, stick with it
7777-- **Generous white space**: Let content breathe, don't pack everything tight
7878-7979-### Interaction Simplification
8080-8181-- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real)
8282-- **Smart defaults**: Make common choices automatic, only ask when necessary
8383-- **Inline actions**: Replace modal flows with inline editing where possible
8484-- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified?
8585-- **Clear CTAs**: ONE obvious next step, not five competing actions
8686-8787-### Content Simplification
8888-8989-- **Shorter copy**: Cut every sentence in half, then do it again
9090-- **Active voice**: "Save changes" not "Changes will be saved"
9191-- **Remove jargon**: Plain language always wins
9292-- **Scannable structure**: Short paragraphs, bullet points, clear headings
9393-- **Essential information only**: Remove marketing fluff, legalese, hedging
9494-- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once
9595-9696-### Code Simplification
9797-9898-- **Remove unused code**: Dead CSS, unused components, orphaned files
9999-- **Flatten component trees**: Reduce nesting depth
100100-- **Consolidate styles**: Merge similar styles, use utilities consistently
101101-- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases?
102102-103103-**NEVER**:
104104-105105-- Remove necessary functionality (simplicity ≠ feature-less)
106106-- Sacrifice accessibility for simplicity (clear labels and ARIA still required)
107107-- Make things so simple they're unclear (mystery ≠ minimalism)
108108-- Remove information users need to make decisions
109109-- Eliminate hierarchy completely (some things should stand out)
110110-- Oversimplify complex domains (match complexity to actual task complexity)
111111-112112-## Verify Simplification
113113-114114-Ensure simplification improves usability:
115115-116116-- **Faster task completion**: Can users accomplish goals more quickly?
117117-- **Reduced cognitive load**: Is it easier to understand what to do?
118118-- **Still complete**: Are all necessary features still accessible?
119119-- **Clearer hierarchy**: Is it obvious what matters most?
120120-- **Better performance**: Does simpler design load faster?
121121-122122-## Document Removed Complexity
123123-124124-If you removed features or options:
125125-126126-- Document why they were removed
127127-- Consider if they need alternative access points
128128-- Note any user feedback to monitor
129129-130130-Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."
-370
.agents/skills/impeccable/SKILL.md
···11----
22-name: impeccable
33-description: Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[craft|teach|extract]"
77-license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
88----
99-1010-This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
1111-1212-## Context Gathering Protocol
1313-1414-Design skills produce generic output without project context. You MUST have confirmed design context before doing any design work.
1515-1616-**Required context** (every design skill needs at minimum):
1717-1818-- **Target audience**: Who uses this product and in what context?
1919-- **Use cases**: What jobs are they trying to get done?
2020-- **Brand personality/tone**: How should the interface feel?
2121-2222-Individual skills may require additional context. Check the skill's preparation section for specifics.
2323-2424-**CRITICAL**: You cannot infer this context by reading the codebase. Code tells you what was built, not who it's for or what it should feel like. Only the creator can provide this context.
2525-2626-**Gathering order:**
2727-2828-1. **Check current instructions (instant)**: If your loaded instructions already contain a **Design Context** section, proceed immediately.
2929-2. **Check .impeccable.md (fast)**: If not in instructions, read `.impeccable.md` from the project root. If it exists and contains the required context, proceed.
3030-3. **Run impeccable teach (REQUIRED)**: If neither source has context, you MUST run /impeccable teach NOW before doing anything else. Do NOT skip this step. Do NOT attempt to infer context from the codebase instead.
3131-3232----
3333-3434-## Design Direction
3535-3636-Commit to a BOLD aesthetic direction:
3737-3838-- **Purpose**: What problem does this interface solve? Who uses it?
3939-- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
4040-- **Constraints**: Technical requirements (framework, performance, accessibility).
4141-- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
4242-4343-**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work. The key is intentionality, not intensity.
4444-4545-Then implement working code that is:
4646-4747-- Production-grade and functional
4848-- Visually striking and memorable
4949-- Cohesive with a clear aesthetic point-of-view
5050-- Meticulously refined in every detail
5151-5252-## Frontend Aesthetics Guidelines
5353-5454-### Typography
5555-5656-→ _Consult [typography reference](reference/typography.md) for OpenType features, web font loading, and the deeper material on scales._
5757-5858-Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font.
5959-6060-<typography_principles>
6161-Always apply these — do not consult a reference, just do them:
6262-6363-- Use a modular type scale with fluid sizing (clamp) for headings on marketing/content pages. Use fixed `rem` scales for app UIs and dashboards (no major design system uses fluid type in product UI).
6464-- Use fewer sizes with more contrast. A 5-step scale with at least a 1.25 ratio between steps creates clearer hierarchy than 8 sizes that are 1.1× apart.
6565-- Line-height scales inversely with line length. Narrow columns want tighter leading, wide columns want more. For light text on dark backgrounds, ADD 0.05-0.1 to your normal line-height — light type reads as lighter weight and needs more breathing room.
6666-- Cap line length at ~65-75ch. Body text wider than that is fatiguing.
6767- </typography_principles>
6868-6969-<font_selection_procedure>
7070-DO THIS BEFORE TYPING ANY FONT NAME.
7171-7272-The model's natural failure mode is "I was told not to use Inter, so I will pick my next favorite font, which becomes the new monoculture." Avoid this by performing the following procedure on every project, in order:
7373-7474-Step 1. Read the brief once. Write down 3 concrete words for the brand voice (e.g., "warm and mechanical and opinionated", "calm and clinical and careful", "fast and dense and unimpressed", "handmade and a little weird"). NOT "modern" or "elegant" — those are dead categories.
7575-7676-Step 2. List the 3 fonts you would normally reach for given those words. Write them down. They are most likely from this list:
7777-7878-<reflex_fonts_to_reject>
7979-Fraunces
8080-Newsreader
8181-Lora
8282-Crimson
8383-Crimson Pro
8484-Crimson Text
8585-Playfair Display
8686-Cormorant
8787-Cormorant Garamond
8888-Syne
8989-IBM Plex Mono
9090-IBM Plex Sans
9191-IBM Plex Serif
9292-Space Mono
9393-Space Grotesk
9494-Inter
9595-DM Sans
9696-DM Serif Display
9797-DM Serif Text
9898-Outfit
9999-Plus Jakarta Sans
100100-Instrument Sans
101101-Instrument Serif
102102-</reflex_fonts_to_reject>
103103-104104-Reject every font that appears in the reflex_fonts_to_reject list. They are your training-data defaults and they create monoculture across projects.
105105-106106-Step 3. Browse a font catalog with the 3 brand words in mind. Sources: Google Fonts, Pangram Pangram, Future Fonts, Adobe Fonts, ABC Dinamo, Klim Type Foundry, Velvetyne. Look for something that fits the brand as a _physical object_ — a museum exhibit caption, a hand-painted shop sign, a 1970s mainframe terminal manual, a fabric label on the inside of a coat, a children's book printed on cheap newsprint. Reject the first thing that "looks designy" — that's the trained reflex too. Keep looking.
107107-108108-Step 4. Cross-check the result. The right font for an "elegant" brief is NOT necessarily a serif. The right font for a "technical" brief is NOT necessarily a sans-serif. The right font for a "warm" brief is NOT Fraunces. If your final pick lines up with your reflex pattern, go back to Step 3.
109109-</font_selection_procedure>
110110-111111-<typography_rules>
112112-DO use a modular type scale with fluid sizing (clamp) on headings.
113113-DO vary font weights and sizes to create clear visual hierarchy.
114114-DO vary your font choices across projects. If you used a serif display font on the last project, look for a sans, monospace, or display face on this one.
115115-116116-DO NOT use overused fonts like Inter, Roboto, Arial, Open Sans, or system defaults — but also do not simply switch to your second-favorite. Every font in the reflex_fonts_to_reject list above is banned. Look further.
117117-DO NOT use monospace typography as lazy shorthand for "technical/developer" vibes.
118118-DO NOT put large icons with rounded corners above every heading. They rarely add value and make sites look templated.
119119-DO NOT use only one font family for the entire page. Pair a distinctive display font with a refined body font.
120120-DO NOT use a flat type hierarchy where sizes are too close together. Aim for at least a 1.25 ratio between steps.
121121-DO NOT set long body passages in uppercase. Reserve all-caps for short labels and headings.
122122-</typography_rules>
123123-124124-### Color & Theme
125125-126126-→ _Consult [color reference](reference/color-and-contrast.md) for the deeper material on contrast, accessibility, and palette construction._
127127-128128-Commit to a cohesive palette. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
129129-130130-<color_principles>
131131-Always apply these — do not consult a reference, just do them:
132132-133133-- Use OKLCH, not HSL. OKLCH is perceptually uniform: equal steps in lightness _look_ equal, which HSL does not deliver. As you move toward white or black, REDUCE chroma — high chroma at extreme lightness looks garish. A light blue at 85% lightness wants ~0.08 chroma, not the 0.15 of your base color.
134134-- Tint your neutrals toward your brand hue. Even a chroma of 0.005-0.01 is perceptible and creates subconscious cohesion between brand color and UI surfaces. The hue you tint toward should come from THIS brand, not from a "warm = friendly" or "cool = tech" formula. Pick the brand's actual hue first, then tint everything toward it.
135135-- The 60-30-10 rule is about visual _weight_, not pixel count. 60% neutral / surface, 30% secondary text and borders, 10% accent. Accents work BECAUSE they're rare. Overuse kills their power.
136136- </color_principles>
137137-138138-<theme_selection>
139139-Theme (light vs dark) should be DERIVED from audience and viewing context, not picked from a default. Read the brief and ask: when is this product used, by whom, in what physical setting?
140140-141141-- A perp DEX consumed during fast trading sessions → dark
142142-- A hospital portal consumed by anxious patients on phones late at night → light
143143-- A children's reading app → light
144144-- A vintage motorcycle forum where users sit in their garage at 9pm → dark
145145-- An observability dashboard for SREs in a dark office → dark
146146-- A wedding planning checklist for couples on a Sunday morning → light
147147-- A music player app for headphone listening at night → dark
148148-- A food magazine homepage browsed during a coffee break → light
149149-150150-Do not default everything to light "to play it safe." Do not default everything to dark "to look cool." Both defaults are the lazy reflex. The correct theme is the one the actual user wants in their actual context.
151151-</theme_selection>
152152-153153-<color_rules>
154154-DO use modern CSS color functions (oklch, color-mix, light-dark) for perceptually uniform, maintainable palettes.
155155-DO tint your neutrals toward your brand hue. Even a subtle hint creates subconscious cohesion.
156156-157157-DO NOT use gray text on colored backgrounds; it looks washed out. Use a shade of the background color instead.
158158-DO NOT use pure black (#000) or pure white (#fff). Always tint; pure black/white never appears in nature.
159159-DO NOT use the AI color palette: cyan-on-dark, purple-to-blue gradients, neon accents on dark backgrounds.
160160-DO NOT use gradient text for impact — see <absolute_bans> below for the strict definition. Solid colors only for text.
161161-DO NOT default to dark mode with glowing accents. It looks "cool" without requiring actual design decisions.
162162-DO NOT default to light mode "to be safe" either. The point is to choose, not to retreat to a safe option.
163163-</color_rules>
164164-165165-### Layout & Space
166166-167167-→ _Consult [spatial reference](reference/spatial-design.md) for the deeper material on grids, container queries, and optical adjustments._
168168-169169-Create visual rhythm through varied spacing, not the same padding everywhere. Embrace asymmetry and unexpected compositions. Break the grid intentionally for emphasis.
170170-171171-<spatial_principles>
172172-Always apply these — do not consult a reference, just do them:
173173-174174-- Use a 4pt spacing scale with semantic token names (`--space-sm`, `--space-md`), not pixel-named (`--spacing-8`). Scale: 4, 8, 12, 16, 24, 32, 48, 64, 96. 8pt is too coarse — you'll often want 12px between two values.
175175-- Use `gap` instead of margins for sibling spacing. It eliminates margin collapse and the cleanup hacks that come with it.
176176-- Vary spacing for hierarchy. A heading with extra space above it reads as more important — make use of that. Don't apply the same padding everywhere.
177177-- Self-adjusting grid pattern: `grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))` is the breakpoint-free responsive grid for card-style content.
178178-- Container queries are for components, viewport queries are for page layout. A card in a sidebar should adapt to the sidebar's width, not the viewport's.
179179- </spatial_principles>
180180-181181-<spatial_rules>
182182-DO create visual rhythm through varied spacing: tight groupings, generous separations.
183183-DO use fluid spacing with clamp() that breathes on larger screens.
184184-DO use asymmetry and unexpected compositions; break the grid intentionally for emphasis.
185185-186186-DO NOT wrap everything in cards. Not everything needs a container.
187187-DO NOT nest cards inside cards. Visual noise; flatten the hierarchy.
188188-DO NOT use identical card grids (same-sized cards with icon + heading + text, repeated endlessly).
189189-DO NOT use the hero metric layout template (big number, small label, supporting stats, gradient accent).
190190-DO NOT center everything. Left-aligned text with asymmetric layouts feels more designed.
191191-DO NOT use the same spacing everywhere. Without rhythm, layouts feel monotonous.
192192-DO NOT let body text wrap beyond ~80 characters per line. Add a max-width like 65–75ch so the eye can track easily.
193193-</spatial_rules>
194194-195195-### Visual Details
196196-197197-<absolute_bans>
198198-These CSS patterns are NEVER acceptable. They are the most recognizable AI design tells. Match-and-refuse: if you find yourself about to write any of these, stop and rewrite the element with a different structure entirely.
199199-200200-BAN 1: Side-stripe borders on cards/list items/callouts/alerts
201201-202202-- PATTERN: `border-left:` or `border-right:` with width greater than 1px
203203-- INCLUDES: hard-coded colors AND CSS variables
204204-- FORBIDDEN: `border-left: 3px solid red`, `border-left: 4px solid #ff0000`, `border-left: 4px solid var(--color-warning)`, `border-left: 5px solid oklch(...)`, etc.
205205-- WHY: this is the single most overused "design touch" in admin, dashboard, and medical UIs. It never looks intentional regardless of color, radius, opacity, or whether the variable name is "primary" or "warning" or "accent."
206206-- REWRITE: use a different element structure entirely. Do not just swap to box-shadow inset. Reach for full borders, background tints, leading numbers/icons, or no visual indicator at all.
207207-208208-BAN 2: Gradient text
209209-210210-- PATTERN: `background-clip: text` (or `-webkit-background-clip: text`) combined with a gradient background
211211-- FORBIDDEN: any combination that makes text fill come from a `linear-gradient`, `radial-gradient`, or `conic-gradient`
212212-- WHY: gradient text is decorative rather than meaningful and is one of the top three AI design tells
213213-- REWRITE: use a single solid color for text. If you want emphasis, use weight or size, not gradient fill.
214214- </absolute_bans>
215215-216216-DO: Use intentional, purposeful decorative elements that reinforce brand.
217217-DO NOT: Use border-left or border-right greater than 1px as a colored accent stripe on cards, list items, callouts, or alerts. See <absolute_bans> above for the strict CSS pattern.
218218-DO NOT: Use glassmorphism everywhere (blur effects, glass cards, glow borders used decoratively rather than purposefully).
219219-DO NOT: Use sparklines as decoration. Tiny charts that look sophisticated but convey nothing meaningful.
220220-DO NOT: Use rounded rectangles with generic drop shadows. Safe, forgettable, could be any AI output.
221221-DO NOT: Use modals unless there's truly no better alternative. Modals are lazy.
222222-223223-### Motion
224224-225225-→ _Consult [motion reference](reference/motion-design.md) for timing, easing, and reduced motion._
226226-227227-Focus on high-impact moments: one well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions.
228228-229229-**DO**: Use motion to convey state changes: entrances, exits, feedback
230230-**DO**: Use exponential easing (ease-out-quart/quint/expo) for natural deceleration
231231-**DO**: For height animations, use grid-template-rows transitions instead of animating height directly
232232-**DON'T**: Animate layout properties (width, height, padding, margin). Use transform and opacity only
233233-**DON'T**: Use bounce or elastic easing. They feel dated and tacky; real objects decelerate smoothly
234234-235235-### Interaction
236236-237237-→ _Consult [interaction reference](reference/interaction-design.md) for forms, focus, and loading patterns._
238238-239239-Make interactions feel fast. Use optimistic UI: update immediately, sync later.
240240-241241-**DO**: Use progressive disclosure. Start simple, reveal sophistication through interaction (basic options first, advanced behind expandable sections; hover states that reveal secondary actions)
242242-**DO**: Design empty states that teach the interface, not just say "nothing here"
243243-**DO**: Make every interactive surface feel intentional and responsive
244244-**DON'T**: Repeat the same information (redundant headers, intros that restate the heading)
245245-**DON'T**: Make every button primary. Use ghost buttons, text links, secondary styles; hierarchy matters
246246-247247-### Responsive
248248-249249-→ _Consult [responsive reference](reference/responsive-design.md) for mobile-first, fluid design, and container queries._
250250-251251-**DO**: Use container queries (@container) for component-level responsiveness
252252-**DO**: Adapt the interface for different contexts, not just shrink it
253253-**DON'T**: Hide critical functionality on mobile. Adapt the interface, don't amputate it
254254-255255-### UX Writing
256256-257257-→ _Consult [ux-writing reference](reference/ux-writing.md) for labels, errors, and empty states._
258258-259259-**DO**: Make every word earn its place
260260-**DON'T**: Repeat information users can already see
261261-262262----
263263-264264-## The AI Slop Test
265265-266266-**Critical quality check**: If you showed this interface to someone and said "AI made this," would they believe you immediately? If yes, that's the problem.
267267-268268-A distinctive interface should make someone ask "how was this made?" not "which AI made this?"
269269-270270-Review the DON'T guidelines above. They are the fingerprints of AI-generated work from 2024-2025.
271271-272272----
273273-274274-## Implementation Principles
275275-276276-Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details.
277277-278278-Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices across generations.
279279-280280-Remember: the model is capable of extraordinary creative work. Don't hold back. Show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
281281-282282----
283283-284284-## Craft Mode
285285-286286-If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description.
287287-288288----
289289-290290-## Teach Mode
291291-292292-If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project.
293293-294294-### Step 1: Explore the Codebase
295295-296296-Before asking questions, thoroughly scan the project to discover what you can:
297297-298298-- **README and docs**: Project purpose, target audience, any stated goals
299299-- **Package.json / config files**: Tech stack, dependencies, existing design libraries
300300-- **Existing components**: Current design patterns, spacing, typography in use
301301-- **Brand assets**: Logos, favicons, color values already defined
302302-- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales
303303-- **Any style guides or brand documentation**
304304-305305-Note what you've learned and what remains unclear.
306306-307307-### Step 2: Ask UX-Focused Questions
308308-309309-ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase:
310310-311311-#### Users & Purpose
312312-313313-- Who uses this? What's their context when using it?
314314-- What job are they trying to get done?
315315-- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.)
316316-317317-#### Brand & Personality
318318-319319-- How would you describe the brand personality in 3 words?
320320-- Any reference sites or apps that capture the right feel? What specifically about them?
321321-- What should this explicitly NOT look like? Any anti-references?
322322-323323-#### Aesthetic Preferences
324324-325325-- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.)
326326-- Light mode, dark mode, or both?
327327-- Any colors that must be used or avoided?
328328-329329-#### Accessibility & Inclusion
330330-331331-- Specific accessibility requirements? (WCAG level, known user needs)
332332-- Considerations for reduced motion, color blindness, or other accommodations?
333333-334334-Skip questions where the answer is already clear from the codebase exploration.
335335-336336-### Step 3: Write Design Context
337337-338338-Synthesize your findings and the user's answers into a `## Design Context` section:
339339-340340-```markdown
341341-## Design Context
342342-343343-### Users
344344-345345-[Who they are, their context, the job to be done]
346346-347347-### Brand Personality
348348-349349-[Voice, tone, 3-word personality, emotional goals]
350350-351351-### Aesthetic Direction
352352-353353-[Visual tone, references, anti-references, theme]
354354-355355-### Design Principles
356356-357357-[3-5 principles derived from the conversation that should guide all design decisions]
358358-```
359359-360360-Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place.
361361-362362-Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .github/copilot-instructions.md. If yes, append or update the section there as well.
363363-364364-Confirm completion and summarize the key design principles that will now guide all future work.
365365-366366----
367367-368368-## Extract Mode
369369-370370-If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target.
···11-# Color & Contrast
22-33-## Color Spaces: Use OKLCH
44-55-**Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness _look_ equal—unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
66-77-The OKLCH function takes three components: `oklch(lightness chroma hue)` where lightness is 0-100%, chroma is roughly 0-0.4, and hue is 0-360. To build a primary color and its lighter / darker variants, hold the chroma+hue roughly constant and vary the lightness — but **reduce chroma as you approach white or black**, because high chroma at extreme lightness looks garish.
88-99-The hue you pick is a brand decision and should not come from a default. Do not reach for blue (hue 250) or warm orange (hue 60) by reflex — those are the dominant AI-design defaults, not the right answer for any specific brand.
1010-1111-## Building Functional Palettes
1212-1313-### Tinted Neutrals
1414-1515-**Pure gray is dead.** A neutral with zero chroma feels lifeless next to a colored brand. Add a tiny chroma value (0.005-0.015) to all your neutrals, hued toward whatever your brand color is. The chroma is small enough not to read as "tinted" consciously, but it creates subconscious cohesion between brand color and UI surfaces.
1616-1717-The hue you tint toward should come from THIS project's brand, not from a "warm = friendly, cool = tech" formula. If your brand color is teal, your neutrals lean toward teal. If your brand color is amber, they lean toward amber. The point is cohesion with the SPECIFIC brand, not a stock palette.
1818-1919-**Avoid** the trap of always tinting toward warm orange or always tinting toward cool blue. Those are the two laziest defaults and they create their own monoculture across projects.
2020-2121-### Palette Structure
2222-2323-A complete system needs:
2424-2525-| Role | Purpose | Example |
2626-| ------------ | ----------------------------- | ------------------------- |
2727-| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
2828-| **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
2929-| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
3030-| **Surface** | Cards, modals, overlays | 2-3 elevation levels |
3131-3232-**Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
3333-3434-### The 60-30-10 Rule (Applied Correctly)
3535-3636-This rule is about **visual weight**, not pixel count:
3737-3838-- **60%**: Neutral backgrounds, white space, base surfaces
3939-- **30%**: Secondary colors—text, borders, inactive states
4040-- **10%**: Accent—CTAs, highlights, focus states
4141-4242-The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work _because_ they're rare. Overuse kills their power.
4343-4444-## Contrast & Accessibility
4545-4646-### WCAG Requirements
4747-4848-| Content Type | AA Minimum | AAA Target |
4949-| ------------------------------- | ---------- | ---------- |
5050-| Body text | 4.5:1 | 7:1 |
5151-| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
5252-| UI components, icons | 3:1 | 4.5:1 |
5353-| Non-essential decorations | None | None |
5454-5555-**The gotcha**: Placeholder text still needs 4.5:1. That light gray placeholder you see everywhere? Usually fails WCAG.
5656-5757-### Dangerous Color Combinations
5858-5959-These commonly fail contrast or cause readability issues:
6060-6161-- Light gray text on white (the #1 accessibility fail)
6262-- **Gray text on any colored background**—gray looks washed out and dead on color. Use a darker shade of the background color, or transparency
6363-- Red text on green background (or vice versa)—8% of men can't distinguish these
6464-- Blue text on red background (vibrates visually)
6565-- Yellow text on white (almost always fails)
6666-- Thin light text on images (unpredictable contrast)
6767-6868-### Never Use Pure Gray or Pure Black
6969-7070-Pure gray (`oklch(50% 0 0)`) and pure black (`#000`) don't exist in nature—real shadows and surfaces always have a color cast. Even a chroma of 0.005-0.01 is enough to feel natural without being obviously tinted. (See tinted neutrals example above.)
7171-7272-### Testing
7373-7474-Don't trust your eyes. Use tools:
7575-7676-- [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
7777-- Browser DevTools → Rendering → Emulate vision deficiencies
7878-- [Polypane](https://polypane.app/) for real-time testing
7979-8080-## Theming: Light & Dark Mode
8181-8282-### Dark Mode Is Not Inverted Light Mode
8383-8484-You can't just swap colors. Dark mode requires different design decisions:
8585-8686-| Light Mode | Dark Mode |
8787-| ------------------ | --------------------------------------------- |
8888-| Shadows for depth | Lighter surfaces for depth (no shadows) |
8989-| Dark text on light | Light text on dark (reduce font weight) |
9090-| Vibrant accents | Desaturate accents slightly |
9191-| White backgrounds | Never pure black—use dark gray (oklch 12-18%) |
9292-9393-In dark mode, depth comes from surface lightness, not shadow. Build a 3-step surface scale where higher elevations are lighter (e.g. 15% / 20% / 25% lightness). Use the SAME hue and chroma as your brand color (whatever it is for THIS project — do not reach for blue) and only vary the lightness. Reduce body text weight slightly (e.g. 350 instead of 400) because light text on dark reads as heavier than dark text on light.
9494-9595-### Token Hierarchy
9696-9797-Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer—primitives stay the same.
9898-9999-## Alpha Is A Design Smell
100100-101101-Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
102102-103103----
104104-105105-**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Using pure black (#000) for large areas. Skipping color blindness testing (8% of men affected).
-73
.agents/skills/impeccable/reference/craft.md
···11-# Craft Flow
22-33-Build a feature with impeccable UX and UI quality through a structured process: shape the design, load the right references, then build and iterate visually until the result is delightful.
44-55-## Step 1: Shape the Design
66-77-Run /shape, passing along whatever feature description the user provided.
88-99-Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it.
1010-1111-If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief.
1212-1313-## Step 2: Load References
1414-1515-Based on the design brief's "Recommended References" section, consult the relevant impeccable reference files. At minimum, always consult:
1616-1717-- [spatial-design.md](spatial-design.md) for layout and spacing
1818-- [typography.md](typography.md) for type hierarchy
1919-2020-Then add references based on the brief's needs:
2121-2222-- Complex interactions or forms? Consult [interaction-design.md](interaction-design.md)
2323-- Animation or transitions? Consult [motion-design.md](motion-design.md)
2424-- Color-heavy or themed? Consult [color-and-contrast.md](color-and-contrast.md)
2525-- Responsive requirements? Consult [responsive-design.md](responsive-design.md)
2626-- Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
2727-2828-## Step 3: Build
2929-3030-Implement the feature following the design brief. Work in this order:
3131-3232-1. **Structure first**: HTML/semantic structure for the primary state. No styling yet.
3333-2. **Layout and spacing**: Establish the spatial rhythm and visual hierarchy.
3434-3. **Typography and color**: Apply the type scale and color system.
3535-4. **Interactive states**: Hover, focus, active, disabled.
3636-5. **Edge case states**: Empty, loading, error, overflow, first-run.
3737-6. **Motion**: Purposeful transitions and animations (if appropriate).
3838-7. **Responsive**: Adapt for different viewports. Don't just shrink; redesign for the context.
3939-4040-### During Build
4141-4242-- Test with real (or realistic) data at every step, not placeholder text
4343-- Check each state as you build it, not all at the end
4444-- If you discover a design question, stop and ask rather than guessing
4545-- Every visual choice should trace back to something in the design brief
4646-4747-## Step 4: Visual Iteration
4848-4949-**This step is critical.** Do not stop after the first implementation pass.
5050-5151-Open the result in a browser window. If browser automation tools are available, use them to navigate to the page and visually inspect the result. If not, ask the user to open it and provide feedback.
5252-5353-Iterate through these checks visually:
5454-5555-1. **Does it match the brief?** Compare the live result against every section of the design brief. Fix discrepancies.
5656-2. **Does it pass the AI slop test?** If someone saw this and said "AI made this," would they believe it immediately? If yes, it needs more design intention.
5757-3. **Check against impeccable's DON'T guidelines.** Fix any anti-pattern violations.
5858-4. **Check every state.** Navigate through empty, error, loading, and edge case states. Each one should feel intentional, not like an afterthought.
5959-5. **Check responsive.** Resize the viewport. Does it adapt well or just shrink?
6060-6. **Check the details.** Spacing consistency, type hierarchy clarity, color contrast, interactive feedback, motion timing.
6161-6262-After each round of fixes, visually verify again. **Repeat until you would be proud to show this to the user.** The bar is not "it works"; the bar is "this delights."
6363-6464-## Step 5: Present
6565-6666-Present the result to the user:
6767-6868-- Show the feature in its primary state
6969-- Walk through the key states (empty, error, responsive)
7070-- Explain design decisions that connect back to the design brief
7171-- Ask: "What's working? What isn't?"
7272-7373-Iterate based on feedback. Good design is rarely right on the first pass.
-71
.agents/skills/impeccable/reference/extract.md
···11-# Extract Flow
22-33-Identify reusable patterns, components, and design tokens, then extract and consolidate them into the design system for systematic reuse.
44-55-## Step 1: Discover the Design System
66-77-Find the design system, component library, or shared UI directory. Understand its structure: component organization, naming conventions, design token structure, import/export conventions.
88-99-**CRITICAL**: If no design system exists, ask the user directly to clarify what you cannot infer. before creating one. Understand the preferred location and structure first.
1010-1111-## Step 2: Identify Patterns
1212-1313-Look for extraction opportunities in the target area:
1414-1515-- **Repeated components**: Similar UI patterns used 3+ times (buttons, cards, inputs)
1616-- **Hard-coded values**: Colors, spacing, typography, shadows that should be tokens
1717-- **Inconsistent variations**: Multiple implementations of the same concept
1818-- **Composition patterns**: Layout or interaction patterns that repeat (form rows, toolbar groups, empty states)
1919-- **Type styles**: Repeated font-size + weight + line-height combinations
2020-- **Animation patterns**: Repeated easing, duration, or keyframe combinations
2121-2222-Assess value: only extract things used 3+ times with the same intent. Premature abstraction is worse than duplication.
2323-2424-## Step 3: Plan Extraction
2525-2626-Create a systematic plan:
2727-2828-- **Components to extract**: Which UI elements become reusable components?
2929-- **Tokens to create**: Which hard-coded values become design tokens?
3030-- **Variants to support**: What variations does each component need?
3131-- **Naming conventions**: Component names, token names, prop names that match existing patterns
3232-- **Migration path**: How to refactor existing uses to consume the new shared versions
3333-3434-**IMPORTANT**: Design systems grow incrementally. Extract what is clearly reusable now, not everything that might someday be reusable.
3535-3636-## Step 4: Extract & Enrich
3737-3838-Build improved, reusable versions:
3939-4040-- **Components**: Clear props API with sensible defaults, proper variants for different use cases, accessibility built in (ARIA, keyboard navigation, focus management), documentation and usage examples
4141-- **Design tokens**: Clear naming (primitive vs semantic), proper hierarchy and organization, documentation of when to use each token
4242-- **Patterns**: When to use this pattern, code examples, variations and combinations
4343-4444-## Step 5: Migrate
4545-4646-Replace existing uses with the new shared versions:
4747-4848-- **Find all instances**: Search for the patterns you extracted
4949-- **Replace systematically**: Update each use to consume the shared version
5050-- **Test thoroughly**: Ensure visual and functional parity
5151-- **Delete dead code**: Remove the old implementations
5252-5353-## Step 6: Document
5454-5555-Update design system documentation:
5656-5757-- Add new components to the component library
5858-- Document token usage and values
5959-- Add examples and guidelines
6060-- Update any Storybook or component catalog
6161-6262-**NEVER**:
6363-6464-- Extract one-off, context-specific implementations without generalization
6565-- Create components so generic they are useless
6666-- Extract without considering existing design system conventions
6767-- Skip proper TypeScript types or prop documentation
6868-- Create tokens for every single value (tokens should have semantic meaning)
6969-- Extract things that differ in intent (two buttons that look similar but serve different purposes should stay separate)
7070-7171-Remember: A good design system is a living system. Extract patterns as they emerge, enrich them thoughtfully, and maintain them consistently.
···11-# Interaction Design
22-33-## The Eight Interactive States
44-55-Every interactive element needs these states designed:
66-77-| State | When | Visual Treatment |
88-| ------------ | --------------------------- | --------------------------- |
99-| **Default** | At rest | Base styling |
1010-| **Hover** | Pointer over (not touch) | Subtle lift, color shift |
1111-| **Focus** | Keyboard/programmatic focus | Visible ring (see below) |
1212-| **Active** | Being pressed | Pressed in, darker |
1313-| **Disabled** | Not interactive | Reduced opacity, no pointer |
1414-| **Loading** | Processing | Spinner, skeleton |
1515-| **Error** | Invalid state | Red border, icon, message |
1616-| **Success** | Completed | Green check, confirmation |
1717-1818-**The common miss**: Designing hover without focus, or vice versa. They're different. Keyboard users never see hover states.
1919-2020-## Focus Rings: Do Them Right
2121-2222-**Never `outline: none` without replacement.** It's an accessibility violation. Instead, use `:focus-visible` to show focus only for keyboard users:
2323-2424-```css
2525-/* Hide focus ring for mouse/touch */
2626-button:focus {
2727- outline: none;
2828-}
2929-3030-/* Show focus ring for keyboard */
3131-button:focus-visible {
3232- outline: 2px solid var(--color-accent);
3333- outline-offset: 2px;
3434-}
3535-```
3636-3737-**Focus ring design**:
3838-3939-- High contrast (3:1 minimum against adjacent colors)
4040-- 2-3px thick
4141-- Offset from element (not inside it)
4242-- Consistent across all interactive elements
4343-4444-## Form Design: The Non-Obvious
4545-4646-**Placeholders aren't labels**—they disappear on input. Always use visible `<label>` elements. **Validate on blur**, not on every keystroke (exception: password strength). Place errors **below** fields with `aria-describedby` connecting them.
4747-4848-## Loading States
4949-5050-**Optimistic updates**: Show success immediately, rollback on failure. Use for low-stakes actions (likes, follows), not payments or destructive actions. **Skeleton screens > spinners**—they preview content shape and feel faster than generic spinners.
5151-5252-## Modals: The Inert Approach
5353-5454-Focus trapping in modals used to require complex JavaScript. Now use the `inert` attribute:
5555-5656-```html
5757-<!-- When modal is open -->
5858-<main inert>
5959- <!-- Content behind modal can't be focused or clicked -->
6060-</main>
6161-<dialog open>
6262- <h2>Modal Title</h2>
6363- <!-- Focus stays inside modal -->
6464-</dialog>
6565-```
6666-6767-Or use the native `<dialog>` element:
6868-6969-```javascript
7070-const dialog = document.querySelector("dialog");
7171-dialog.showModal(); // Opens with focus trap, closes on Escape
7272-```
7373-7474-## The Popover API
7575-7676-For tooltips, dropdowns, and non-modal overlays, use native popovers:
7777-7878-```html
7979-<button popovertarget="menu">Open menu</button>
8080-<div id="menu" popover>
8181- <button>Option 1</button>
8282- <button>Option 2</button>
8383-</div>
8484-```
8585-8686-**Benefits**: Light-dismiss (click outside closes), proper stacking, no z-index wars, accessible by default.
8787-8888-## Dropdown & Overlay Positioning
8989-9090-Dropdowns rendered with `position: absolute` inside a container that has `overflow: hidden` or `overflow: auto` will be clipped. This is the single most common dropdown bug in generated code.
9191-9292-### CSS Anchor Positioning
9393-9494-The modern solution uses the CSS Anchor Positioning API to tether an overlay to its trigger without JavaScript:
9595-9696-```css
9797-.trigger {
9898- anchor-name: --menu-trigger;
9999-}
100100-101101-.dropdown {
102102- position: fixed;
103103- position-anchor: --menu-trigger;
104104- position-area: block-end span-inline-end;
105105- margin-top: 4px;
106106-}
107107-108108-/* Flip above if no room below */
109109-@position-try --flip-above {
110110- position-area: block-start span-inline-end;
111111- margin-bottom: 4px;
112112-}
113113-```
114114-115115-Because the dropdown uses `position: fixed`, it escapes any `overflow` clipping on ancestor elements. The `@position-try` block handles viewport edges automatically. **Browser support**: Chrome 125+, Edge 125+. Not yet in Firefox or Safari - use a fallback for those browsers.
116116-117117-### Popover + Anchor Combo
118118-119119-Combining the Popover API with anchor positioning gives you stacking, light-dismiss, accessibility, and correct positioning in one pattern:
120120-121121-```html
122122-<button popovertarget="menu" class="trigger">Open</button>
123123-<div id="menu" popover class="dropdown">
124124- <button>Option 1</button>
125125- <button>Option 2</button>
126126-</div>
127127-```
128128-129129-The `popover` attribute places the element in the **top layer**, which sits above all other content regardless of z-index or overflow. No portal needed.
130130-131131-### Portal / Teleport Pattern
132132-133133-In component frameworks, render the dropdown at the document root and position it with JavaScript:
134134-135135-- **React**: `createPortal(dropdown, document.body)`
136136-- **Vue**: `<Teleport to="body">`
137137-- **Svelte**: Use a portal library or mount to `document.body`
138138-139139-Calculate position from the trigger's `getBoundingClientRect()`, then apply `position: fixed` with `top` and `left` values. Recalculate on scroll and resize.
140140-141141-### Fixed Positioning Fallback
142142-143143-For browsers without anchor positioning support, `position: fixed` with manual coordinates avoids overflow clipping:
144144-145145-```css
146146-.dropdown {
147147- position: fixed;
148148- /* top/left set via JS from trigger's getBoundingClientRect() */
149149-}
150150-```
151151-152152-Check viewport boundaries before rendering. If the dropdown would overflow the bottom edge, flip it above the trigger. If it would overflow the right edge, align it to the trigger's right side instead.
153153-154154-### Anti-Patterns
155155-156156-- **`position: absolute` inside `overflow: hidden`** - The dropdown will be clipped. Use `position: fixed` or the top layer instead.
157157-- **Arbitrary z-index values** like `z-index: 9999` - Use a semantic z-index scale: `dropdown (100) -> sticky (200) -> modal-backdrop (300) -> modal (400) -> toast (500) -> tooltip (600)`.
158158-- **Rendering dropdown markup inline** without an escape hatch from the parent's stacking context. Either use `popover` (top layer), a portal, or `position: fixed`.
159159-160160-## Destructive Actions: Undo > Confirm
161161-162162-**Undo is better than confirmation dialogs**—users click through confirmations mindlessly. Remove from UI immediately, show undo toast, actually delete after toast expires. Use confirmation only for truly irreversible actions (account deletion), high-cost actions, or batch operations.
163163-164164-## Keyboard Navigation Patterns
165165-166166-### Roving Tabindex
167167-168168-For component groups (tabs, menu items, radio groups), one item is tabbable; arrow keys move within:
169169-170170-```html
171171-<div role="tablist">
172172- <button role="tab" tabindex="0">Tab 1</button>
173173- <button role="tab" tabindex="-1">Tab 2</button>
174174- <button role="tab" tabindex="-1">Tab 3</button>
175175-</div>
176176-```
177177-178178-Arrow keys move `tabindex="0"` between items. Tab moves to the next component entirely.
179179-180180-### Skip Links
181181-182182-Provide skip links (`<a href="#main-content">Skip to main content</a>`) for keyboard users to jump past navigation. Hide off-screen, show on focus.
183183-184184-## Gesture Discoverability
185185-186186-Swipe-to-delete and similar gestures are invisible. Hint at their existence:
187187-188188-- **Partially reveal**: Show delete button peeking from edge
189189-- **Onboarding**: Coach marks on first use
190190-- **Alternative**: Always provide a visible fallback (menu with "Delete")
191191-192192-Don't rely on gestures as the only way to perform actions.
193193-194194----
195195-196196-**Avoid**: Removing focus indicators without alternatives. Using placeholder text as labels. Touch targets <44x44px. Generic error messages. Custom controls without ARIA/keyboard support.
···11-# Motion Design
22-33-## Duration: The 100/300/500 Rule
44-55-Timing matters more than easing. These durations feel right for most UI:
66-77-| Duration | Use Case | Examples |
88-| ------------- | ------------------- | ---------------------------------- |
99-| **100-150ms** | Instant feedback | Button press, toggle, color change |
1010-| **200-300ms** | State changes | Menu open, tooltip, hover states |
1111-| **300-500ms** | Layout changes | Accordion, modal, drawer |
1212-| **500-800ms** | Entrance animations | Page load, hero reveals |
1313-1414-**Exit animations are faster than entrances**—use ~75% of enter duration.
1515-1616-## Easing: Pick the Right Curve
1717-1818-**Don't use `ease`.** It's a compromise that's rarely optimal. Instead:
1919-2020-| Curve | Use For | CSS |
2121-| --------------- | ---------------------------- | -------------------------------- |
2222-| **ease-out** | Elements entering | `cubic-bezier(0.16, 1, 0.3, 1)` |
2323-| **ease-in** | Elements leaving | `cubic-bezier(0.7, 0, 0.84, 0)` |
2424-| **ease-in-out** | State toggles (there → back) | `cubic-bezier(0.65, 0, 0.35, 1)` |
2525-2626-**For micro-interactions, use exponential curves**—they feel natural because they mimic real physics (friction, deceleration):
2727-2828-```css
2929-/* Quart out - smooth, refined (recommended default) */
3030---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
3131-3232-/* Quint out - slightly more dramatic */
3333---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
3434-3535-/* Expo out - snappy, confident */
3636---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
3737-```
3838-3939-**Avoid bounce and elastic curves.** They were trendy in 2015 but now feel tacky and amateurish. Real objects don't bounce when they stop—they decelerate smoothly. Overshoot effects draw attention to the animation itself rather than the content.
4040-4141-## The Only Two Properties You Should Animate
4242-4343-**transform** and **opacity** only—everything else causes layout recalculation. For height animations (accordions), use `grid-template-rows: 0fr → 1fr` instead of animating `height` directly.
4444-4545-## Staggered Animations
4646-4747-Use CSS custom properties for cleaner stagger: `animation-delay: calc(var(--i, 0) * 50ms)` with `style="--i: 0"` on each item. **Cap total stagger time**—10 items at 50ms = 500ms total. For many items, reduce per-item delay or cap staggered count.
4848-4949-## Reduced Motion
5050-5151-This is not optional. Vestibular disorders affect ~35% of adults over 40.
5252-5353-```css
5454-/* Define animations normally */
5555-.card {
5656- animation: slide-up 500ms ease-out;
5757-}
5858-5959-/* Provide alternative for reduced motion */
6060-@media (prefers-reduced-motion: reduce) {
6161- .card {
6262- animation: fade-in 200ms ease-out; /* Crossfade instead of motion */
6363- }
6464-}
6565-6666-/* Or disable entirely */
6767-@media (prefers-reduced-motion: reduce) {
6868- *,
6969- *::before,
7070- *::after {
7171- animation-duration: 0.01ms !important;
7272- transition-duration: 0.01ms !important;
7373- }
7474-}
7575-```
7676-7777-**What to preserve**: Functional animations like progress bars, loading spinners (slowed down), and focus indicators should still work—just without spatial movement.
7878-7979-## Perceived Performance
8080-8181-**Nobody cares how fast your site is—just how fast it feels.** Perception can be as effective as actual performance.
8282-8383-**The 80ms threshold**: Our brains buffer sensory input for ~80ms to synchronize perception. Anything under 80ms feels instant and simultaneous. This is your target for micro-interactions.
8484-8585-**Active vs passive time**: Passive waiting (staring at a spinner) feels longer than active engagement. Strategies to shift the balance:
8686-8787-- **Preemptive start**: Begin transitions immediately while loading (iOS app zoom, skeleton UI). Users perceive work happening.
8888-- **Early completion**: Show content progressively—don't wait for everything. Video buffering, progressive images, streaming HTML.
8989-- **Optimistic UI**: Update the interface immediately, handle failures gracefully. Instagram likes work offline—the UI updates instantly, syncs later. Use for low-stakes actions; avoid for payments or destructive operations.
9090-9191-**Easing affects perceived duration**: Ease-in (accelerating toward completion) makes tasks feel shorter because the peak-end effect weights final moments heavily. Ease-out feels satisfying for entrances, but ease-in toward a task's end compresses perceived time.
9292-9393-**Caution**: Too-fast responses can decrease perceived value. Users may distrust instant results for complex operations (search, analysis). Sometimes a brief delay signals "real work" is happening.
9494-9595-## Performance
9696-9797-Don't use `will-change` preemptively—only when animation is imminent (`:hover`, `.animating`). For scroll-triggered animations, use Intersection Observer instead of scroll events; unobserve after animating once. Create motion tokens for consistency (durations, easings, common transitions).
9898-9999----
100100-101101-**Avoid**: Animating everything (animation fatigue is real). Using >500ms for UI feedback. Ignoring `prefers-reduced-motion`. Using animation to hide slow loading.
···11-# Responsive Design
22-33-## Mobile-First: Write It Right
44-55-Start with base styles for mobile, use `min-width` queries to layer complexity. Desktop-first (`max-width`) means mobile loads unnecessary styles first.
66-77-## Breakpoints: Content-Driven
88-99-Don't chase device sizes—let content tell you where to break. Start narrow, stretch until design breaks, add breakpoint there. Three breakpoints usually suffice (640, 768, 1024px). Use `clamp()` for fluid values without breakpoints.
1010-1111-## Detect Input Method, Not Just Screen Size
1212-1313-**Screen size doesn't tell you input method.** A laptop with touchscreen, a tablet with keyboard—use pointer and hover queries:
1414-1515-```css
1616-/* Fine pointer (mouse, trackpad) */
1717-@media (pointer: fine) {
1818- .button {
1919- padding: 8px 16px;
2020- }
2121-}
2222-2323-/* Coarse pointer (touch, stylus) */
2424-@media (pointer: coarse) {
2525- .button {
2626- padding: 12px 20px;
2727- } /* Larger touch target */
2828-}
2929-3030-/* Device supports hover */
3131-@media (hover: hover) {
3232- .card:hover {
3333- transform: translateY(-2px);
3434- }
3535-}
3636-3737-/* Device doesn't support hover (touch) */
3838-@media (hover: none) {
3939- .card {
4040- /* No hover state - use active instead */
4141- }
4242-}
4343-```
4444-4545-**Critical**: Don't rely on hover for functionality. Touch users can't hover.
4646-4747-## Safe Areas: Handle the Notch
4848-4949-Modern phones have notches, rounded corners, and home indicators. Use `env()`:
5050-5151-```css
5252-body {
5353- padding-top: env(safe-area-inset-top);
5454- padding-bottom: env(safe-area-inset-bottom);
5555- padding-left: env(safe-area-inset-left);
5656- padding-right: env(safe-area-inset-right);
5757-}
5858-5959-/* With fallback */
6060-.footer {
6161- padding-bottom: max(1rem, env(safe-area-inset-bottom));
6262-}
6363-```
6464-6565-**Enable viewport-fit** in your meta tag:
6666-6767-```html
6868-<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
6969-```
7070-7171-## Responsive Images: Get It Right
7272-7373-### srcset with Width Descriptors
7474-7575-```html
7676-<img
7777- src="hero-800.jpg"
7878- srcset="hero-400.jpg 400w, hero-800.jpg 800w, hero-1200.jpg 1200w"
7979- sizes="(max-width: 768px) 100vw, 50vw"
8080- alt="Hero image"
8181-/>
8282-```
8383-8484-**How it works**:
8585-8686-- `srcset` lists available images with their actual widths (`w` descriptors)
8787-- `sizes` tells the browser how wide the image will display
8888-- Browser picks the best file based on viewport width AND device pixel ratio
8989-9090-### Picture Element for Art Direction
9191-9292-When you need different crops/compositions (not just resolutions):
9393-9494-```html
9595-<picture>
9696- <source media="(min-width: 768px)" srcset="wide.jpg" />
9797- <source media="(max-width: 767px)" srcset="tall.jpg" />
9898- <img src="fallback.jpg" alt="..." />
9999-</picture>
100100-```
101101-102102-## Layout Adaptation Patterns
103103-104104-**Navigation**: Three stages—hamburger + drawer on mobile, horizontal compact on tablet, full with labels on desktop. **Tables**: Transform to cards on mobile using `display: block` and `data-label` attributes. **Progressive disclosure**: Use `<details>/<summary>` for content that can collapse on mobile.
105105-106106-## Testing: Don't Trust DevTools Alone
107107-108108-DevTools device emulation is useful for layout but misses:
109109-110110-- Actual touch interactions
111111-- Real CPU/memory constraints
112112-- Network latency patterns
113113-- Font rendering differences
114114-- Browser chrome/keyboard appearances
115115-116116-**Test on at least**: One real iPhone, one real Android, a tablet if relevant. Cheap Android phones reveal performance issues you'll never see on simulators.
117117-118118----
119119-120120-**Avoid**: Desktop-first design. Device detection instead of feature detection. Separate mobile/desktop codebases. Ignoring tablet and landscape. Assuming all mobile devices are powerful.
···11-# Spatial Design
22-33-## Spacing Systems
44-55-### Use 4pt Base, Not 8pt
66-77-8pt systems are too coarse—you'll frequently need 12px (between 8 and 16). Use 4pt for granularity: 4, 8, 12, 16, 24, 32, 48, 64, 96px.
88-99-### Name Tokens Semantically
1010-1111-Name by relationship (`--space-sm`, `--space-lg`), not value (`--spacing-8`). Use `gap` instead of margins for sibling spacing—it eliminates margin collapse and cleanup hacks.
1212-1313-## Grid Systems
1414-1515-### The Self-Adjusting Grid
1616-1717-Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. Columns are at least 280px, as many as fit per row, leftovers stretch. For complex layouts, use named grid areas (`grid-template-areas`) and redefine them at breakpoints.
1818-1919-## Visual Hierarchy
2020-2121-### The Squint Test
2222-2323-Blur your eyes (or screenshot and blur). Can you still identify:
2424-2525-- The most important element?
2626-- The second most important?
2727-- Clear groupings?
2828-2929-If everything looks the same weight blurred, you have a hierarchy problem.
3030-3131-### Hierarchy Through Multiple Dimensions
3232-3333-Don't rely on size alone. Combine:
3434-3535-| Tool | Strong Hierarchy | Weak Hierarchy |
3636-| ------------ | ------------------------- | ----------------- |
3737-| **Size** | 3:1 ratio or more | <2:1 ratio |
3838-| **Weight** | Bold vs Regular | Medium vs Regular |
3939-| **Color** | High contrast | Similar tones |
4040-| **Position** | Top/left (primary) | Bottom/right |
4141-| **Space** | Surrounded by white space | Crowded |
4242-4343-**The best hierarchy uses 2-3 dimensions at once**: A heading that's larger, bolder, AND has more space above it.
4444-4545-### Cards Are Not Required
4646-4747-Cards are overused. Spacing and alignment create visual grouping naturally. Use cards only when content is truly distinct and actionable, items need visual comparison in a grid, or content needs clear interaction boundaries. **Never nest cards inside cards**—use spacing, typography, and subtle dividers for hierarchy within a card.
4848-4949-## Container Queries
5050-5151-Viewport queries are for page layouts. **Container queries are for components**:
5252-5353-```css
5454-.card-container {
5555- container-type: inline-size;
5656-}
5757-5858-.card {
5959- display: grid;
6060- gap: var(--space-md);
6161-}
6262-6363-/* Card layout changes based on its container, not viewport */
6464-@container (min-width: 400px) {
6565- .card {
6666- grid-template-columns: 120px 1fr;
6767- }
6868-}
6969-```
7070-7171-**Why this matters**: A card in a narrow sidebar stays compact, while the same card in a main content area expands—automatically, without viewport hacks.
7272-7373-## Optical Adjustments
7474-7575-Text at `margin-left: 0` looks indented due to letterform whitespace—use negative margin (`-0.05em`) to optically align. Geometrically centered icons often look off-center; play icons need to shift right, arrows shift toward their direction.
7676-7777-### Touch Targets vs Visual Size
7878-7979-Buttons can look small but need large touch targets (44px minimum). Use padding or pseudo-elements:
8080-8181-```css
8282-.icon-button {
8383- width: 24px; /* Visual size */
8484- height: 24px;
8585- position: relative;
8686-}
8787-8888-.icon-button::before {
8989- content: "";
9090- position: absolute;
9191- inset: -10px; /* Expand tap target to 44px */
9292-}
9393-```
9494-9595-## Depth & Elevation
9696-9797-Create semantic z-index scales (dropdown → sticky → modal-backdrop → modal → toast → tooltip) instead of arbitrary numbers. For shadows, create a consistent elevation scale (sm → md → lg → xl). **Key insight**: Shadows should be subtle—if you can clearly see it, it's probably too strong.
9898-9999----
100100-101101-**Avoid**: Arbitrary spacing values outside your scale. Making all spacing equal (variety creates hierarchy). Creating hierarchy through size alone - combine size, weight, color, and space.
-154
.agents/skills/impeccable/reference/typography.md
···11-# Typography
22-33-## Classic Typography Principles
44-55-### Vertical Rhythm
66-77-Your line-height should be the base unit for ALL vertical spacing. If body text has `line-height: 1.5` on `16px` type (= 24px), spacing values should be multiples of 24px. This creates subconscious harmony—text and space share a mathematical foundation.
88-99-### Modular Scale & Hierarchy
1010-1111-The common mistake: too many font sizes that are too close together (14px, 15px, 16px, 18px...). This creates muddy hierarchy.
1212-1313-**Use fewer sizes with more contrast.** A 5-size system covers most needs:
1414-1515-| Role | Typical Ratio | Use Case |
1616-| ---- | ------------- | ---------------------- |
1717-| xs | 0.75rem | Captions, legal |
1818-| sm | 0.875rem | Secondary UI, metadata |
1919-| base | 1rem | Body text |
2020-| lg | 1.25-1.5rem | Subheadings, lead text |
2121-| xl+ | 2-4rem | Headlines, hero text |
2222-2323-Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Pick one and commit.
2424-2525-### Readability & Measure
2626-2727-Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more.
2828-2929-**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height.
3030-3131-## Font Selection & Pairing
3232-3333-### Choosing Distinctive Fonts
3434-3535-**Avoid the invisible defaults**: Inter, Roboto, Open Sans, Lato, Montserrat. These are everywhere, making your design feel generic. They're fine for documentation or tools where personality isn't the goal—but if you want distinctive design, look elsewhere.
3636-3737-**Pick the font from the brief, not from a category preset.** The most common AI typography failure is reaching for the same "tasteful" font for every editorial brief, the same "modern" font for every tech brief, the same "elegant serif" for every premium brief. Those reflexes produce monoculture across projects. The right font is one whose physical character matches _this specific_ brand, audience, and moment.
3838-3939-A working selection process:
4040-4141-1. Read the brief once. Write down three concrete words for the brand voice. Not "modern" or "elegant" — those are dead categories. Try "warm and mechanical and opinionated" or "calm and clinical and careful" or "fast and dense and unimpressed" or "handmade and a little weird."
4242-2. Now imagine the font as a physical object the brand could ship: a typewriter ribbon, a hand-lettered shop sign, a 1970s mainframe terminal manual, a fabric label on the inside of a coat, a museum exhibit caption, a tax form, a children's book printed on cheap newsprint. Whichever physical object fits the three words is pointing at the right _kind_ of typeface.
4343-3. Browse a font catalog (Google Fonts, Pangram Pangram, Adobe Fonts, Future Fonts, ABC Dinamo) with that physical object in mind. **Reject the first thing that "looks designy."** That's your trained-everywhere reflex. Keep looking.
4444-4. Avoid your defaults from previous projects. If you find yourself reaching for the same display font you used last time, make yourself pick something else.
4545-4646-**Anti-reflexes worth defending against**:
4747-4848-- A technical/utilitarian brief does NOT need a serif "for warmth." Most tech tools should look like tech tools.
4949-- An editorial/premium brief does NOT need the same expressive serif everyone is using right now. Premium can be Swiss-modern, can be neo-grotesque, can be a literal monospace, can be a quiet humanist sans.
5050-- A children's product does NOT need a rounded display font. Kids' books use real type.
5151-- A "modern" brief does NOT need a geometric sans. The most modern thing you can do in 2026 is not use the font everyone else is using.
5252-5353-**System fonts are underrated**: `-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui` looks native, loads instantly, and is highly readable. Consider this for apps where performance > personality.
5454-5555-### Pairing Principles
5656-5757-**The non-obvious truth**: You often don't need a second font. One well-chosen font family in multiple weights creates cleaner hierarchy than two competing typefaces. Only add a second font when you need genuine contrast (e.g., display headlines + body serif).
5858-5959-When pairing, contrast on multiple axes:
6060-6161-- Serif + Sans (structure contrast)
6262-- Geometric + Humanist (personality contrast)
6363-- Condensed display + Wide body (proportion contrast)
6464-6565-**Never pair fonts that are similar but not identical** (e.g., two geometric sans-serifs). They create visual tension without clear hierarchy.
6666-6767-### Web Font Loading
6868-6969-The layout shift problem: fonts load late, text reflows, and users see content jump. Here's the fix:
7070-7171-```css
7272-/* 1. Use font-display: swap for visibility */
7373-@font-face {
7474- font-family: "CustomFont";
7575- src: url("font.woff2") format("woff2");
7676- font-display: swap;
7777-}
7878-7979-/* 2. Match fallback metrics to minimize shift */
8080-@font-face {
8181- font-family: "CustomFont-Fallback";
8282- src: local("Arial");
8383- size-adjust: 105%; /* Scale to match x-height */
8484- ascent-override: 90%; /* Match ascender height */
8585- descent-override: 20%; /* Match descender depth */
8686- line-gap-override: 10%; /* Match line spacing */
8787-}
8888-8989-body {
9090- font-family: "CustomFont", "CustomFont-Fallback", sans-serif;
9191-}
9292-```
9393-9494-Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically.
9595-9696-## Modern Web Typography
9797-9898-### Fluid Type
9999-100100-Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the viewport. The middle value (e.g., `5vw + 1rem`) controls scaling rate—higher vw = faster scaling. Add a rem offset so it doesn't collapse to 0 on small screens.
101101-102102-**Use fluid type for**: Headings and display text on marketing/content pages where text dominates the layout and needs to breathe across viewport sizes.
103103-104104-**Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it.
105105-106106-### OpenType Features
107107-108108-Most developers don't know these exist. Use them for polish:
109109-110110-```css
111111-/* Tabular numbers for data alignment */
112112-.data-table {
113113- font-variant-numeric: tabular-nums;
114114-}
115115-116116-/* Proper fractions */
117117-.recipe-amount {
118118- font-variant-numeric: diagonal-fractions;
119119-}
120120-121121-/* Small caps for abbreviations */
122122-abbr {
123123- font-variant-caps: all-small-caps;
124124-}
125125-126126-/* Disable ligatures in code */
127127-code {
128128- font-variant-ligatures: none;
129129-}
130130-131131-/* Enable kerning (usually on by default, but be explicit) */
132132-body {
133133- font-kerning: normal;
134134-}
135135-```
136136-137137-Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/).
138138-139139-## Typography System Architecture
140140-141141-Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system.
142142-143143-## Accessibility Considerations
144144-145145-Beyond contrast ratios (which are well-documented), consider:
146146-147147-- **Never disable zoom**: `user-scalable=no` breaks accessibility. If your layout breaks at 200% zoom, fix the layout.
148148-- **Use rem/em for font sizes**: This respects user browser settings. Never `px` for body text.
149149-- **Minimum 16px body text**: Smaller than this strains eyes and fails WCAG on mobile.
150150-- **Adequate touch targets**: Text links need padding or line-height that creates 44px+ tap targets.
151151-152152----
153153-154154-**Avoid**: More than 2-3 font families per project. Skipping fallback font definitions. Ignoring font loading performance (FOUT/FOIT). Using decorative fonts for body text.
-108
.agents/skills/impeccable/reference/ux-writing.md
···11-# UX Writing
22-33-## The Button Label Problem
44-55-**Never use "OK", "Submit", or "Yes/No".** These are lazy and ambiguous. Use specific verb + object patterns:
66-77-| Bad | Good | Why |
88-| ---------- | -------------- | ----------------------------- |
99-| OK | Save changes | Says what will happen |
1010-| Submit | Create account | Outcome-focused |
1111-| Yes | Delete message | Confirms the action |
1212-| Cancel | Keep editing | Clarifies what "cancel" means |
1313-| Click here | Download PDF | Describes the destination |
1414-1515-**For destructive actions**, name the destruction:
1616-1717-- "Delete" not "Remove" (delete is permanent, remove implies recoverable)
1818-- "Delete 5 items" not "Delete selected" (show the count)
1919-2020-## Error Messages: The Formula
2121-2222-Every error message should answer: (1) What happened? (2) Why? (3) How to fix it? Example: "Email address isn't valid. Please include an @ symbol." not "Invalid input".
2323-2424-### Error Message Templates
2525-2626-| Situation | Template |
2727-| --------------------- | ------------------------------------------------------------------------------ |
2828-| **Format error** | "[Field] needs to be [format]. Example: [example]" |
2929-| **Missing required** | "Please enter [what's missing]" |
3030-| **Permission denied** | "You don't have access to [thing]. [What to do instead]" |
3131-| **Network error** | "We couldn't reach [thing]. Check your connection and [action]." |
3232-| **Server error** | "Something went wrong on our end. We're looking into it. [Alternative action]" |
3333-3434-### Don't Blame the User
3535-3636-Reframe errors: "Please enter a date in MM/DD/YYYY format" not "You entered an invalid date".
3737-3838-## Empty States Are Opportunities
3939-4040-Empty states are onboarding moments: (1) Acknowledge briefly, (2) Explain the value of filling it, (3) Provide a clear action. "No projects yet. Create your first one to get started." not just "No items".
4141-4242-## Voice vs Tone
4343-4444-**Voice** is your brand's personality—consistent everywhere.
4545-**Tone** adapts to the moment.
4646-4747-| Moment | Tone Shift |
4848-| ------------------- | -------------------------------------------------------------- |
4949-| Success | Celebratory, brief: "Done! Your changes are live." |
5050-| Error | Empathetic, helpful: "That didn't work. Here's what to try..." |
5151-| Loading | Reassuring: "Saving your work..." |
5252-| Destructive confirm | Serious, clear: "Delete this project? This can't be undone." |
5353-5454-**Never use humor for errors.** Users are already frustrated. Be helpful, not cute.
5555-5656-## Writing for Accessibility
5757-5858-**Link text** must have standalone meaning—"View pricing plans" not "Click here". **Alt text** describes information, not the image—"Revenue increased 40% in Q4" not "Chart". Use `alt=""` for decorative images. **Icon buttons** need `aria-label` for screen reader context.
5959-6060-## Writing for Translation
6161-6262-### Plan for Expansion
6363-6464-German text is ~30% longer than English. Allocate space:
6565-6666-| Language | Expansion |
6767-| -------- | ---------------------------------- |
6868-| German | +30% |
6969-| French | +20% |
7070-| Finnish | +30-40% |
7171-| Chinese | -30% (fewer chars, but same width) |
7272-7373-### Translation-Friendly Patterns
7474-7575-Keep numbers separate ("New messages: 3" not "You have 3 new messages"). Use full sentences as single strings (word order varies by language). Avoid abbreviations ("5 minutes ago" not "5 mins ago"). Give translators context about where strings appear.
7676-7777-## Consistency: The Terminology Problem
7878-7979-Pick one term and stick with it:
8080-8181-| Inconsistent | Consistent |
8282-| -------------------------------- | ---------- |
8383-| Delete / Remove / Trash | Delete |
8484-| Settings / Preferences / Options | Settings |
8585-| Sign in / Log in / Enter | Sign in |
8686-| Create / Add / New | Create |
8787-8888-Build a terminology glossary and enforce it. Variety creates confusion.
8989-9090-## Avoid Redundant Copy
9191-9292-If the heading explains it, the intro is redundant. If the button is clear, don't explain it again. Say it once, say it well.
9393-9494-## Loading States
9595-9696-Be specific: "Saving your draft..." not "Loading...". For long waits, set expectations ("This usually takes 30 seconds") or show progress.
9797-9898-## Confirmation Dialogs: Use Sparingly
9999-100100-Most confirmation dialogs are design failures—consider undo instead. When you must confirm: name the action, explain consequences, use specific button labels ("Delete project" / "Keep project", not "Yes" / "No").
101101-102102-## Form Instructions
103103-104104-Show format with placeholders, not instructions. For non-obvious fields, explain why you're asking.
105105-106106----
107107-108108-**Avoid**: Jargon without explanation. Blaming users ("You made an error" → "This field is required"). Vague errors ("Something went wrong"). Varying terminology for variety. Humor for errors.
···11-#!/usr/bin/env node
22-/**
33- * Cleans up deprecated Impeccable skill files, symlinks, and
44- * skills-lock.json entries left over from previous versions.
55- *
66- * Safe to run repeatedly -- it is a no-op when nothing needs cleaning.
77- *
88- * Usage (from the project root):
99- * node {{scripts_path}}/cleanup-deprecated.mjs
1010- *
1111- * What it does:
1212- * 1. Finds every harness-specific skills directory (.claude/skills,
1313- * .cursor/skills, .agents/skills, etc.).
1414- * 2. For each deprecated skill name (with and without i- prefix),
1515- * checks if the directory exists and its SKILL.md mentions
1616- * "impeccable" (to avoid deleting unrelated user skills).
1717- * 3. Deletes confirmed matches (files, directories, or symlinks).
1818- * 4. Removes the corresponding entries from skills-lock.json.
1919- */
2020-2121-import { existsSync, readFileSync, writeFileSync, rmSync, lstatSync, unlinkSync } from "node:fs";
2222-import { join, resolve } from "node:path";
2323-2424-// Skills that were renamed, merged, or folded in v2.0 and v2.1.
2525-const DEPRECATED_NAMES = [
2626- "frontend-design", // renamed to impeccable (v2.0)
2727- "teach-impeccable", // folded into /impeccable teach (v2.0)
2828- "arrange", // renamed to layout (v2.1)
2929- "normalize", // merged into polish (v2.1)
3030- "onboard", // merged into harden (v2.1)
3131- "extract", // merged into /impeccable extract (v2.1)
3232-];
3333-3434-// All known harness directories that may contain a skills/ subfolder.
3535-const HARNESS_DIRS = [
3636- ".claude",
3737- ".cursor",
3838- ".gemini",
3939- ".codex",
4040- ".agents",
4141- ".trae",
4242- ".trae-cn",
4343- ".pi",
4444- ".opencode",
4545- ".kiro",
4646- ".rovodev",
4747-];
4848-4949-/**
5050- * Walk up from startDir until we find a directory that looks like a
5151- * project root (has package.json, .git, or skills-lock.json).
5252- */
5353-export function findProjectRoot(startDir = process.cwd()) {
5454- let dir = resolve(startDir);
5555- const { root } = { root: "/" };
5656- while (dir !== root) {
5757- if (
5858- existsSync(join(dir, "package.json")) ||
5959- existsSync(join(dir, ".git")) ||
6060- existsSync(join(dir, "skills-lock.json"))
6161- ) {
6262- return dir;
6363- }
6464- const parent = resolve(dir, "..");
6565- if (parent === dir) break;
6666- dir = parent;
6767- }
6868- return resolve(startDir);
6969-}
7070-7171-/**
7272- * Check whether a skill directory belongs to Impeccable by reading its
7373- * SKILL.md and looking for the word "impeccable" (case-insensitive).
7474- * Returns false for non-existent paths or skills that don't match.
7575- */
7676-export function isImpeccableSkill(skillDir) {
7777- const skillMd = join(skillDir, "SKILL.md");
7878- if (!existsSync(skillMd)) return false;
7979- try {
8080- const content = readFileSync(skillMd, "utf-8");
8181- return /impeccable/i.test(content);
8282- } catch {
8383- return false;
8484- }
8585-}
8686-8787-/**
8888- * Build the full list of names to check: each deprecated name, plus
8989- * its i-prefixed variant.
9090- */
9191-export function buildTargetNames() {
9292- const names = [];
9393- for (const name of DEPRECATED_NAMES) {
9494- names.push(name);
9595- names.push(`i-${name}`);
9696- }
9797- return names;
9898-}
9999-100100-/**
101101- * Find every skills directory across all harness dirs in the project.
102102- * Returns absolute paths that exist on disk.
103103- */
104104-export function findSkillsDirs(projectRoot) {
105105- const dirs = [];
106106- for (const harness of HARNESS_DIRS) {
107107- const candidate = join(projectRoot, harness, "skills");
108108- if (existsSync(candidate)) {
109109- dirs.push(candidate);
110110- }
111111- }
112112- return dirs;
113113-}
114114-115115-/**
116116- * Remove deprecated skill directories/symlinks from all harness dirs.
117117- * Returns an array of paths that were deleted.
118118- */
119119-export function removeDeprecatedSkills(projectRoot) {
120120- const targets = buildTargetNames();
121121- const skillsDirs = findSkillsDirs(projectRoot);
122122- const deleted = [];
123123-124124- for (const skillsDir of skillsDirs) {
125125- for (const name of targets) {
126126- const skillPath = join(skillsDir, name);
127127-128128- // Use lstat to detect symlinks (existsSync follows symlinks and
129129- // returns false for dangling ones).
130130- let stat;
131131- try {
132132- stat = lstatSync(skillPath);
133133- } catch {
134134- continue; // does not exist at all
135135- }
136136-137137- if (stat.isSymbolicLink()) {
138138- // Symlink: check the target if it's alive, otherwise treat
139139- // dangling symlinks to deprecated names as safe to remove.
140140- const targetAlive = existsSync(skillPath);
141141- const isMatch = targetAlive ? isImpeccableSkill(skillPath) : true;
142142- if (isMatch) {
143143- unlinkSync(skillPath);
144144- deleted.push(skillPath);
145145- }
146146- continue;
147147- }
148148-149149- // Regular directory -- verify it belongs to impeccable
150150- if (isImpeccableSkill(skillPath)) {
151151- rmSync(skillPath, { recursive: true, force: true });
152152- deleted.push(skillPath);
153153- }
154154- }
155155- }
156156-157157- return deleted;
158158-}
159159-160160-/**
161161- * Remove deprecated entries from skills-lock.json.
162162- * Only removes entries whose source is "pbakaus/impeccable".
163163- * Returns the list of removed skill names.
164164- */
165165-export function cleanSkillsLock(projectRoot) {
166166- const lockPath = join(projectRoot, "skills-lock.json");
167167- if (!existsSync(lockPath)) return [];
168168-169169- let lock;
170170- try {
171171- lock = JSON.parse(readFileSync(lockPath, "utf-8"));
172172- } catch {
173173- return [];
174174- }
175175-176176- if (!lock.skills || typeof lock.skills !== "object") return [];
177177-178178- const targets = buildTargetNames();
179179- const removed = [];
180180-181181- for (const name of targets) {
182182- const entry = lock.skills[name];
183183- if (!entry) continue;
184184- // Only remove if it belongs to impeccable
185185- if (entry.source === "pbakaus/impeccable") {
186186- delete lock.skills[name];
187187- removed.push(name);
188188- }
189189- }
190190-191191- if (removed.length > 0) {
192192- writeFileSync(lockPath, JSON.stringify(lock, null, 2) + "\n", "utf-8");
193193- }
194194-195195- return removed;
196196-}
197197-198198-/**
199199- * Run the full cleanup. Returns a summary object.
200200- */
201201-export function cleanup(projectRoot) {
202202- const root = projectRoot || findProjectRoot();
203203- const deletedPaths = removeDeprecatedSkills(root);
204204- const removedLockEntries = cleanSkillsLock(root);
205205- return { deletedPaths, removedLockEntries, projectRoot: root };
206206-}
207207-208208-// CLI entry point
209209-if (process.argv[1] && resolve(process.argv[1]) === resolve(new URL(import.meta.url).pathname)) {
210210- const result = cleanup();
211211- if (result.deletedPaths.length === 0 && result.removedLockEntries.length === 0) {
212212- console.log("No deprecated Impeccable skills found. Nothing to clean up.");
213213- } else {
214214- if (result.deletedPaths.length > 0) {
215215- console.log(`Removed ${result.deletedPaths.length} deprecated skill(s):`);
216216- for (const p of result.deletedPaths) console.log(` - ${p}`);
217217- }
218218- if (result.removedLockEntries.length > 0) {
219219- console.log(
220220- `Cleaned ${result.removedLockEntries.length} entry/entries from skills-lock.json:`,
221221- );
222222- for (const name of result.removedLockEntries) console.log(` - ${name}`);
223223- }
224224- }
225225-}
-126
.agents/skills/layout/SKILL.md
···11----
22-name: layout
33-description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1414-1515----
1616-1717-## Assess Current Layout
1818-1919-Analyze what's weak about the current spatial design:
2020-2121-1. **Spacing**:
2222- - Is spacing consistent or arbitrary? (Random padding/margin values)
2323- - Is all spacing the same? (Equal padding everywhere = no rhythm)
2424- - Are related elements grouped tightly, with generous space between groups?
2525-2626-2. **Visual hierarchy**:
2727- - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings?
2828- - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?)
2929- - Does whitespace guide the eye to what matters?
3030-3131-3. **Grid & structure**:
3232- - Is there a clear underlying structure, or does the layout feel random?
3333- - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
3434- - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
3535-3636-4. **Rhythm & variety**:
3737- - Does the layout have visual rhythm? (Alternating tight/generous spacing)
3838- - Is every section structured the same way? (Monotonous repetition)
3939- - Are there intentional moments of surprise or emphasis?
4040-4141-5. **Density**:
4242- - Is the layout too cramped? (Not enough breathing room)
4343- - Is the layout too sparse? (Excessive whitespace without purpose)
4444- - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
4545-4646-**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention.
4747-4848-## Plan Layout Improvements
4949-5050-Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries.
5151-5252-Create a systematic plan:
5353-5454-- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency.
5555-- **Hierarchy strategy**: How will space communicate importance?
5656-- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
5757-- **Rhythm**: Where should spacing be tight vs generous?
5858-5959-## Improve Layout Systematically
6060-6161-### Establish a Spacing System
6262-6363-- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers.
6464-- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
6565-- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks
6666-- Apply `clamp()` for fluid spacing that breathes on larger screens
6767-6868-### Create Visual Rhythm
6969-7070-- **Tight grouping** for related elements (8-12px between siblings)
7171-- **Generous separation** between distinct sections (48-96px)
7272-- **Varied spacing** within sections — not every row needs the same gap
7373-- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense
7474-7575-### Choose the Right Layout Tool
7676-7777-- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks.
7878-- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
7979-- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible.
8080-- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints.
8181-- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints.
8282-8383-### Break Card Grid Monotony
8484-8585-- Don't default to card grids for everything — spacing and alignment create visual grouping naturally
8686-- Use cards only when content is truly distinct and actionable — never nest cards inside cards
8787-- Vary card sizes, span columns, or mix cards with non-card content to break repetition
8888-8989-### Strengthen Visual Hierarchy
9090-9191-- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient.
9292-- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
9393-- Create clear content groupings through proximity and separation.
9494-9595-### Manage Depth & Elevation
9696-9797-- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip)
9898-- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle
9999-- Use elevation to reinforce hierarchy, not as decoration
100100-101101-### Optical Adjustments
102102-103103-- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively.
104104-105105-**NEVER**:
106106-107107-- Use arbitrary spacing values outside your scale
108108-- Make all spacing equal — variety creates hierarchy
109109-- Wrap everything in cards — not everything needs a container
110110-- Nest cards inside cards — use spacing and dividers for hierarchy within
111111-- Use identical card grids everywhere (icon + heading + text, repeated)
112112-- Center everything — left-aligned with asymmetry feels more designed
113113-- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers.
114114-- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job
115115-- Use arbitrary z-index values (999, 9999) — build a semantic scale
116116-117117-## Verify Layout Improvements
118118-119119-- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
120120-- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
121121-- **Hierarchy**: Is the most important content obvious within 2 seconds?
122122-- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
123123-- **Consistency**: Is the spacing system applied uniformly?
124124-- **Responsiveness**: Does the layout adapt gracefully across screen sizes?
125125-126126-Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional.
-288
.agents/skills/optimize/SKILL.md
···11----
22-name: optimize
33-description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Identify and fix performance issues to create faster, smoother user experiences.
1010-1111-## Assess Performance Issues
1212-1313-Understand current performance and identify problems:
1414-1515-1. **Measure current state**:
1616- - **Core Web Vitals**: LCP, FID/INP, CLS scores
1717- - **Load time**: Time to interactive, first contentful paint
1818- - **Bundle size**: JavaScript, CSS, image sizes
1919- - **Runtime performance**: Frame rate, memory usage, CPU usage
2020- - **Network**: Request count, payload sizes, waterfall
2121-2222-2. **Identify bottlenecks**:
2323- - What's slow? (Initial load? Interactions? Animations?)
2424- - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?)
2525- - How bad is it? (Perceivable? Annoying? Blocking?)
2626- - Who's affected? (All users? Mobile only? Slow connections?)
2727-2828-**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters.
2929-3030-## Optimization Strategy
3131-3232-Create systematic improvement plan:
3333-3434-### Loading Performance
3535-3636-**Optimize Images**:
3737-3838-- Use modern formats (WebP, AVIF)
3939-- Proper sizing (don't load 3000px image for 300px display)
4040-- Lazy loading for below-fold images
4141-- Responsive images (`srcset`, `picture` element)
4242-- Compress images (80-85% quality is usually imperceptible)
4343-- Use CDN for faster delivery
4444-4545-```html
4646-<img
4747- src="hero.webp"
4848- srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
4949- sizes="(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"
5050- loading="lazy"
5151- alt="Hero image"
5252-/>
5353-```
5454-5555-**Reduce JavaScript Bundle**:
5656-5757-- Code splitting (route-based, component-based)
5858-- Tree shaking (remove unused code)
5959-- Remove unused dependencies
6060-- Lazy load non-critical code
6161-- Use dynamic imports for large components
6262-6363-```javascript
6464-// Lazy load heavy component
6565-const HeavyChart = lazy(() => import("./HeavyChart"));
6666-```
6767-6868-**Optimize CSS**:
6969-7070-- Remove unused CSS
7171-- Critical CSS inline, rest async
7272-- Minimize CSS files
7373-- Use CSS containment for independent regions
7474-7575-**Optimize Fonts**:
7676-7777-- Use `font-display: swap` or `optional`
7878-- Subset fonts (only characters you need)
7979-- Preload critical fonts
8080-- Use system fonts when appropriate
8181-- Limit font weights loaded
8282-8383-```css
8484-@font-face {
8585- font-family: "CustomFont";
8686- src: url("/fonts/custom.woff2") format("woff2");
8787- font-display: swap; /* Show fallback immediately */
8888- unicode-range: U+0020-007F; /* Basic Latin only */
8989-}
9090-```
9191-9292-**Optimize Loading Strategy**:
9393-9494-- Critical resources first (async/defer non-critical)
9595-- Preload critical assets
9696-- Prefetch likely next pages
9797-- Service worker for offline/caching
9898-- HTTP/2 or HTTP/3 for multiplexing
9999-100100-### Rendering Performance
101101-102102-**Avoid Layout Thrashing**:
103103-104104-```javascript
105105-// ❌ Bad: Alternating reads and writes (causes reflows)
106106-elements.forEach((el) => {
107107- const height = el.offsetHeight; // Read (forces layout)
108108- el.style.height = height * 2; // Write
109109-});
110110-111111-// ✅ Good: Batch reads, then batch writes
112112-const heights = elements.map((el) => el.offsetHeight); // All reads
113113-elements.forEach((el, i) => {
114114- el.style.height = heights[i] * 2; // All writes
115115-});
116116-```
117117-118118-**Optimize Rendering**:
119119-120120-- Use CSS `contain` property for independent regions
121121-- Minimize DOM depth (flatter is faster)
122122-- Reduce DOM size (fewer elements)
123123-- Use `content-visibility: auto` for long lists
124124-- Virtual scrolling for very long lists (react-window, react-virtualized)
125125-126126-**Reduce Paint & Composite**:
127127-128128-- Use `transform` and `opacity` for animations (GPU-accelerated)
129129-- Avoid animating layout properties (width, height, top, left)
130130-- Use `will-change` sparingly for known expensive operations
131131-- Minimize paint areas (smaller is faster)
132132-133133-### Animation Performance
134134-135135-**GPU Acceleration**:
136136-137137-```css
138138-/* ✅ GPU-accelerated (fast) */
139139-.animated {
140140- transform: translateX(100px);
141141- opacity: 0.5;
142142-}
143143-144144-/* ❌ CPU-bound (slow) */
145145-.animated {
146146- left: 100px;
147147- width: 300px;
148148-}
149149-```
150150-151151-**Smooth 60fps**:
152152-153153-- Target 16ms per frame (60fps)
154154-- Use `requestAnimationFrame` for JS animations
155155-- Debounce/throttle scroll handlers
156156-- Use CSS animations when possible
157157-- Avoid long-running JavaScript during animations
158158-159159-**Intersection Observer**:
160160-161161-```javascript
162162-// Efficiently detect when elements enter viewport
163163-const observer = new IntersectionObserver((entries) => {
164164- entries.forEach((entry) => {
165165- if (entry.isIntersecting) {
166166- // Element is visible, lazy load or animate
167167- }
168168- });
169169-});
170170-```
171171-172172-### React/Framework Optimization
173173-174174-**React-specific**:
175175-176176-- Use `memo()` for expensive components
177177-- `useMemo()` and `useCallback()` for expensive computations
178178-- Virtualize long lists
179179-- Code split routes
180180-- Avoid inline function creation in render
181181-- Use React DevTools Profiler
182182-183183-**Framework-agnostic**:
184184-185185-- Minimize re-renders
186186-- Debounce expensive operations
187187-- Memoize computed values
188188-- Lazy load routes and components
189189-190190-### Network Optimization
191191-192192-**Reduce Requests**:
193193-194194-- Combine small files
195195-- Use SVG sprites for icons
196196-- Inline small critical assets
197197-- Remove unused third-party scripts
198198-199199-**Optimize APIs**:
200200-201201-- Use pagination (don't load everything)
202202-- GraphQL to request only needed fields
203203-- Response compression (gzip, brotli)
204204-- HTTP caching headers
205205-- CDN for static assets
206206-207207-**Optimize for Slow Connections**:
208208-209209-- Adaptive loading based on connection (navigator.connection)
210210-- Optimistic UI updates
211211-- Request prioritization
212212-- Progressive enhancement
213213-214214-## Core Web Vitals Optimization
215215-216216-### Largest Contentful Paint (LCP < 2.5s)
217217-218218-- Optimize hero images
219219-- Inline critical CSS
220220-- Preload key resources
221221-- Use CDN
222222-- Server-side rendering
223223-224224-### First Input Delay (FID < 100ms) / INP (< 200ms)
225225-226226-- Break up long tasks
227227-- Defer non-critical JavaScript
228228-- Use web workers for heavy computation
229229-- Reduce JavaScript execution time
230230-231231-### Cumulative Layout Shift (CLS < 0.1)
232232-233233-- Set dimensions on images and videos
234234-- Don't inject content above existing content
235235-- Use `aspect-ratio` CSS property
236236-- Reserve space for ads/embeds
237237-- Avoid animations that cause layout shifts
238238-239239-```css
240240-/* Reserve space for image */
241241-.image-container {
242242- aspect-ratio: 16 / 9;
243243-}
244244-```
245245-246246-## Performance Monitoring
247247-248248-**Tools to use**:
249249-250250-- Chrome DevTools (Lighthouse, Performance panel)
251251-- WebPageTest
252252-- Core Web Vitals (Chrome UX Report)
253253-- Bundle analyzers (webpack-bundle-analyzer)
254254-- Performance monitoring (Sentry, DataDog, New Relic)
255255-256256-**Key metrics**:
257257-258258-- LCP, FID/INP, CLS (Core Web Vitals)
259259-- Time to Interactive (TTI)
260260-- First Contentful Paint (FCP)
261261-- Total Blocking Time (TBT)
262262-- Bundle size
263263-- Request count
264264-265265-**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative.
266266-267267-**NEVER**:
268268-269269-- Optimize without measuring (premature optimization)
270270-- Sacrifice accessibility for performance
271271-- Break functionality while optimizing
272272-- Use `will-change` everywhere (creates new layers, uses memory)
273273-- Lazy load above-fold content
274274-- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first)
275275-- Forget about mobile performance (often slower devices, slower connections)
276276-277277-## Verify Improvements
278278-279279-Test that optimizations worked:
280280-281281-- **Before/after metrics**: Compare Lighthouse scores
282282-- **Real user monitoring**: Track improvements for real users
283283-- **Different devices**: Test on low-end Android, not just flagship iPhone
284284-- **Slow connections**: Throttle to 3G, test experience
285285-- **No regressions**: Ensure functionality still works
286286-- **User perception**: Does it _feel_ faster?
287287-288288-Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance.
-159
.agents/skills/overdrive/SKILL.md
···11----
22-name: overdrive
33-description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Start your response with:
1010-1111-```
1212-──────────── ⚡ OVERDRIVE ─────────────
1313-》》》 Entering overdrive mode...
1414-```
1515-1616-Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic.
1717-1818-## MANDATORY PREPARATION
1919-2020-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
2121-2222-**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate.
2323-2424-### Propose Before Building
2525-2626-This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
2727-2828-1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like.
2929-2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
3030-3. Only proceed with the direction the user confirms.
3131-3232-Skipping this step risks building something embarrassing that needs to be thrown away.
3333-3434-### Iterate with Browser Automation
3535-3636-Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone.
3737-3838----
3939-4040-## Assess What "Extraordinary" Means Here
4141-4242-The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?**
4343-4444-### For visual/marketing surfaces
4545-4646-Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor.
4747-4848-### For functional UI
4949-5050-Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics.
5151-5252-### For performance-critical UI
5353-5454-The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates.
5555-5656-### For data-heavy interfaces
5757-5858-Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally.
5959-6060-**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around.
6161-6262-## The Toolkit
6363-6464-Organized by what you're trying to achieve, not by technology name.
6565-6666-### Make transitions feel cinematic
6767-6868-- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations.
6969-- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes
7070-- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver.
7171-7272-### Tie animation to scroll position
7373-7474-- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback)
7575-7676-### Render beyond CSS
7777-7878-- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express.
7979-- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2.
8080-- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas.
8181-- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable.
8282-8383-### Make data feel alive
8484-8585-- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones.
8686-- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers.
8787-- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts.
8888-8989-### Animate complex properties
9090-9191-- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate.
9292-- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography.
9393-9494-### Push performance boundaries
9595-9696-- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank.
9797-- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background.
9898-- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs.
9999-100100-### Interact with the device
101101-102102-- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start.
103103-- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission.
104104-105105-**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary.
106106-107107-## Implement with Discipline
108108-109109-### Progressive enhancement is non-negotiable
110110-111111-Every technique must degrade gracefully. The experience without the enhancement must still be good.
112112-113113-```css
114114-@supports (animation-timeline: scroll()) {
115115- .hero {
116116- animation-timeline: scroll();
117117- }
118118-}
119119-```
120120-121121-```javascript
122122-if ("gpu" in navigator) {
123123- /* WebGPU */
124124-} else if (canvas.getContext("webgl2")) {
125125- /* WebGL2 fallback */
126126-}
127127-/* CSS-only fallback must still look good */
128128-```
129129-130130-### Performance rules
131131-132132-- Target 60fps. If dropping below 50, simplify.
133133-- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative.
134134-- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport.
135135-- Pause off-screen rendering. Kill what you can't see.
136136-- Test on real mid-range devices, not just your development machine.
137137-138138-### Polish is the difference
139139-140140-The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable.
141141-142142-**NEVER**:
143143-144144-- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion
145145-- Ship effects that cause jank on mid-range devices
146146-- Use bleeding-edge APIs without a functional fallback
147147-- Add sound without explicit user opt-in
148148-- Use technical ambition to mask weak design fundamentals — fix those first with other skills
149149-- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise
150150-151151-## Verify the Result
152152-153153-- **The wow test**: Show it to someone who hasn't seen it. Do they react?
154154-- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice?
155155-- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth?
156156-- **The accessibility test**: Enable reduced motion. Still beautiful?
157157-- **The context test**: Does this make sense for THIS brand and audience?
158158-159159-Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do.
-226
.agents/skills/polish/SKILL.md
···11----
22-name: polish
33-description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-## MANDATORY PREPARATION
1010-1111-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship).
1212-1313----
1414-1515-Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished.
1616-1717-## Design System Discovery
1818-1919-Before polishing, understand the system you are polishing toward:
2020-2121-1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API.
2222-2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established?
2323-3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale.
2424-2525-If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase.
2626-2727-## Pre-Polish Assessment
2828-2929-Understand the current state and goals:
3030-3131-1. **Review completeness**:
3232- - Is it functionally complete?
3333- - Are there known issues to preserve (mark with TODOs)?
3434- - What's the quality bar? (MVP vs flagship feature?)
3535- - When does it ship? (How much time for polish?)
3636-3737-2. **Identify polish areas**:
3838- - Visual inconsistencies
3939- - Spacing and alignment issues
4040- - Interaction state gaps
4141- - Copy inconsistencies
4242- - Edge cases and error states
4343- - Loading and transition smoothness
4444-4545-**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete.
4646-4747-## Polish Systematically
4848-4949-Work through these dimensions methodically:
5050-5151-### Visual Alignment & Spacing
5252-5353-- **Pixel-perfect alignment**: Everything lines up to grid
5454-- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps)
5555-- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering)
5656-- **Responsive consistency**: Spacing and alignment work at all breakpoints
5757-- **Grid adherence**: Elements snap to baseline grid
5858-5959-**Check**:
6060-6161-- Enable grid overlay and verify alignment
6262-- Check spacing with browser inspector
6363-- Test at multiple viewport sizes
6464-- Look for elements that "feel" off
6565-6666-### Typography Refinement
6767-6868-- **Hierarchy consistency**: Same elements use same sizes/weights throughout
6969-- **Line length**: 45-75 characters for body text
7070-- **Line height**: Appropriate for font size and context
7171-- **Widows & orphans**: No single words on last line
7272-- **Hyphenation**: Appropriate for language and column width
7373-- **Kerning**: Adjust letter spacing where needed (especially headlines)
7474-- **Font loading**: No FOUT/FOIT flashes
7575-7676-### Color & Contrast
7777-7878-- **Contrast ratios**: All text meets WCAG standards
7979-- **Consistent token usage**: No hard-coded colors, all use design tokens
8080-- **Theme consistency**: Works in all theme variants
8181-- **Color meaning**: Same colors mean same things throughout
8282-- **Accessible focus**: Focus indicators visible with sufficient contrast
8383-- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma)
8484-- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency
8585-8686-### Interaction States
8787-8888-Every interactive element needs all states:
8989-9090-- **Default**: Resting state
9191-- **Hover**: Subtle feedback (color, scale, shadow)
9292-- **Focus**: Keyboard focus indicator (never remove without replacement)
9393-- **Active**: Click/tap feedback
9494-- **Disabled**: Clearly non-interactive
9595-- **Loading**: Async action feedback
9696-- **Error**: Validation or error state
9797-- **Success**: Successful completion
9898-9999-**Missing states create confusion and broken experiences**.
100100-101101-### Micro-interactions & Transitions
102102-103103-- **Smooth transitions**: All state changes animated appropriately (150-300ms)
104104-- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
105105-- **No jank**: 60fps animations, only animate transform and opacity
106106-- **Appropriate motion**: Motion serves purpose, not decoration
107107-- **Reduced motion**: Respects `prefers-reduced-motion`
108108-109109-### Content & Copy
110110-111111-- **Consistent terminology**: Same things called same names throughout
112112-- **Consistent capitalization**: Title Case vs Sentence case applied consistently
113113-- **Grammar & spelling**: No typos
114114-- **Appropriate length**: Not too wordy, not too terse
115115-- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them)
116116-117117-### Icons & Images
118118-119119-- **Consistent style**: All icons from same family or matching style
120120-- **Appropriate sizing**: Icons sized consistently for context
121121-- **Proper alignment**: Icons align with adjacent text optically
122122-- **Alt text**: All images have descriptive alt text
123123-- **Loading states**: Images don't cause layout shift, proper aspect ratios
124124-- **Retina support**: 2x assets for high-DPI screens
125125-126126-### Forms & Inputs
127127-128128-- **Label consistency**: All inputs properly labeled
129129-- **Required indicators**: Clear and consistent
130130-- **Error messages**: Helpful and consistent
131131-- **Tab order**: Logical keyboard navigation
132132-- **Auto-focus**: Appropriate (don't overuse)
133133-- **Validation timing**: Consistent (on blur vs on submit)
134134-135135-### Edge Cases & Error States
136136-137137-- **Loading states**: All async actions have loading feedback
138138-- **Empty states**: Helpful empty states, not just blank space
139139-- **Error states**: Clear error messages with recovery paths
140140-- **Success states**: Confirmation of successful actions
141141-- **Long content**: Handles very long names, descriptions, etc.
142142-- **No content**: Handles missing data gracefully
143143-- **Offline**: Appropriate offline handling (if applicable)
144144-145145-### Responsiveness
146146-147147-- **All breakpoints**: Test mobile, tablet, desktop
148148-- **Touch targets**: 44x44px minimum on touch devices
149149-- **Readable text**: No text smaller than 14px on mobile
150150-- **No horizontal scroll**: Content fits viewport
151151-- **Appropriate reflow**: Content adapts logically
152152-153153-### Performance
154154-155155-- **Fast initial load**: Optimize critical path
156156-- **No layout shift**: Elements don't jump after load (CLS)
157157-- **Smooth interactions**: No lag or jank
158158-- **Optimized images**: Appropriate formats and sizes
159159-- **Lazy loading**: Off-screen content loads lazily
160160-161161-### Code Quality
162162-163163-- **Remove console logs**: No debug logging in production
164164-- **Remove commented code**: Clean up dead code
165165-- **Remove unused imports**: Clean up unused dependencies
166166-- **Consistent naming**: Variables and functions follow conventions
167167-- **Type safety**: No TypeScript `any` or ignored errors
168168-- **Accessibility**: Proper ARIA labels and semantic HTML
169169-170170-## Polish Checklist
171171-172172-Go through systematically:
173173-174174-- [ ] Visual alignment perfect at all breakpoints
175175-- [ ] Spacing uses design tokens consistently
176176-- [ ] Typography hierarchy consistent
177177-- [ ] All interactive states implemented
178178-- [ ] All transitions smooth (60fps)
179179-- [ ] Copy is consistent and polished
180180-- [ ] Icons are consistent and properly sized
181181-- [ ] All forms properly labeled and validated
182182-- [ ] Error states are helpful
183183-- [ ] Loading states are clear
184184-- [ ] Empty states are welcoming
185185-- [ ] Touch targets are 44x44px minimum
186186-- [ ] Contrast ratios meet WCAG AA
187187-- [ ] Keyboard navigation works
188188-- [ ] Focus indicators visible
189189-- [ ] No console errors or warnings
190190-- [ ] No layout shift on load
191191-- [ ] Works in all supported browsers
192192-- [ ] Respects reduced motion preference
193193-- [ ] Code is clean (no TODOs, console.logs, commented code)
194194-195195-**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up.
196196-197197-**NEVER**:
198198-199199-- Polish before it's functionally complete
200200-- Spend hours on polish if it ships in 30 minutes (triage)
201201-- Introduce bugs while polishing (test thoroughly)
202202-- Ignore systematic issues (if spacing is off everywhere, fix the system)
203203-- Perfect one thing while leaving others rough (consistent quality level)
204204-- Create new one-off components when design system equivalents exist
205205-- Hard-code values that should use design tokens
206206-207207-## Final Verification
208208-209209-Before marking as done:
210210-211211-- **Use it yourself**: Actually interact with the feature
212212-- **Test on real devices**: Not just browser DevTools
213213-- **Ask someone else to review**: Fresh eyes catch things
214214-- **Compare to design**: Match intended design
215215-- **Check all states**: Don't just test happy path
216216-217217-## Clean Up
218218-219219-After polishing, ensure code quality:
220220-221221-- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version.
222222-- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish.
223223-- **Consolidate tokens**: If you introduced new values, check whether they should be tokens.
224224-- **Verify DRYness**: Look for duplication introduced during polishing and consolidate.
225225-226226-Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter.
-109
.agents/skills/quieter/SKILL.md
···11----
22-name: quieter
33-description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1414-1515----
1616-1717-## Assess Current State
1818-1919-Analyze what makes the design feel too intense:
2020-2121-1. **Identify intensity sources**:
2222- - **Color saturation**: Overly bright or saturated colors
2323- - **Contrast extremes**: Too much high-contrast juxtaposition
2424- - **Visual weight**: Too many bold, heavy elements competing
2525- - **Animation excess**: Too much motion or overly dramatic effects
2626- - **Complexity**: Too many visual elements, patterns, or decorations
2727- - **Scale**: Everything is large and loud with no hierarchy
2828-2929-2. **Understand the context**:
3030- - What's the purpose? (Marketing vs tool vs reading experience)
3131- - Who's the audience? (Some contexts need energy)
3232- - What's working? (Don't throw away good ideas)
3333- - What's the core message? (Preserve what matters)
3434-3535-If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer.
3636-3737-**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness.
3838-3939-## Plan Refinement
4040-4141-Create a strategy to reduce intensity while maintaining impact:
4242-4343-- **Color approach**: Desaturate or shift to more sophisticated tones?
4444-- **Hierarchy approach**: Which elements should stay bold (very few), which should recede?
4545-- **Simplification approach**: What can be removed entirely?
4646-- **Sophistication approach**: How can we signal quality through restraint?
4747-4848-**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision.
4949-5050-## Refine the Design
5151-5252-Systematically reduce intensity across these dimensions:
5353-5454-### Color Refinement
5555-5656-- **Reduce saturation**: Shift from fully saturated to 70-85% saturation
5757-- **Soften palette**: Replace bright colors with muted, sophisticated tones
5858-- **Reduce color variety**: Use fewer colors more thoughtfully
5959-- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule)
6060-- **Gentler contrasts**: High contrast only where it matters most
6161-- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness
6262-- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead
6363-6464-### Visual Weight Reduction
6565-6666-- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate
6767-- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness
6868-- **White space**: Increase breathing room, reduce density
6969-- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely
7070-7171-### Simplification
7272-7373-- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose
7474-- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes
7575-- **Reduce layering**: Flatten visual hierarchy where possible
7676-- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows
7777-7878-### Motion Reduction
7979-8080-- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing
8181-- **Remove decorative animations**: Keep functional motion, remove flourishes
8282-- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback
8383-- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic
8484-- **Remove animations entirely** if they're not serving a clear purpose
8585-8686-### Composition Refinement
8787-8888-- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling
8989-- **Align to grid**: Bring rogue elements back into systematic alignment
9090-- **Even out spacing**: Replace extreme spacing variations with consistent rhythm
9191-9292-**NEVER**:
9393-9494-- Make everything the same size/weight (hierarchy still matters)
9595-- Remove all color (quiet ≠ grayscale)
9696-- Eliminate all personality (maintain character through refinement)
9797-- Sacrifice usability for aesthetics (functional elements still need clear affordances)
9898-- Make everything small and light (some anchors needed)
9999-100100-## Verify Quality
101101-102102-Ensure refinement maintains quality:
103103-104104-- **Still functional**: Can users still accomplish tasks easily?
105105-- **Still distinctive**: Does it have character, or is it generic now?
106106-- **Better reading**: Is text easier to read for extended periods?
107107-- **Sophistication**: Does it feel more refined and premium?
108108-109109-Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality.
-101
.agents/skills/shape/SKILL.md
···11----
22-name: shape
33-description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[feature to shape]"
77----
88-99-## MANDATORY PREPARATION
1010-1111-Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first.
1212-1313----
1414-1515-Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork.
1616-1717-**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good.
1818-1919-**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill.
2020-2121-## Philosophy
2222-2323-Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise.
2424-2525-## Phase 1: Discovery Interview
2626-2727-**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later.
2828-2929-Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer.
3030-3131-### Purpose & Context
3232-3333-- What is this feature for? What problem does it solve?
3434-- Who specifically will use it? (Not "users"; be specific: role, context, frequency)
3535-- What does success look like? How will you know this feature is working?
3636-- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?)
3737-3838-### Content & Data
3939-4040-- What content or data does this feature display or collect?
4141-- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items)
4242-- What are the edge cases? (Empty state, error state, first-time use, power user)
4343-- Is any content dynamic? What changes and how often?
4444-4545-### Design Goals
4646-4747-- What's the single most important thing a user should do or understand here?
4848-- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?)
4949-- Are there existing patterns in the product this should be consistent with?
5050-- Are there specific examples (inside or outside the product) that capture what you're going for?
5151-5252-### Constraints
5353-5454-- Are there technical constraints? (Framework, performance budget, browser support)
5555-- Are there content constraints? (Localization, dynamic text length, user-generated content)
5656-- Mobile/responsive requirements?
5757-- Accessibility requirements beyond WCAG AA?
5858-5959-### Anti-Goals
6060-6161-- What should this NOT be? What would be a wrong direction?
6262-- What's the biggest risk of getting this wrong?
6363-6464-## Phase 2: Design Brief
6565-6666-After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete.
6767-6868-### Brief Structure
6969-7070-**1. Feature Summary** (2-3 sentences)
7171-What this is, who it's for, what it needs to accomplish.
7272-7373-**2. Primary User Action**
7474-The single most important thing a user should do or understand here.
7575-7676-**3. Design Direction**
7777-How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it.
7878-7979-**4. Layout Strategy**
8080-High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS.
8181-8282-**5. Key States**
8383-List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel.
8484-8585-**6. Interaction Model**
8686-How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion?
8787-8888-**7. Content Requirements**
8989-What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges.
9090-9191-**8. Recommended References**
9292-Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features).
9393-9494-**9. Open Questions**
9595-Anything unresolved that the implementer should resolve during build.
9696-9797----
9898-9999-ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions.
100100-101101-Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.)
-119
.agents/skills/typeset/SKILL.md
···11----
22-name: typeset
33-description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.
44-version: 2.1.1
55-user-invocable: true
66-argument-hint: "[target]"
77----
88-99-Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type.
1010-1111-## MANDATORY PREPARATION
1212-1313-Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first.
1414-1515----
1616-1717-## Assess Current Typography
1818-1919-Analyze what's weak or generic about the current type:
2020-2121-1. **Font choices**:
2222- - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults)
2323- - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface)
2424- - Are there too many font families? (More than 2-3 is almost always a mess)
2525-2626-2. **Hierarchy**:
2727- - Can you tell headings from body from captions at a glance?
2828- - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy)
2929- - Are weight contrasts strong enough? (Medium vs Regular is barely visible)
3030-3131-3. **Sizing & scale**:
3232- - Is there a consistent type scale, or are sizes arbitrary?
3333- - Does body text meet minimum readability? (16px+)
3434- - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings)
3535-3636-4. **Readability**:
3737- - Are line lengths comfortable? (45-75 characters ideal)
3838- - Is line-height appropriate for the font and context?
3939- - Is there enough contrast between text and background?
4040-4141-5. **Consistency**:
4242- - Are the same elements styled the same way throughout?
4343- - Are font weights used consistently? (Not bold in one section, semibold in another for the same role)
4444- - Is letter-spacing intentional or default everywhere?
4545-4646-**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting.
4747-4848-## Plan Typography Improvements
4949-5050-Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies.
5151-5252-Create a systematic plan:
5353-5454-- **Font selection**: Do fonts need replacing? What fits the brand/context?
5555-- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy
5656-- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits)
5757-- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements
5858-5959-## Improve Typography Systematically
6060-6161-### Font Selection
6262-6363-If fonts need replacing:
6464-6565-- Choose fonts that reflect the brand personality
6666-- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights
6767-- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks)
6868-6969-### Establish Hierarchy
7070-7171-Build a clear type scale:
7272-7373-- **5 sizes cover most needs**: caption, secondary, body, subheading, heading
7474-- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5)
7575-- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone
7676-- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need
7777-- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed
7878-7979-### Fix Readability
8080-8181-- Set `max-width` on text containers using `ch` units (`max-width: 65ch`)
8282-- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7)
8383-- Increase line-height slightly for light-on-dark text
8484-- Ensure body text is at least 16px / 1rem
8585-8686-### Refine Details
8787-8888-- Use `tabular-nums` for data tables and numbers that should align
8989-- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text
9090-- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`)
9191-- Set `font-kerning: normal` and consider OpenType features where appropriate
9292-9393-### Weight Consistency
9494-9595-- Define clear roles for each weight and stick to them
9696-- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty)
9797-- Load only the weights you actually use (each weight adds to page load)
9898-9999-**NEVER**:
100100-101101-- Use more than 2-3 font families
102102-- Pick sizes arbitrarily — commit to a scale
103103-- Set body text below 16px
104104-- Use decorative/display fonts for body text
105105-- Disable browser zoom (`user-scalable=no`)
106106-- Use `px` for font sizes — use `rem` to respect user settings
107107-- Default to Inter/Roboto/Open Sans when personality matters
108108-- Pair fonts that are similar but not identical (two geometric sans-serifs)
109109-110110-## Verify Typography Improvements
111111-112112-- **Hierarchy**: Can you identify heading vs body vs caption instantly?
113113-- **Readability**: Is body text comfortable to read in long passages?
114114-- **Consistency**: Are same-role elements styled identically throughout?
115115-- **Personality**: Does the typography reflect the brand?
116116-- **Performance**: Are web fonts loading efficiently without layout shift?
117117-- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%?
118118-119119-Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make.