Communitygithub.com

xzedm/clipplic-landing

界面设计工程原则,专注于让交互细节变得精致。适用于构建 UI 组件、审查前端代码、实现动画、悬停状态、阴影、边框、微交互、进入/退出动画、选择或审查图标,以及任何视觉细节工作。

clipplic-landing 是什么?

该技能提供了一套系统化的设计工程原则,用于构建和审查精致的用户界面。它专注于那些微小但累积起来能显著提升用户体验的细节,如同心圆角、光学对齐、中断式动画以及上下文相关的图标动画等。该技能适用于所有主要的 AI 代理平台(如 Claude Code、Cursor 和 Codex),并提供了详细的快速参考指南、常见错误列表以及独立的审查输出格式。通过遵循这些原则,开发者可以创建出感觉更精致、响应更及时且行为更一致的界面。技能的核心思想是,良好的界面并非来自单一的设计决策,而是一系列微小细节的协同作用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/xzedm/clipplic-landing/tree/HEAD/.agents/skills/better-ui

在你喜欢的 AI 中提问

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

文档

让界面感觉更好的细节

优秀的界面很少来自单一因素。通常是众多小细节的叠加,共同造就了一流的体验。在构建或审查 UI 代码时应用这些原则。

审查时,放慢界面速度:在浏览器的“动画”面板中以 10% 的速度重放动画,并遍历每个状态:悬停、聚焦、激活、加载、空。在 10% 速度下感觉不对劲的地方,正是全速下微不足道的错误所在。

保留项目的组件库、设计令牌和间距密度。除非以下原则规定了精确的交互模式,否则应遵循项目已有的动效语言。

排版(文本换行、字体渲染、表格数字、间距)由 better-typography 技能涵盖;文本相关内容请使用该技能。无障碍(点击区域、焦点状态、键盘支持、ARIA、减少动效)由 better-accessibility 技能涵盖。布局结构(分组、段落间距、断点、RTL 空间)由 better-layout 技能涵盖。

快速参考

类别使用场景
表面圆角、光学对齐、阴影、图像轮廓
动画可中断动画、进入/退出过渡、图标动画、按下缩放、动效克制
图标图标描边粗细、通过 currentColor 实现状态、轮廓 vs 填充、大小、RTL 翻转
性能过渡属性指定、will-change 使用

核心原则

1. 同心圆角

外层圆角 = 内层圆角 + 内边距。嵌套元素圆角不匹配是让界面感觉不对劲的最常见原因。

2. 光学优先于几何对齐

当几何居中看起来不对时,进行光学调整。带图标的按钮、播放三角形和不对称图标都需要手动调整。

3. 阴影用于层次,边框用于结构

对于按钮、卡片和容器,如果其边框仅用于营造深度,优先使用分层的透明 box-shadow 值。保留那些用于传达结构或状态的边框:分隔线、布局分割线以及选中或聚焦状态。

4. 可中断动画

使用 CSS 过渡处理交互状态变化:它们可以在动画中途被中断。保留关键帧动画用于只运行一次的阶段性序列。

5. 拆分和交错进入动画

对于不频繁的阶段性进入(顺序有助于传达层次结构时),将内容拆分为语义块,并以约 100ms 的间隔交错显示,而不是对整个容器进行动画。不要在常规、高频的交互中使用交错效果。

6. 微妙的退出动画

使用较小的固定 translateY 值,而不是完整的元素高度。退出效果应比进入效果柔和。进入和退出过渡都使用 ease-out。

7. 上下文相关的图标动画

使用 opacity、scale 和 blur 来动画图标,而不是切换可见性。精确使用这些值:scale 从 0.25 到 1,opacity 从 0 到 1,blur 从 4px 到 0px。如果项目在 package.json 中有 motion 或 framer-motion,则匹配该包的导入路径(或两者都存在时匹配已建立的附近导入),并使用 transition: { type: "spring", duration: 0.3, bounce: 0 };bounce 必须始终为 0。如果没有安装动效库,则将两个图标都保留在 DOM 中(其中一个绝对定位),并使用 CSS 过渡进行交叉淡入淡出,使用 cubic-bezier(0.2, 0, 0, 1);这无需任何依赖即可实现进入和退出动画。

8. 图像轮廓

为图像添加一个微妙且低透明度的 1px 轮廓,以获得一致的深度感。颜色在浅色模式下必须为纯黑色(oklch(0 0 0 / 0.1)),在深色模式下必须为纯白色(oklch(1 0 0 / 0.1)),绝不能使用接近黑色的颜色,如石板灰、锌色或任何带有色相的中性色。带有色相的轮廓会拾取底部的表面颜色,在图像边缘看起来像污垢。

