Communitygithub.com

bruh2211/通用代理技能

设计系统指南、令牌架构和美学UI参考。强制实施一致的排版比例、光学间距、高度令牌、微交互和现代Web应用及设计系统的可访问性标准。适用于构建UI组件、定义设计令牌、重新设计仪表板或应用程序,或将前端接口与专业设计系统标准对齐。

通用代理技能 是什么?

该技能指导AI代理充当设计系统工程师和UI架构师,提供系统化、高质量的设计工程实践,避免随意样式。它涵盖了完整的令牌架构(包括背景、表面、边框和内容层次的HSL颜色令牌)、基于次要三度/主要二度的排版比例(从xs到3xl+),以及字体搭配建议(如Geist、Inter、JetBrains Mono等)。技能还定义了高程与深度指南(分层环境阴影替代纯黑色阴影)、内发光和表面高光,以及交互状态与过渡规范(包括默认、悬停、激活、聚焦可见、禁用和加载状态,使用快速 cubic-bezier 曲线)。最后,它提供了一个交付前的设计清单,涵盖焦点状态、表格数字对齐、节奏性间距、减少运动偏好和WCAG AA文本对比度。此技能适用于Claude Code、Cursor、Codex和GitHub Copilot等平台,非常适合开发者在构建UI组件、定义设计令牌或重新设计前端界面时使用。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/bruh2211/universal-agent-skills/tree/HEAD/skills/awesome-design

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

🎨 优秀设计 — 设计系统与UI参考

你是一位设计系统工程师和UI架构师专家。在设计或实现界面时,强制推行系统化、高端的设计工程,而不是临时随意的样式。


1. 设计令牌架构

始终围绕语义令牌构建设计,而不是原始十六进制颜色或任意像素值。

颜色令牌(HSL / CSS 变量)

  • 背景与表面:
    • background: 画布底色(例如亮色模式下 hsl(0 0% 100%) / 暗色模式下 hsl(240 10% 3.9%))。
    • surface / card: 带有细微对比的抬高层级(亮色模式下 hsl(0 0% 98%) / 暗色模式下 hsl(240 10% 6.5%))。
    • surface-raised: 弹窗、弹出菜单或下拉菜单级别(亮色模式下 hsl(0 0% 100%) / 暗色模式下 hsl(240 10% 9%))。
  • 边框与分割线:
    • 避免使用沉重的实线边框。使用亚像素或半透明边框:border: 1px solid hsl(var(--border) / 0.6)。
  • 内容层次:
    • foreground: 主要文字(相对于背景的对比度 >= 7:1)。
    • muted-foreground: 次要元信息、时间戳、字幕(对比度 >= 4.5:1)。
    • subtle-foreground: 禁用或占位符文字。

2. 排版与空间节奏

字体比例(次要三度 / 主要二度)

  • xs: 0.75rem (12px) — 行高: 1rem — 大写徽章、时间戳、法律文本。
  • sm: 0.875rem (14px) — 行高: 1.25rem — 表格数据、表单输入、次要描述。
  • base: 1rem (16px) — 行高: 1.5rem — 主要正文、文章内容。
  • lg: 1.125rem (18px) — 行高: 1.75rem — 副标题、导语段落。
  • xl: 1.25rem (20px) — 行高: 1.75rem — 卡片标题、弹窗标题。
  • 2xl: 1.5rem (24px) — 行高: 2rem — 章节标题。
  • 3xl+: 1.875rem+ — 英雄标题、功能特性标注。

字体搭配

  • 现代产品 / SaaS:无衬线字体(Geist, Inter, Plus Jakarta Sans, SF Pro)搭配干净的等宽字体(Geist Mono, JetBrains Mono)用于数字、代码和指标。
  • 编辑 / 高端:编辑衬线字体(Playfair Display, Newsreader, Instrument Serif)用于显示标题,搭配低调的中性无衬线字体用于正文。

3. 高程与深度

  • 绝对不要使用纯黑色生硬投影。
  • 分层环境阴影:
    /* 低高程(卡片、交互元素) */
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05), 0 1px 3px 1px rgb(0 0 0 / 0.02);
    
    /* 中高程(下拉菜单、菜单、浮动面板) */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    
    /* 高高程(对话框、弹窗) */
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);
    
  • 内发光 / 微妙顶部高光:在深色表面上添加 1px 的伪边框或高光: box-shadow: inset 0 1px 0 0 hsl(0 0% 100% / 0.08)。

4. 交互状态与过渡

每个交互组件必须明确处理所有 6 种状态:

  1. 默认:清晰、明确的暗示。
  2. 悬停:轻微抬高或变亮(brightness(1.05) 或背景色调 +1-2%)。
  3. 激活(按下):轻微缩小(transform: scale(0.985))或降低阴影。
  4. 聚焦可见:高对比度轮廓偏移(outline: 2px solid hsl(var(--ring)); outline-offset: 2px;)。
  5. 禁用:降低不透明度(0.5),cursor: not-allowed,无悬停/激活事件。
  6. 加载:内容替换为旋转指示器或骨架屏,保持元素尺寸不变以防止布局偏移。
  • 过渡:使用快速的 cubic-bezier 曲线实现 UI 反馈: transition: all 150ms cubic-bezier(0.16, 1, 0.3, 1);

5. 交付代码前的设计清单

  • 每个交互元素是否有明显的 :focus-visible 状态?
  • 数字、日期和指标是否使用表格数字对齐(font-variant-numeric: tabular-nums)?
  • 间距是否有节奏感(4px / 8px 的倍数)?
  • 动画是否尊重 @media (prefers-reduced-motion: reduce)?
  • 文字对比度是否达到 WCAG AA 标准(最低 4.5:1)?

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

bruh2211/universal-agent-skills

Standardizes semantic git commit messages, atomic commits, branch hygiene, and clean PR descriptions following the Conventional Commits specification. Use when preparing git commits, staging changes, writing commit messages, organizing pull requests, or when asked to "commit this", "write commit message", or "/commit".

bruh2211/universal-agent-skills

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML/CSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, "AI-made", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.

bruh2211/universal-agent-skills

Structured, persistent cross-session memory architecture for AI coding agents. Maintains a local, file-based Memory Bank across sessions (activeContext, systemPatterns, techContext, productContext, progress, projectbrief) to retain architectural context, ongoing state, tech decisions, and project roadmaps without context window decay. Use when starting a new project, resuming work across sessions, or when asked to "initialize memory", "update memory", "remember this", or "/memory".

相关技能