Agent SkillsQiao-920/claude-desktop-cn › frontend-design

frontend-design

GitHub

提供构建高质量Web UI、游戏及交互项目的指导原则。涵盖布局、排版、色彩、组件规范,以及响应式设计、动画性能优化和单文件项目实现细节。

electron/skills/frontend-design/SKILL.md Qiao-920/claude-desktop-cn

触发场景

创建网站或Web应用 开发浏览器游戏 构建交互式HTML/CSS/JS项目 设计前端界面

安装

npx skills add Qiao-920/claude-desktop-cn --skill frontend-design -g -y
更多选项

非标准路径

npx skills add https://github.com/Qiao-920/claude-desktop-cn/tree/main/electron/skills/frontend-design -g -y

不安装直接使用

npx skills use Qiao-920/claude-desktop-cn@frontend-design

指定 Agent (Claude Code)

npx skills add Qiao-920/claude-desktop-cn --skill frontend-design -a claude-code -g -y

安装 repo 全部 skill

npx skills add Qiao-920/claude-desktop-cn --all -g -y

预览 repo 内 skill

npx skills add Qiao-920/claude-desktop-cn --list

SKILL.md

Frontmatter
{
    "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

版本历史

  • f248671 当前 2026-07-24 11:45

同 Skill 集合

electron/skills/code-review/SKILL.md
electron/skills/create-project/SKILL.md
electron/skills/doc-writer/SKILL.md
electron/skills/skill-creator/SKILL.md
engine/src/skills/bundled/verify/SKILL.md

元信息

文件数
0
版本
f248671
Hash
f3dd65a0
收录时间
2026-07-24 11:45

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 09:54
浙ICP备14020137号-1 $访客地图$