Install
$ agentstack add skill-almax000-claude-skills-ui-spec ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
UI Spec Skill
Manages UI spec design documents. Supports viewing, annotating, updating screens, and managing annotations through an interactive browser-based workflow.
UI Spec File
Location: .claude/design/ui-spec.html
HTML Conventions
- Every
.section(flow) has a descriptiveidstarting withflow- - Every
.screenhas a descriptiveidstarting withscreen- - All colors use CSS custom properties
- Design notes use
.noteclass (yellow border, for design documentation) - Annotations use
.annotationclass (blue border, for feedback/review)
Screen ID Convention
Screens and flows use descriptive kebab-case IDs:
flow-onboarding # A user flow grouping related screens
screen-login # Individual screen within a flow
screen-dashboard # Another screen
When adding screens, choose IDs that clearly describe the screen's purpose.
Annotation Format
Annotation text here.
Annotation text here.
Attributes
| Attribute | Required | Values | |-----------|----------|--------| | data-author | Yes | jojo, claude, etc. | | data-date | Yes | YYYY-MM-DD | | data-priority | No | high, medium, low | | data-status | No | open (default), resolved, wontfix |
Blank Screen Template
{Label Text}
9:41100%
MCP Server Integration
The ui-spec MCP server provides tools for zero-friction spec management:
| Tool | Purpose | |------|---------| | open_spec | Start HTTP server + open spec in browser | | get_status | Summary: flows, screens, annotation counts | | list_annotations | List annotations with screen/flow context | | resolve_annotation | Mark an annotation as resolved by index |
The server auto-starts with Claude Code (configured in ~/.mcp.json). HTTP endpoint on localhost:9012 handles browser save via POST /save.
Interactive Annotation Mode
The UI spec has a built-in interactive annotation tool in the browser:
- Click the pencil button in the top-right toolbar to enter annotate mode
- Hover over elements to see highlight outlines
- Click any element to open the annotation form
- Write feedback, set priority, and save
- Annotation is injected into the DOM as a real
.annotationdiv at the right position - Press Cmd+S (Mac) / Ctrl+S (Windows) or click the save button to save in-place
Workflow: User annotates → Claude reads → Claude executes
- Claude calls
mcp__ui-spec__open_spec()→ HTTP server starts + browser opens - User annotates in browser → presses Cmd+S → saved in-place via POST /save
- Claude calls
mcp__ui-spec__list_annotations()→ sees all open annotations - Claude processes annotations → updates spec
- Claude calls
mcp__ui-spec__resolve_annotation(n)→ marks as done
Badge counter
The pencil button shows a red badge with the count of open (unresolved) annotations.
Keyboard Shortcuts
| Key | Action | |-----|--------| | Cmd+S / Ctrl+S | Save spec in-place (via server) or download (file:// fallback) | | A | Toggle annotate mode (same as pencil button) | | S | Save/download HTML (same as save button) | | T | Toggle dark/light theme | | L | Cycle through languages | | 1 | Switch to Mobile viewport (375px) | | 2 | Switch to Tablet viewport (768px) | | 3 | Switch to Desktop viewport (1440px) | | Escape | Cancel annotation form / exit annotate mode |
Shortcuts are disabled when the annotation form is focused (to avoid conflicts with typing). Cmd+S / Ctrl+S works even in form fields.
Theme System
The UI spec supports dark/light themes via CSS variables. When adding or modifying content:
- Use
var(--bg-*)for backgrounds - Use
var(--text-*)for text colors - Use
var(--border-*)for borders - Use
var(--accent)for the primary theme color - Character/brand-specific colors can remain as inline styles
Viewport System
Viewport Sizes
| Name | Width | Use case | |------|-------|----------| | Mobile | 375px | Phone (default) | | Tablet | 768px | Tablet portrait | | Desktop | 1440px | Desktop browser |
Viewport Toggle (Toolbar)
The toolbar includes three viewport buttons that switch the container width:
📱
📋
🖥️
Switching viewport sets a data-viewport attribute on ` and adjusts .screen` width:
/* Default: mobile */
.screen-body { width: 375px; }
body[data-viewport="tablet"] .screen-body { width: 768px; }
body[data-viewport="desktop"] .screen-body { width: 1440px; }
Screens use flex/relative layout inside .screen-body so content reflows naturally at wider widths. Use percentage widths and max-width where appropriate.
Viewport Group (Optional)
When mobile and desktop layouts are structurally different (e.g., bottom tab bar vs sidebar navigation), use a viewport group to show multiple variants:
Dashboard (Mobile)
Dashboard (Desktop)
.viewport-group {
display: flex; gap: 2rem; flex-wrap: wrap;
}
.viewport-group .screen { flex: none; }
Rule: Only use viewport-group when layouts are structurally incompatible. For most screens, CSS reflow via the viewport toggle is sufficient.
Source Code Reading Conventions (for capture mode)
When generating screens from an existing project's source code:
- Project config →
package.json, framework config → identify tech stack - Router/navigation → route definitions → build page list
- Page components → component tree, layout structure, conditional rendering
- Style sources → CSS modules, Tailwind classes, styled-components, theme files → extract colors, spacing, typography
- Shared components → design system primitives (Button, Card, Input, etc.) → reuse patterns
The goal is maximum-effort visual fidelity from source code alone — no screenshots, no running the app. Structure must be faithful; visual styling should match as closely as static HTML/CSS allows.
Desktop App Conventions — Electron (for capture mode)
When generating screens for an Electron desktop app:
- Main process → Read
electron/main/index.ts(or similar) for window chrome config:
titleBarStyle(hidden,hiddenInset) → affects traffic light / title bar areatrafficLightPosition→ macOS traffic light placementtitleBarOverlay→ Windows/Linux native control buttonsminWidth/minHeight→ minimum viewport sizes
- Platform CSS → Detect
.platform-darwin,.platform-win32,.platform-linuxclasses
- Generate platform variant annotations if layouts differ significantly
- macOS: traffic lights in sidebar area, no header padding
- Windows:
titleBarOverlayoccupies top-right, extra headerpadding-right
- Chrome vs Content theming → Identify theme-independent variables (e.g.,
--chrome-*)
- "Always-dark chrome" pattern: sidebar + header use fixed dark colors
- Content area follows theme toggle (light/dark)
- Capture both theme states for content area; chrome stays constant
- Viewport sizes → Use desktop-appropriate sizes instead of mobile defaults:
| Name | Width | Use case | |------|-------|----------| | Compact | 800px | Minimum window size | | Default | 1200px | Typical desktop | | Wide | 1600px | Large displays |
Quick Start
To create a UI spec for your project:
- Run
/ui-spec initto generate a starterui-spec.html - Run
/ui-spec captureto generate screens from an existing project's source code - Open it in a browser to view and annotate
- Use
/ui-specto manage it from Claude Code
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: almax000
- Source: almax000/claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.