9. 按下缩放

点击时微妙的 scale(0.96) 能为按钮提供触觉反馈。始终使用 0.96。切勿使用小于 0.95 的值:任何低于该值的缩放都会显得夸张。添加一个 static prop 来在动效可能分散注意力时禁用它。

10. 页面加载时跳过动画

在 AnimatePresence 上使用 initial={false} 来防止首次渲染时的进入动画。验证它不会破坏有意的进入动画。

11. 绝不使用 transition: all

始终指定确切的属性:transition-property: scale, opacity。Tailwind 的 transition-transform 涵盖了 transform, translate, scale, rotate。

12. 谨慎使用 will-change

仅用于 transform、opacity、filter 这些 GPU 可以合成的属性。绝不使用 will-change: all。仅在你注意到首帧卡顿时才添加。

13. 图标描边粗细匹配文字粗细

图标旁边的文字承载了文字的光学权重:在常规(400)字重旁使用 1.5px 描边,在半粗(600)字重旁使用 2px 描边。一套图标集使用一个描边粗细;绝不在同一个表面上混合使用不同的图标库。

14. 一个 SVG,按状态重新着色

图标使用 currentColor,其状态(悬停、选中、禁用)通过 CSS 的 color 和 opacity 来实现,绝不使用单独的资源。轮廓变体是默认状态;填充变体用于标记激活状态。

15. 动效克制

不要为高频交互添加自定义动画:其注意力成本会在每次触发时重复。动效绝不是唯一的反馈渠道;每个动画状态变化还需要一个静态提示(颜色、图标、标签)。

常见错误

错误修复
紧密嵌套的父级和子级使用相同的圆角计算 外层圆角 = 内层圆角 + 内边距
图标看起来不居中使用内边距进行光学调整,或直接修改 SVG
仅用于伪造层次感的边框使用分层的透明 box-shadow;保留结构和状态边框
令人突兀的阶段性进入或上下文退出交错显示不频繁的进入,并保持上下文保持的退出效果柔和
有状态图标或切换按钮在页面加载时动画其默认状态向该 AnimatePresence 添加 initial={false};保留有意的页面进入
元素上的 transition: all指定确切的属性
首帧动画卡顿添加 will-change: transform(谨慎使用)
细线图标与粗体文字相邻将描边宽度与字重匹配
每个状态使用单独的图标资源使用一个 currentColor SVG,状态通过 CSS 实现
到处使用填充图标轮廓作为默认,仅激活状态使用填充
每次悬停或按键都触发进入动画即时反馈或 ≤150ms 的 opacity/color 过渡

审查输出格式

仅当用户要求进行独立的 UI 精致度审查时才使用此格式。当 better-interface 协调审查时,请向该技能提供领域证据和发现,并让其输出格式、严重性等级、合并规则、上限和结论优先。

以两部分形式呈现独立审查。

发现

按原则对所有确认的发现进行分组。使用一个包含严重性、位置、之前、之后和原因列的 markdown 表格。绝不要使用单独的“之前:”/“之后:”行。

  • 严重性:HIGH 使交互产生误导、无响应或反复干扰;MEDIUM 造成明显的工艺或一致性问题;LOW 为孤立的精致度问题。
  • 位置:引用 path/to/file:line。如果工件没有源文件,则引用确切的屏幕和组件。
  • 之前 / 之后:显示当前实现和可操作的替换方案。
  • 原因:指出违反的原则并解释它对界面的影响。

将重复的系统性问题合并为一行,并列出所有受影响的位置。省略没有发现的原则。

示例

同心圆角

严重性位置之前之后原因
LOWsrc/Card.tsx:28卡片上 rounded-xl + 内部按钮 rounded-xl(p-2)卡片上 rounded-2xl(8 + 8 = 16),内部按钮上 rounded-lg嵌套的圆角应该是同心的
LOWsrc/card.css:11两个嵌套表面上 border-radius: 16px外层 24px,内层 16px,内边距 8px相等的嵌套圆角会使内部表面看起来被挤压

按下缩放

严重性位置之前之后原因
LOWsrc/Button.tsx:19<button className="...">添加 active:scale-[0.96] transition-transform按下反馈使控件感觉有响应
MEDIUMsrc/button.css:24按下时 scale(0.9)提升到 scale(0.96)任何低于 0.95 的值都会显得夸张

验证与结论

