Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

interaction-design交互设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

220

周安装

9

GitHub Stars

12

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:interaction-design(交互设计)
来源仓库:https://github.com/claude-dev-suite/claude-dev-suite
仓库路径:skills/interaction-design
安装命令:
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill interaction-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill interaction-design

简介

interaction-design 用于辅助界面设计、视觉规范、排版、配色和交互体验优化,适合让 Agent 生成 UI 方案或改进组件层级。

  • 它提供动画时长参考、布局建议和响应式设计指导,帮助提升产品的视觉一致性和用户体验。
  • 使用时需结合现有品牌、设计系统和用户任务,不应只堆砌装饰元素;涉及页面改动时应通过截图或浏览器预览检查表现。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Interaction Design

Animation Timing Reference

Research-backed durations. The most common mistake is animations that are too slow.

Interaction typeDurationEasingNotes
Hover state change80–120msease-outOpacity, color, shadow
Focus ring80msease-outShould feel instant
Tap/click feedback80–100msease-outScale or opacity pulse
Toggle (checkbox, switch)150msease-in-outState change
Dropdown open150–200msease-outEntering
Dropdown close100–150msease-inExiting — faster than entering
Modal/dialog open200–250msease-outEntering
Modal/dialog close150–200msease-inExiting
Toast notification200–300ms in, 150ms outease-out / ease-in
Page transition300–400msease-in-outMax for page-level
Hard limit500msNever exceed; users feel it as lag

Easing rules:

  • ease-out (cubic-bezier(0, 0, 0.2, 1)): For elements entering the screen — starts fast, decelerates. Feels responsive.
  • ease-in (cubic-bezier(0.4, 0, 1, 1)): For elements leaving — starts slow, accelerates. Feels natural.
  • ease-in-out (cubic-bezier(0.4, 0, 0.2, 1)): For elements transforming within the screen.
  • Never use linear for UI — looks mechanical.
:root {
  --ease-out:     cubic-bezier(0, 0, 0.2, 1);
  --ease-in:      cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);

  --duration-fast:    100ms;
  --duration-normal:  200ms;
  --duration-slow:    300ms;
}

prefers-reduced-motion (SAFETY-CRITICAL)

Parallax, large-scale animations, and auto-playing effects can cause nausea, dizziness, and seizures in users with vestibular disorders. This is a safety concern, not just a preference.

/* Global reduced-motion reset — add to your base CSS */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

For animations that serve a purpose (progress feedback), provide a reduced alternative:

.spinner {
  animation: spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    /* Show a static indicator instead */
    opacity: 0.5;
  }
}

In React/Tailwind:

import { useReducedMotion } from "@/hooks/use-reduced-motion";

function AnimatedModal({ children }: { children: React.ReactNode }) {
  const reduced = useReducedMotion();
  return (
    <div
      className={cn(
        "transition-all",
        reduced ? "duration-0" : "duration-200 ease-out"
      )}
    >
      {children}
    </div>
  );
}

// Hook
function useReducedMotion() {
  return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
}

Loading States Decision Matrix

ScenarioBest patternAvoid
Page / section loadSkeleton screenSpinner
Button action (fast, low-risk)Optimistic UIBlocking overlay
Button action (uncertain outcome)Loading spinner on buttonFull-page overlay
Background data fetchNo indicatorSpinner
File uploadProgress barSpinner
Long operation (>3s)Progress bar + estimated timeSpinner

Skeleton screens feel 20–30% faster than spinners for the same wait time. They set layout expectations and eliminate "jumping" content.

Skeleton screen pattern (Tailwind)

function Skeleton({ className }: { className?: string }) {
  return (
    <div
      className={cn("animate-pulse rounded-md bg-muted", className)}
      aria-hidden="true"
    />
  );
}

// Usage — mirror the actual layout
function CardSkeleton() {
  return (
    <div className="rounded-lg border p-4 space-y-3">
      <div className="flex items-center gap-3">
        <Skeleton className="h-10 w-10 rounded-full" />
        <div className="space-y-1.5 flex-1">
          <Skeleton className="h-4 w-3/4" />
          <Skeleton className="h-3 w-1/2" />
        </div>
      </div>
      <Skeleton className="h-20 w-full" />
      <Skeleton className="h-4 w-2/3" />
    </div>
  );
}

Optimistic UI pattern

function useLikePost(postId: string) {
  const [liked, setLiked] = useState(false);

  async function toggleLike() {
    // 1. Update UI immediately (optimistic)
    setLiked((prev) => !prev);
    try {
      // 2. Sync with server
      await api.toggleLike(postId);
    } catch {
      // 3. Revert on error
      setLiked((prev) => !prev);
      toast.error("Failed to update. Please try again.");
    }
  }

  return { liked, toggleLike };
}

Use optimistic UI for: liking, bookmarking, toggling settings, marking items complete. Not suitable for: payments, deletions, irreversible actions.


CLS Prevention (Cumulative Layout Shift)

Target: CLS < 0.1 (Google Core Web Vitals "Good" threshold).

60% of CLS is caused by images without dimensions.

