Skip to content
AI & Agents
Skill

/frontend-design

Design principles and component patterns for building polished web UIs, games, and interactive HTML/CSS/JS projects. Use when creating websites, web apps, browser games, or any frontend project.

BOOST
From plugin
claude-desktop-cn
2676 skills
Install
$ npx -y skills add Qiao-920/claude-desktop-cn --skill frontend-design --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/frontend-design

Context preview

The summary Claude sees to decide when to auto-load this skill.

Design principles and component patterns for building polished web UIs, games, and interactive HTML/CSS/JS projects. Use when creating websites, web apps, browser games, or any frontend project.

SKILL.md

frontend-design.SKILL.md
name: frontend-design
description: Design principles and component patterns for building polished web UIs, games, and interactive HTML/CSS/JS projects. Use when creating websites, web apps, browser games, or any frontend project.

Frontend Design: Build Polished Web UIs

You are creating frontend code (HTML, CSS, JavaScript). Follow these design principles to produce visually polished, production-quality results.

Design Principles

Layout & Spacing

  • Use consistent spacing scales (4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px)
  • Add generous whitespace — don't crowd elements
  • Use CSS Grid or Flexbox for layout, never tables for layout
  • Ensure content has a max-width (960-1200px) with auto margins for readability

Typography

  • Use a clean sans-serif system font stack: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`
  • Establish clear hierarchy: 1 large heading, supportive subheading, readable body text (16px+)
  • Line-height: 1.5-1.7 for body, 1.1-1.3 for headings
  • Limit line length to ~65-75 characters for readability

Color

  • Start with a neutral palette (grays) and one accent color
  • Ensure WCAG AA contrast ratios (4.5:1 for text)
  • Use color purposefully: primary action, success, warning, error
  • Dark mode: use dark grays (#1a1a2e, #16213e) not pure black

Components

  • Buttons: clear hierarchy (primary filled, secondary outlined, text-only for tertiary)
  • Cards: subtle borders or shadows, rounded corners (8-12px), consistent padding
  • Forms: large touch targets (44px+), clear labels, visible focus states
  • Modals: backdrop overlay, centered, max-width, close button

Interactions & Animation

  • Add hover states for interactive elements (subtle background change or scale)
  • Use CSS transitions (150-300ms ease) for state changes
  • Animate entrances with subtle fade-in or slide-up
  • Use `transform` and `opacity` for performant animations

Responsive Design

  • Mobile-first approach: design for small screens, enhance for larger
  • Use relative units (rem, %, vw/vh) over fixed px where appropriate
  • Test breakpoints: 480px, 768px, 1024px, 1280px
  • Touch-friendly: minimum 44x44px tap targets

For Games & Interactive Projects

When building games or interactive experiences:

  • Use `<canvas>` or DOM-based rendering as appropriate for the complexity
  • Implement proper game loop with `requestAnimationFrame`
  • Handle keyboard/mouse/touch input cleanly
  • Add visual feedback for user actions (particles, screen shake, color flash)
  • Include a start screen, HUD/score display, and game over state
  • Use sprite-based or procedural graphics — avoid placeholder rectangles
  • Add sound effects where appropriate using Web Audio API
  • Target 60fps — optimize render loops

For Single-File Projects

When creating everything in one HTML file:

  • Inline CSS in `<style>` and JS in `<script>`
  • Use modern ES6+ JavaScript (no build tools needed)
  • Structure code with clear sections: styles, markup, logic
  • Result should be immediately openable in a browser

Output Guidelines

  • Write complete, runnable code — no placeholders or TODOs
  • Include all assets inline (SVG icons, CSS gradients for backgrounds)
  • Add a favicon using an inline SVG data URI
  • Make it immediately impressive when opened in a browser
Read more
Ships withclaude-desktop-cn

面向中文用户持续维护的 Claude Desktop 中文桌面分支,基于 pretend1111/claude-desktop-app 二次整理、汉化和增强。 这个分支的目标不是简单换皮,而是把原本零散、半占位的能力逐步打磨成一套可维护、可发布、可日用的桌面工作流:中文聊天、项目上下文、GitHub 导入、本地 Code 工作区、权限守卫、命令执行和 Artifact 预览。

Get the whole plugin
Stats
267
Stars
36
Forks
Maintained
Maintenance
TypeScript
Language
4mo ago
Last commit
6mo ago
Created
2d ago
Added

Repo: Qiao-920/claude-desktop-cn

Other skills on claude-desktop-cn.