ui-design-principles
Rules for visual hierarchy, whitespace, spacing scales, layout, depth (shadows, elevation), and polish. Apply whenever writing or reviewing CSS/HTML styles, deciding on padding/margin/gap values, choosing shadow levels, structuring page layouts, handling responsive design, or improving the overall look and feel of a UI. NOT for picking specific colors (use ui-design:color-palettes), fonts (use ui-design:font-recommendations), building specific components (use ui-design:component-gallery), or accessibility/WCAG compliance (use ui-design:wcag-2.2).
What this skill does
# UI Design Principles ## Starting from Scratch ### Start with a Feature, Not a Layout - Don't begin with the shell (navbar, sidebar, footer). Start with the actual feature/functionality. - Design in grayscale first to force clear hierarchy through spacing, contrast, and size rather than color. - Don't design every single feature upfront. Work in short cycles: design a simple version, implement it, iterate. ### Choose a Personality - Font choice affects personality: serif = elegant/classic, rounded sans-serif = playful, neutral sans-serif = professional. - Color affects personality: blue = safe/familiar, gold = high-end, pink = fun/playful. - Border radius affects personality: small = neutral/serious, large = playful, none = formal. ### Limit Your Choices - Define systems in advance: spacing scales, font sizes, colors, shadows, etc. - Systematize everything to avoid decision fatigue and inconsistency. ## Hierarchy is Everything ### Size Isn't Everything - Don't rely on font size alone for hierarchy. Use font weight and color as primary tools. - For primary content: use dark color (e.g., hsl(210, 15%, 20%)), normal-to-bold weight. - For secondary content: use medium grey (e.g., hsl(210, 10%, 55%)), normal weight. - For tertiary content: use lighter grey (e.g., hsl(210, 10%, 70%)), normal weight, smaller size. - Use 2-3 shades of grey for text: dark, medium, and light. Avoid more than that. - Don't use grey text on colored backgrounds. Instead, use the background color with adjusted opacity or a hand-picked color that matches. ### Emphasize by De-emphasizing - Sometimes the best way to make something stand out is to de-emphasize the things around it. - Instead of making a primary action bigger, make secondary actions smaller/lighter. ### Labels Are a Last Resort - Don't slap a label on everything. The data itself often indicates what it represents. - Combine labels with values when possible (e.g., "12 left in stock" instead of "In Stock: 12"). - When you do use labels, de-emphasize them (smaller, lighter, uppercase) and emphasize the value. ### Separate Visual Hierarchy from Document Hierarchy - Don't let semantic HTML dictate visual styling. An h3 can be visually large and bold when it's the page title. - Style based on the role content plays in the UI, not its HTML tag. ### Balance Weight and Contrast - Bold text with low contrast can have the same visual weight as normal text with high contrast. - Icons beside text often feel too heavy; reduce contrast/opacity on the icon to balance. ### Semantics Are Secondary - Use semantic colors (red for destructive actions) as secondary indicators, not primary ones. - For destructive actions: make the button smaller/less prominent, not big and red. ## Layout and Spacing ### Start with Too Much White Space - Begin with way more space than you think you need, then reduce. - White space should be removed, not added. ### Establish a Spacing and Sizing System - Use a constrained scale based on a base value of 16px: - 4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px, 96px, 128px, 192px, 256px, 384px, 512px, 640px, 768px - Each step should be at least 25% different from adjacent values. - A linear scale (multiples of 4px) doesn't work because jumps feel too small at large sizes and too large at small sizes. ### You Don't Have to Fill the Whole Screen - If content needs 600px, use 600px. Don't spread it to fill 1400px. - Not everything needs to be full-width. A login form on a wide page should still be constrained. - Start with mobile (~400px) and work up. - Use columns instead of stretching narrow content. ### Grids Are Overrated - Don't make everything fluid/percentage-based. Sidebars should often have fixed widths. - Give components the space they need. Use max-width instead of grid column widths. - Don't shrink elements until you need to (responsive breakpoints). ### Relative Sizing Doesn't Scale - Don't assume all elements should scale proportionally across screen sizes. - Large elements shrink faster than small ones on smaller screens. - Button padding should not be proportional to font size — larger buttons get more generous padding. ### Avoid Ambiguous Spacing - When groups of elements lack visible separators, use spacing to show relationships. - The space between a label and its input should be less than the space between form groups. - More space around groups than within them. This applies to form fields, headings, list items, and horizontal layouts. ## Typography ### Establish a Type Scale - Recommended scale: 12px, 14px, 16px, 18px, 20px, 24px, 30px, 36px, 48px, 60px, 72px. - Don't use em units for type scales — use px or rem to guarantee consistency. - Avoid modular scales (mathematical ratios) for interfaces — they produce fractional values and too few useful sizes. ### Use Good Fonts - For UI design, default to neutral sans-serif fonts. - System font stack: `-apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue` - Filter fonts by number of weights: only consider typefaces with 5+ weights (10+ styles including italics). - Optimize for legibility: avoid condensed typefaces with short x-heights for body text. - Trust popular fonts: sort by popularity in font directories. ### Line Length - Keep paragraphs 45-75 characters per line (20-35em). - Use `max-width` in em units to control line length independent of container width. - Wider content areas can contain images/components at full width while constraining paragraph text. ### Baseline Alignment - When mixing font sizes on the same line, align by baseline, not center. - `align-items: baseline;` not `align-items: center;` ### Line-Height Is Proportional - Line-height and font size are inversely proportional. - Small text (body): line-height 1.5-1.75 - Large text (headlines): line-height 1-1.25 - Wide content needs taller line-height; narrow content can use shorter line-height. ### Links - Not every link needs a bright color. In link-heavy UIs, use bolder weight or darker color instead. - Ancillary links can be styled on hover only. ### Text Alignment - Default to left-aligned text for English. - Center alignment works for headlines and short blocks (2-3 lines max). - Right-align numbers in tables for easy comparison. - Enable `hyphens: auto` when using justified text. ### Letter-Spacing - Trust the typeface designer by default. - Tighten letter-spacing for headlines using wide-spaced font families (`letter-spacing: -0.02em`). - Increase letter-spacing for ALL CAPS text (`letter-spacing: 0.05em`). ## Working with Color ### Use HSL, Not Hex - HSL represents colors as humans perceive them: hue (0-360 degrees), saturation (0-100%), lightness (0-100%). - HSL makes it easy to create color variations by adjusting a single parameter. ### You Need More Colors Than You Think - A real UI needs 8-10 shades per color, not just 5 hex codes. - Three categories: Greys (8-10 shades), Primary colors (5-10 shades each), Accent colors (5-10 shades each for semantic states). - True black looks unnatural. Start with a very dark grey. ### Define Shades Up Front - Don't use CSS preprocessor functions (lighten/darken) to create shades on the fly. - Pick a base color (good for a button background), then find the darkest shade (for text) and lightest shade (for tinted backgrounds). - Fill in gaps: use 9 shades (100-900 scale). Start with 100, 500, 900, then fill 300, 700, then 200, 400, 600, 800. ### Saturation and Lightness - As lightness approaches 0% or 100%, increase saturation to compensate for washed-out appearance. - To make a color lighter without losing intensity, rotate hue toward bright hues (60°/yellow, 180°/cyan, 300°/magenta). - To make a color darker, rotate hue toward dark hues (0°/red, 120°/green, 240°/blue). - Don't rotate more than 20-30° or the color will look completely different. ### Grey Temperature - Saturate greys with blue for a cool feel, or yellow/orange for a warm feel. - Increase saturation for li
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.