/* Always reserve space for images */
.image-wrapper {
  aspect-ratio: 16 / 9;        /* reserves correct proportional space */
  background-color: hsl(var(--muted));
  overflow: hidden;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Responsive images without CLS */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
<!-- Always include width + height -->
<img src="hero.jpg" width="1200" height="630" alt="..." loading="lazy" />

For dynamic content (ads, async components), reserve fixed space:

.ad-slot { min-height: 250px; }
.async-card { min-height: 120px; }

Form UX Patterns

Research: Single-column layouts complete 15.4% faster than multi-column. Removing one optional field at Expedia increased annual revenue by $12M.

Core rules

RuleCorrectAvoid
Label positionAbove the fieldPlaceholder as label (disappears on focus)
Validation timingOn blur (when user leaves field)On every keystroke
Error placementBelow the field, immediatelyTop of form only
Error language"Enter a valid email address""Invalid input"
Required fieldsMark optional fields instead (fewer to mark)Mark every required field with *

Accessible form pattern

function FormField({
  id,
  label,
  error,
  children,
}: {
  id: string;
  label: string;
  error?: string;
  children: React.ReactNode;
}) {
  return (
    <div className="space-y-1.5">
      <label htmlFor={id} className="text-sm font-medium text-foreground">
        {label}
      </label>
      {/* Clone child with aria props */}
      {React.cloneElement(children as React.ReactElement, {
        id,
        "aria-describedby": error ? `${id}-error` : undefined,
        "aria-invalid": error ? true : undefined,
        className: cn((children as React.ReactElement).props.className,
          error && "border-destructive focus-visible:ring-destructive"
        ),
      })}
      {error && (
        <p id={`${id}-error`} className="text-sm text-destructive" role="alert">
          {error}
        </p>
      )}
    </div>
  );
}

Mobile UX — Touch Targets & Thumb Zones

Touch target sizes

ElementMinimum (CSS)RecommendedNotes
Primary button44×44px48×48pxFull-width on mobile is ideal
Icon button44×44px tap area48×48pxUse padding to expand tap area
Link in text24px heightIncrease paddingHard to tap in running text
List item44px height48pxAdd py-3 minimum
Input field44px height48pxAvoid small inputs
/* Expand tap area without changing visual size */
.icon-button {
  position: relative;
  padding: 12px;  /* 48px total for a 24px icon */
}

/* Or use the ::after pseudo-element */
.small-tap-target::after {
  content: "";
  position: absolute;
  inset: -8px;
}

Thumb zones (one-handed use)

┌─────────────────────┐
│  ✗ Hard to reach    │  ← Top corners, especially top-right
│─────────────────────│
│  ~ Stretch zone     │  ← Middle of screen, slight reach
│─────────────────────│
│  ✓ Natural zone     │  ← Bottom 40% — thumb reaches easily
│  ✓✓ Primary zone   │  ← Bottom bar — most comfortable
└─────────────────────┘

Decisions based on thumb zones:

  • Primary actions (CTA, submit): bottom third
  • Navigation: bottom bar over hamburger menu
  • Destructive actions: middle or top (requires deliberate reach)
  • Secondary actions: anywhere, but avoid top-right corner

Bottom navigation vs hamburger

MetricBottom nav (visible)Hamburger (hidden)
Engagement1.5x higherBaseline
DiscoverabilityHigh20% lower
With labels+75% engagement vs. icon-only

Use bottom navigation for 3–5 primary destinations. For 6+ items, use a hybrid (bottom bar for top 4–5, slide-out drawer for the rest).


Dark Pattern Quick Reference

2024 FTC sweep: 76% of apps use at least one dark pattern. Risk: FTC enforcement, EU EAA, state law violations.

Dark patternWhat it doesEthical alternative
Roach motelEasy to subscribe, impossible to cancelCancel in the same number of steps as subscribe
Hidden costsFees revealed only at checkoutShow total price from first interaction
Confirm-shaming"No, I hate saving money"Neutral language: "No thanks" or "Remind me later"
MisdirectionPrimary/secondary button styling reversed for destructive actionDestructive = outlined/ghost; Constructive = filled
Forced continuityAuto-renewal without clear noticeEmail 7 days before renewal with easy cancel link
Privacy mazeOpt-out buried in settings → settings → advancedToggle on the same page as consent was given

Related Skills

  • styling/tailwindcss — Tailwind animation utilities (animate-pulse, transitions)
  • accessibility/wcag — focus management in modals/dialogs
  • best-practices/performance — Core Web Vitals and CLS measurement
  • ux/visual-hierarchy — typography and spacing foundations
  • ux/design-systems — animation tokens (duration, easing variables)

Deep Knowledge

Load via mcp__documentation__fetch_docs:

  • ux-interaction-design — extended animation research, microinteraction patterns, loading state psychology
  • ux-mobile — thumb zone research data, touch target guidelines, navigation pattern studies
  • ux-forms — form conversion research, validation UX studies, accessible error pattern library
  • ux-ethical-design — full dark pattern catalog, FTC/EU EAA legal context

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.58%
按下载量换算25

Claude

31.56%
按下载量换算22

Cursor

19.16%
按下载量换算14

Gemini CLI

8.3%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills