ui-spec
Skill1 starsChanged 7 months agoMITView on GitHub
Manages UI spec design documents. Supports viewing, annotating, updating screens, and managing annotations through an interactive browser-based workflow. Location: .claude/design/ui-spec.html Screens and flows use descriptive kebab-case IDs: When adding screens, choose IDs that clearly describe the screen's purpose. The ui-spec MCP server provides tools for zero-friction spec management: The server auto-starts with Claude Code (configured in ~/.mcp.json). HTTP endpoint on localhost:9012 handles browser save via POST /save. The UI spec has a built-in interactive annotation tool in the browser: Shortcuts…
4 other projects use a version of this.
Adopted by
Most recently taken up by
- idaibin/skillstheir own version, first seen Nov 8, 2026
- AlpayC/claude-skill-settheir own version, first seen Sep 14, 2026
- tranhieutt/software_development_departmenttheir own version, first seen Apr 30, 2026
- sparktech-ai/skillstheir own version, first seen Mar 3, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- tranhieutt/software_development_department★ 71same name
- idaibin/skills★ 6same name
- sparktech-ai/skills★ 1same name
- AlpayC/claude-skill-set★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- brew-maintainSkill
- cc-updatesSkill
- commit-helperSkill
- dev-consoleSkill
- explain-codeSkill
- init-modularSkill
- learnSkill
- plan-debateSkill
- port-managerSkill
- product-contextSkill
- projectSkill
- refactorSkill
- techdebtSkill
- web-researcherSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 7 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Every .section (flow) has a descriptive id starting with flow-
- Very specific: line 12
Every .screen has a descriptive id starting with screen-
- Distinctive: line 13
All colors use CSS custom properties
- Distinctive: line 27
When adding screens, choose IDs that clearly describe the screen's purpose.
- Distinctive: line 85
Write feedback, set priority, and save
- Very specific: line 120
Use var(--bg-*) for backgrounds
- Very specific: line 121
Use var(--text-*) for text colors
- Very specific: line 122
Use var(--border-*) for borders
- Very specific: line 123
Use var(--accent) for the primary theme color
- Distinctive: line 163
When mobile and desktop layouts are structurally different (e.g., bottom tab bar vs sidebar navigation), use a viewport group to show …
- Distinctive: line 189
Rule: Only use viewport-group when layouts are structurally incompatible.
- Distinctive: line 193
When generating screens from an existing project's source code:
- Distinctive: line 205
When generating screens for an Electron desktop app:
- Very specific: line 235
Run /ui-spec init to generate a starter ui-spec.html
- Very specific: line 236
Run /ui-spec capture to generate screens from an existing project's source code
- Very specific: line 238
Use /ui-spec to manage it from Claude Code
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 screenWhen adding screens, choose IDs that clearly describe the screen's purpose.
Annotation Format
<!-- Screen-level: inside .screen-body, at the bottom -->
<div class="annotation" data-author="author" data-date="YYYY-MM-DD" data-priority="high">
Annotation text here.
</div>
<!-- Flow-level: inside .section, before .screens -->
<div class="annotation" data-author="author" data-date="YYYY-MM-DD">
Annotation text here.
</div>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
<div class="screen" id="screen-{name}">
<div class="screen-label">{Label Text}</div>
<div class="screen-body">
<div class="status-bar"><span>9:41</span><span>100%</span></div>
<!-- Screen content here -->
</div>
</div>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:
<!-- In toolbar, after existing buttons -->
<div class="viewport-toggle">
<button class="vp-btn active" data-vp="mobile" title="Mobile 375px">📱</button>
<button class="vp-btn" data-vp="tablet" title="Tablet 768px">📋</button>
<button class="vp-btn" data-vp="desktop" title="Desktop 1440px">🖥️</button>
</div>Switching viewport sets a data-viewport attribute on <body> 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:
<div class="viewport-group" id="screen-dashboard-variants">
<div class="screen" id="screen-dashboard-mobile" data-viewport="mobile">
<div class="screen-label">Dashboard (Mobile)</div>
<div class="screen-body">
<!-- Bottom tab bar layout -->
</div>
</div>
<div class="screen" id="screen-dashboard-desktop" data-viewport="desktop">
<div class="screen-label">Dashboard (Desktop)</div>
<div class="screen-body">
<!-- Sidebar layout -->
</div>
</div>
</div>.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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