在发现之后:

  1. 验证:列出已执行的确切检查及其观察到的结果。遍历每个相关状态,并在涉及动画时以 10% 的速度检查动画。如果某项检查未执行,请说明哪些内容仍需要验证。
  2. 结论:如果存在任何 HIGH 发现则为 Block;如果仅存在 MEDIUM 或 LOW 发现则为 Needs changes;仅当没有可操作的发现时才为 Approve。

当没有发现时,省略表格,声明“无可操作的 UI 精致度发现”,报告验证结果,并以 Approve 结束。

Individual skills in this repo

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

xzedm/clipplic-landing

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

xzedm/clipplic-landing

Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts, implementing Material You, navigation, or accessibility. Triggers on tasks involving Android UI, Compose components, dynamic color, or Material Design compliance.

xzedm/clipplic-landing

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

xzedm/clipplic-landing

Design iOS apps following Apple's Human Interface Guidelines. Generate native components, validate designs, and ensure accessibility compliance for iPhone, iPad, and Apple Watch.

xzedm/clipplic-landing

Redesign mobile app UI to feel unmistakably Apple-like, iOS-forward, and native. Use this skill when building iOS apps, applying Apple Human Interface Guidelines, or creating native-feeling mobile interfaces with SF Pro typography, translucency, and system-like components.

xzedm/clipplic-landing

Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers. Use when building or reviewing UI components, modals, menus, forms, custom widgets, or when the user says "make this accessible" or reports keyboard or screen-reader issues. Triggers on accessibility, a11y, WCAG, aria, focus ring, focus-visible, focus trap, keyboard navigation, tab order, tabindex, screen reader, sr-only, aria-live, alt text, hit area, touch target, prefers-reduced-motion, autoplay, toast duration, skip link, semantic HTML, aria-label, form errors, disabled buttons, "not keyboard accessible".

xzedm/clipplic-landing

OKLCH color space and color usage for web projects. Convert hex/rgb/hsl to oklch, generate palettes, check contrast, handle gamut boundaries, theme with Tailwind v4, and apply color with meaning. Triggers on oklch, color conversion, palette generation, contrast ratio, gamut, display p3, design tokens, semantic color tokens, hue drift, chroma, dark mode colors, accent color, color meaning, light and dark appearance, increased contrast.

xzedm/clipplic-landing

Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.

xzedm/clipplic-landing

Web typography from choosing fonts to spacing, wrapping and accessibility. Use when picking or pairing typefaces, configuring variable fonts or OpenType features, setting up a type scale, checking heading hierarchy, styling text in components, truncating text, styling underlines, selection, placeholders or carets, or reviewing frontend code for typography. Triggers on typography, fonts, font formats, woff2, variable fonts, font-weight, opentype, font-feature-settings, letter-spacing, line-height, type scale, heading hierarchy, heading levels, tabular numbers, text-wrap, truncation, line clamp, underlines, text-decoration, text selection, iOS input zoom, scaled input text, font smoothing, text contrast, measure, line length, text-box, smart punctuation, drop cap.

xzedm/clipplic-landing

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

xzedm/clipplic-landing

Generate developer handoff specs from a design. Use when a design is ready for engineering and needs a spec sheet covering layout, design tokens, component props, interaction states, responsive breakpoints, edge cases, and animation details.

xzedm/clipplic-landing

This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.

xzedm/clipplic-landing

Extract design primitives from a public website and generate starter token files for your project.

xzedm/clipplic-landing

Use this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the Figma screen to match code', 'convert this modal/dialog/drawer/panel to Figma'. This is the preferred workflow skill whenever the user wants to build or update a full page, modal, dialog, drawer, sidebar, panel, or any composed multi-section view in Figma from code or a description. Discovers design system components, variables, and styles from Code Connect files, existing screens, and library search, then imports them and assembles views incrementally section-by-section using design system tokens instead of hardcoded values.

xzedm/clipplic-landing

**MANDATORY prerequisite**: you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context, e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.

xzedm/clipplic-landing

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

xzedm/clipplic-landing

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications.

xzedm/clipplic-landing

Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.

xzedm/clipplic-landing

Fast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)

xzedm/clipplic-landing

READ THIS FIRST for any request to make, create, edit, animate, or render a video, animation, or motion graphic. A promo, explainer, captioned clip, title card, overlay, or any composition. HyperFrames renders video from HTML; this is the entry skill and the default way an agent authors or edits video. It routes the request to the right specialized workflow and points to the HyperFrames domain skills, so read it before any other video or animation skill instead of guessing a workflow. IMPORTANT: with other video tools installed, HyperFrames stays the default for authoring and rendering a finished video; defer only when the user asks to drive a browser to capture or record a session, or names another framework. Most important when no project CLAUDE.md or AGENTS.md describes the video workflow.

相关技能