Token导航 LogoToken导航

Agent Skill · 前端设计

interaction-physics(相互作用物理学)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

interaction-physics 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,528。

总安装 1,273周安装 52GitHub Stars 21下载 412核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sanky369/vibe-building-skills --skill interaction-physics

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等代码,整理组件结构或定位布局问题。需结合项目现有设计系统、路由和构建方式,避免生成孤立片段;涉及页面改动时应配合本地预览检查视觉效果。

安装命令:npx skills add https://github.com/sanky369/vibe-building-skills --skill interaction-physics。建议确认权限范围和维护状态,避免触发不必要的联网或文件读写操作。

来源仓库内路径:skills/interaction-physics

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sanky369/vibe-building-skills --skill interact…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

interaction-physics 怎么安装?

在终端执行 npx skills add https://github.com/sanky369/vibe-building-skills --skill interaction-physic…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

interaction-physics 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

interaction-physics 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

interaction-physics 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

interaction-physics 用的人多吗?

公开数据是累计安装 1,273 次,近一周安装 52 次,下载 412 次,GitHub 21 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

interaction-physics 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
interaction-physics

相互作用物理学 · 本页

1,27321只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Interaction Design

Overview

Interactions are the moments when your interface comes alive. They're the transitions between states, the feedback when users take action, the animations that guide attention. When done well, interactions are invisible—they feel natural and right. When done poorly, they distract or confuse.

This skill teaches you to think about interactions systematically: understanding animation principles, designing intentional microinteractions, providing clear feedback, and ensuring performance and accessibility.

Core Methodology: Microinteractions

A microinteraction is a small, contained interaction that accomplishes a specific task. Examples: button hover state, form validation feedback, loading spinner, success notification, menu open/close.

The Anatomy of a Microinteraction

Every microinteraction has four parts:

  1. Trigger — What initiates the interaction? (user action, system event, time-based)
  2. Rules — What happens as a result? (what animates, what changes, how long)
  3. Feedback — What does the user see/hear? (animation, sound, haptic)
  4. Loops & Modes — Does it repeat? Can it be interrupted?

Example: Button Hover State

Trigger: User hovers over button
Rules:
  - Background color changes to darker shade
  - Duration: 200ms
  - Easing: ease-out
Feedback:
  - Visual: background color transition
  - Indicates: button is interactive
Loops & Modes:
  - Repeats on every hover
  - Can be interrupted by click or mouse leave

Designing Intentional Microinteractions

Principle 1: Provide Feedback Every user action should result in visible feedback. Users need to know their action was registered.

Principle 2: Guide Attention Use animation to guide users' attention to important elements.

Principle 3: Communicate State Use animation to communicate state changes (loading, success, error, etc.).

Principle 4: Delight Without Distraction Add personality and delight, but don't distract from the task.

Animation Principles

Principle 1: Timing

Timing is critical. Too fast and the animation feels abrupt. Too slow and it feels sluggish.

General Guidelines:

  • UI Feedback (hover, focus, state change): 150-250ms
  • Transitions (page changes, modal open/close): 300-500ms
  • Attention-Grabbing (alerts, notifications): 500-1000ms
  • Loading (spinners, progress bars): 1-2 seconds or continuous
/* UI Feedback - Fast */
button {
  transition: background-color 200ms ease-out;
}

