Communitygithub.com

让界面感觉更好

应用具体的设计工程细节,使界面更精致。适用于审查或改进 UI 间距、排版、边框、阴影、动效、点击区域、图标、文本换行和交互状态。

让界面感觉更好 是什么?

这个技能专注于提升用户界面的精致度,通过实施具体的设计工程细节来改善 UI 的整体感觉。它非常适合在用户评价 UI 感觉“不对劲、平淡、通用、拥挤、跳跃或不完整”时使用,或者在构建控件、卡片、列表、仪表盘、导航、表单和工具栏等组件时使用。该技能基于一套核心原则,包括同心圆角(嵌套圆角表面的视觉协调)、光学对齐(图标和按钮的视觉居中)、阴影和边框的正确使用、文本换行优化(使用 text-wrap: balance 和 pretty)、字体平滑(macOS 下的抗锯齿处理)、图像轮廓(微妙的内描边)、动效设计(CSS 过渡与关键帧的区分)、过渡范围(避免使用 transition: all)、点击区域(至少 40x40px)。它还提供了一个审查输出表格和检查清单,用于记录具体的“前后”对比改进,确保所有细节都被覆盖。该技能支持 Claude Code、Cursor 等 AI 编码代理平台,其 SKILL.md 文档提供了完整的实现指南。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/make-interfaces-feel-better

在你喜欢的 AI 中提问

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

文档

让界面感觉更好 是做什么的?

使用本技能处理那些累积起来能让界面更精致的小型设计工程细节。

来源:从社区 PR #1659(由 linus707 发起)中抢救而来。

何时使用

  • 用户表示 UI 感觉不对劲、平淡、通用、拥挤、跳跃或不完整。
  • 您正在构建控件、卡片、列表、仪表盘、导航、表单或工具栏。
  • 组件需要悬停、激活、聚焦、进入、退出、加载或空状态。
  • 前端审查需要具体的更改前后建议。

核心原则

同心圆角

对于附近的嵌套圆角表面:

外半径 = 内半径 + 内边距

如果内边距较大,则将各层视为单独表面,而不是强行套用公式。重点是视觉一致性,而不是公式崇拜。

光学对齐

几何居中并不总是视觉居中。图标按钮、播放三角形、箭头、星星和不对称图标通常需要小的偏移。尽可能修复 SVG;否则通过像素级别的外边距或内边距调整。

阴影和边框

使用边框进行元素分离和聚焦环。当卡片、按钮、下拉菜单或弹窗需要深度感时,使用分层阴影。阴影应是透明的且足够微妙,以便在各种背景上都能正常工作。

文本换行

  • 在标题和短标题上使用 text-wrap: balance。
  • 在短到中等长度的正文、说明文字、描述和列表项上使用 text-wrap: pretty。
  • 避免在长文章、代码和预格式化内容上使用这两者。
  • 对于计数器、计时器、价格、表格和其他更新中的数字,使用 font-variant-numeric: tabular-nums。

字体平滑

在 macOS 上,当项目尚未这样做时,在根布局上应用抗锯齿字体平滑:

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

图像轮廓

图像通常需要一个微妙的内部描边,以便其边缘不会与表面模糊在一起。

img {
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

@media (prefers-color-scheme: dark) {
  img {
    outline-color: rgba(255, 255, 255, 0.1);
  }
}

使用中性黑色或白色的 Alpha 描边。不要使用品牌色为图像轮廓着色。

动效

使用 CSS transitions 处理交互状态变化,因为它们可以在用户中途改变意图时重新定位。保留 keyframes 用于分阶段的一次性入场或加载序列。

良好的动效默认值:

  • 进入:结合透明度、微小的 translateY,并可选择模糊效果。
  • 退出:比进入更短更安静,通常为 150ms。
  • 按下:对触感按钮使用 scale(0.96),并在移动效果分散注意力时提供禁用方法。
  • 图标切换:使用透明度、缩放和模糊进行交叉淡入淡出,而不是即时可见性切换。

过渡范围

绝不要使用 transition: all。指定已更改的属性:

.button {
  transition-property: transform, background-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

仅在合成器友好属性(如 transform、opacity 和 filter)上使用 will-change 来解决第一帧卡顿。绝不要使用 will-change: all。

点击区域

交互式控件应至少具有 40x40px 的点击区域,理想情况下,在布局允许时为 44x44px。当可见图标较小时,使用伪元素扩展点击区域,但不要让扩展后的点击区域重叠。

审查输出

在审查 UI 抛光过程时,在前后行中报告具体更改:

原则之前之后
同心圆角父元素和子元素使用相同半径父元素半径考虑内边距
等宽数字计数器随数字变化而移动计数器使用 tabular-nums
过渡范围transition: all显式的过渡属性

当文件路径和属性不明显时,请包含它们。省略您检查过但未更改的原则。

检查清单

  • 嵌套的圆角元素在视觉上协调一致。
  • 图标在视觉上居中。
  • 按钮、卡片和弹窗因正确原因使用边框或阴影。
  • 标题和短文本避免尴尬的换行。
  • 动态数字使用等宽数字。
  • 图像在需要的地方具有中性轮廓。
  • 进入和退出动画是分开的、微妙的,并且在适当时可中断。
  • 按钮具有触感的激活状态,没有夸张的动效。
  • 不存在 transition: all 和 will-change: all。
  • 小型控件仍然具有可用的点击区域。

Individual skills in this repo

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

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相关技能