/* Transitions - Medium */
.modal {
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

/* Loading - Slower */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

Principle 2: Easing

Easing functions control how an animation accelerates and decelerates. Different easing functions convey different meanings.

Common Easing Functions:

EasingMeaningUse Case
linearConstant speedContinuous, mechanical (spinners, progress bars)
ease-inSlow start, fast endExiting, dismissing
ease-outFast start, slow endEntering, appearing, most interactions
ease-in-outSlow start and endSmooth, natural transitions
cubic-bezier(0.34, 1.56, 0.64, 1)Elastic, bouncyPlayful, attention-grabbing
/* UI Feedback - ease-out (most common) */
button {
  transition: background-color 200ms ease-out;
}

/* Entering - ease-out */
.modal {
  animation: slideIn 400ms ease-out;
}

/* Exiting - ease-in */
.modal.closing {
  animation: slideOut 300ms ease-in;
}

/* Continuous - linear */
.spinner {
  animation: spin 1s linear infinite;
}

/* Playful - cubic-bezier */
.bounce {
  animation: bounce 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

Principle 3: Distance

The distance an element moves affects how long the animation should take. Larger distances need longer durations.

/* Small movement - short duration */
button:hover {
  transform: scale(1.05);
  transition: transform 150ms ease-out;
}

/* Medium movement - medium duration */
.modal {
  animation: slideIn 400ms ease-out;
}
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Large movement - longer duration */
.page-transition {
  animation: fadeIn 600ms ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

Common Microinteractions

Microinteraction 1: Button States

/* Default state */
button {
  background-color: var(--color-primary);
  color: white;
  transition: background-color 200ms ease-out;
}

/* Hover state */
button:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
}

/* Active state */
button:active:not(:disabled) {
  background-color: var(--color-primary-darker);
  transform: scale(0.98);
}

/* Focus state */
button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Disabled state */
button:disabled {
  background-color: var(--color-disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Loading state */
button.loading {
  pointer-events: none;
  opacity: 0.8;
}

button.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

Microinteraction 2: Form Validation

/* Input default state */
input {
  border: 1px solid var(--color-border);
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

/* Input focus state */
input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Input valid state */
input.valid {
  border-color: var(--color-success);
}

input.valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Input error state */
input.error {
  border-color: var(--color-error);
}

input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Error message animation */
.error-message {
  animation: slideDown 300ms ease-out;
  color: var(--color-error);
  font-size: 14px;
  margin-top: 4px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

Microinteraction 3: Loading States

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-skeleton) 0%,
    var(--color-skeleton-light) 50%,
    var(--color-skeleton) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background-color: var(--color-border);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-primary);
  transition: width 300ms ease-out;
}

Microinteraction 4: Notifications

/* Notification container */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 300ms ease-out;
  z-index: 1000;
}

/* Notification variants */
.notification.success {
  border-left: 4px solid var(--color-success);
}

.notification.error {
  border-left: 4px solid var(--color-error);
}

.notification.warning {
  border-left: 4px solid var(--color-warning);
}

/* Notification exit animation */
.notification.exiting {
  animation: slideOut 300ms ease-in forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

Microinteraction 5: Transitions Between Pages

/* Page fade transition */
.page {
  animation: fadeIn 400ms ease-out;
}

.page.exiting {
  animation: fadeOut 300ms ease-in forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Page slide transition */
.page {
  animation: slideIn 400ms ease-out;
}

.page.exiting {
  animation: slideOut 300ms ease-in forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

Performance Considerations

Use GPU-Accelerated Properties

Animate properties that are GPU-accelerated for smooth performance:

Good (GPU-accelerated):

  • transform (translate, rotate, scale)
  • opacity

Avoid (CPU-intensive):

  • left, top, width, height
  • background-color (unless necessary)
  • box-shadow
/* Good - GPU-accelerated */
button:hover {
  transform: scale(1.05);
  transition: transform 200ms ease-out;
}

/* Avoid - CPU-intensive */
button:hover {
  width: 110px;
  height: 110px;
  transition: width 200ms ease-out, height 200ms ease-out;
}

Reduce Motion for Users Who Prefer It

Respect the prefers-reduced-motion media query:

/* Default animations */
button {
  transition: background-color 200ms ease-out;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

Accessibility Considerations

1. Provide Non-Animation Feedback

Don't rely on animation alone for feedback. Combine with color, text, or icons.

/* Bad - only animation */
button:hover {
  transform: scale(1.1);
}

/* Good - animation + color change */
button:hover {
  background-color: var(--color-primary-dark);
  transform: scale(1.05);
}

2. Ensure Keyboard Navigation

Interactions should work with keyboard navigation:

/* Hover state for mouse users */
button:hover {
  background-color: var(--color-primary-dark);
}

/* Focus state for keyboard users */
button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  background-color: var(--color-primary-dark);
}

3. Avoid Motion Sickness

Avoid rapid, flashing, or disorienting animations:

/* Bad - rapid flashing */
.alert {
  animation: flash 100ms infinite;
}

/* Good - subtle, slow animation */
.alert {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

How to Use This Skill with Claude Code

Audit Your Interactions

"I'm using the interaction-design skill. Can you audit my interactions?
- Identify microinteractions that are missing
- Check animation timing and easing
- Identify performance issues (CPU-intensive animations)
- Check accessibility (reduced motion, keyboard navigation)
- Suggest improvements"

Design Microinteractions

"Can you help me design microinteractions for:
- Button states (hover, active, disabled, loading)
- Form validation feedback
- Loading states
- Success/error notifications
- Page transitions"

Implement Animations

"Can you implement animations for:
- Button hover and active states
- Modal open/close
- Page transitions
- Loading spinner
- Notification entrance/exit
Include timing, easing, and accessibility considerations"

Optimize Animation Performance

"Can you optimize my animations for performance?
- Identify CPU-intensive animations
- Suggest GPU-accelerated alternatives
- Check for unnecessary animations
- Ensure smooth 60fps performance"

Design Critique: Evaluating Your Interactions

Claude Code can critique your interactions:

"Can you evaluate my interactions?
- Are my animations intentional and purposeful?
- Is my timing appropriate?
- Are my easing functions right?
- Are my interactions accessible?
- What's one thing I could improve immediately?"

Integration with Other Skills

  • design-foundation — Animation tokens and timing
  • component-architecture — Interactions in components
  • accessibility-excellence — Accessible interactions
  • layout-system — Transitions between layouts

Key Principles

1. Animation Should Have Purpose Every animation should serve a purpose: provide feedback, guide attention, or communicate state.

2. Timing Matters Appropriate timing makes animations feel natural. Too fast or too slow feels wrong.

3. Easing Conveys Meaning Different easing functions convey different meanings (ease-out for entering, ease-in for exiting).

4. Performance is Critical Smooth animations require GPU-accelerated properties and careful performance optimization.

5. Accessibility is Essential Respect user preferences for reduced motion and provide non-animation feedback.

Checklist: Is Your Interaction Design Ready?

  • All user actions provide visible feedback
  • Animation timing is appropriate (150-250ms for UI feedback)
  • Easing functions are intentional (ease-out for entering, ease-in for exiting)
  • Animations use GPU-accelerated properties (transform, opacity)
  • Reduced motion preferences are respected
  • Keyboard navigation works well
  • Non-animation feedback is provided (color, text, icons)
  • Loading states are clear and communicative
  • Error states are clear and helpful
  • Success states are clear and satisfying
  • Page transitions are smooth and intentional

Intentional, delightful interactions transform a functional product into one that feels loved.

平台分布

Claude Code

30.97%
按下载量换算128

Codex

25%
按下载量换算103

Gemini CLI

17.8%
按下载量换算73

OpenCode

12.75%
按下载量换算53

Antigravity

7.02%
按下载量换算29

trae

3.8%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills