Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

interaction-patterns交互模式

Agent Skill

interaction-patterns 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,983

周安装

81

GitHub Stars

160

下载量

635
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill interaction-patterns

简介

用于处理前端交互模式相关的协作与开发事务。

  • 适合围绕代码变更和 Issue 进行进度跟踪。
  • 可结合原始文档了解典型交互范式示例。interaction-patterns 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 安装前建议确认宿主环境支持 DOM 操作方式。
  • 注意移动端与桌面端交互逻辑可能存在差异。

SKILL.md

Interaction Patterns

Codifiable UI interaction patterns that prevent common UX failures. Covers loading states, content pagination, disclosure patterns, overlays, drag-and-drop, tab overflow, and notification systems — all with accessibility baked in.

Quick Reference

RuleFileImpactWhen to Use
Skeleton Loadingrules/interaction-skeleton-loading.mdHIGHContent-shaped placeholders for async data
Infinite Scrollrules/interaction-infinite-scroll.mdCRITICALPaginated content with a11y and keyboard support
Progressive Disclosurerules/interaction-progressive-disclosure.mdHIGHRevealing complexity based on user need
Modal / Drawer / Inlinerules/interaction-modal-drawer-inline.mdHIGHChoosing overlay vs inline display patterns
Drag & Droprules/interaction-drag-drop.mdCRITICALReorderable lists with keyboard alternatives
Tabs Overflowrules/interaction-tabs-overflow.mdMEDIUMTab bars with 7+ items or dynamic tabs
Toast Notificationsrules/interaction-toast-notifications.mdHIGHSuccess/error feedback and notification stacking
Cognitive Load Thresholdsrules/interaction-cognitive-load-thresholds.mdHIGHEnforcing Miller's Law, Hick's Law, and Doherty Threshold with numeric limits
Form UXrules/interaction-form-ux.mdHIGHTarget sizing, label placement, error prevention, and smart defaults
Persuasion Ethicsrules/interaction-persuasion-ethics.mdHIGHDetecting dark patterns and applying ethical engagement principles

Total: 10 rules across 6 categories

Decision Table — Loading States

ScenarioPatternWhy
List/card content loadingSkeletonMatches content shape, reduces perceived latency
Form submissionSpinnerIndeterminate, short-lived action
File uploadProgress barMeasurable operation with known total
Image loadingBlur placeholderPrevents layout shift, progressive reveal
Route transitionSkeletonPreserves layout while data loads
Background syncNone / subtle indicatorNon-blocking, low priority

Quick Start

Skeleton Loading

function CardSkeleton() {
  return (
    <div className="animate-pulse space-y-3">
      <div className="h-48 w-full rounded-lg bg-muted" />
      <div className="h-4 w-3/4 rounded bg-muted" />
      <div className="h-4 w-1/2 rounded bg-muted" />
    </div>
  )
}

function CardList({ items, isLoading }: { items: Item[]; isLoading: boolean }) {
  if (isLoading) {
    return (
      <div className="grid grid-cols-3 gap-4">
        {Array.from({ length: 6 }).map((_, i) => (
          <CardSkeleton key={i} />
        ))}
      </div>
    )
  }
  return (
    <div className="grid grid-cols-3 gap-4">
      {items.map((item) => <Card key={item.id} item={item} />)}
    </div>
  )
}

Infinite Scroll with Accessibility

function InfiniteList({ fetchNextPage, hasNextPage, items }: Props) {
  const sentinelRef = useRef<HTMLDivElement>(null)

  useEffect(() => {
    const observer = new IntersectionObserver(
      ([entry]) => { if (entry.isIntersecting && hasNextPage) fetchNextPage() },
      { rootMargin: "200px" }
    )
    if (sentinelRef.current) observer.observe(sentinelRef.current)
    return () => observer.disconnect()
  }, [fetchNextPage, hasNextPage])

  return (
    <div role="feed" aria-busy={isFetching}>
      {items.map((item) => (
        <article key={item.id} aria-posinset={item.index} aria-setsize={-1}>
          <ItemCard item={item} />
        </article>
      ))}
      <div ref={sentinelRef} />
      {hasNextPage && (
        <button onClick={() => fetchNextPage()}>Load more items</button>
      )}
      <div aria-live="polite" className="sr-only">
        {`Showing ${items.length} items`}
      </div>
    </div>
  )
}

Rule Details

Skeleton Loading

Content-shaped placeholders that match the final layout. Use skeleton for lists, cards, and text blocks.

Load: rules/interaction-skeleton-loading.md

Infinite Scroll

Accessible infinite scroll with IntersectionObserver, screen reader announcements, and "Load more" fallback.

Load: rules/interaction-infinite-scroll.md

Progressive Disclosure

Reveal complexity progressively: tooltip, accordion, wizard, contextual panel.

Load: rules/interaction-progressive-disclosure.md

Modal / Drawer / Inline

Choose the right overlay pattern: modal for confirmations, drawer for detail views, inline for simple toggles.

Load: rules/interaction-modal-drawer-inline.md

Drag & Drop

Drag-and-drop with mandatory keyboard alternatives using @dnd-kit/core.

Load: rules/interaction-drag-drop.md

Tabs Overflow

Scrollable tab bars with overflow menus for dynamic or numerous tabs.

Load: rules/interaction-tabs-overflow.md

Toast Notifications

Positioned, auto-dismissing notifications with ARIA roles and stacking.

Load: rules/interaction-toast-notifications.md

Cognitive Load Thresholds

Miller's Law (max 7 items per group), Hick's Law (max 1 primary CTA), and Doherty Threshold (400ms feedback) with specific, countable limits.

Load: rules/interaction-cognitive-load-thresholds.md

Form UX

Fitts's Law touch targets (44px mobile), top-aligned labels, Poka-Yoke error prevention with blur-only validation, and smart defaults.

Load: rules/interaction-form-ux.md

Persuasion Ethics

13 dark pattern red flags to detect and reject, the Hook Model ethical test (aware, reversible, user-benefits), and EU DSA Art. 25 compliance.

Load: rules/interaction-persuasion-ethics.md

Key Principles

  1. Keyboard parity — Every mouse interaction MUST have a keyboard equivalent. No drag-only, no hover-only.
  2. Skeleton over spinner — Use content-shaped placeholders for data loading; reserve spinners for indeterminate actions.
  3. Native HTML first — Prefer <dialog>, <details>, role="feed" over custom implementations.
  4. Progressive enhancement — Features should work without JS where possible, then enhance with interaction.
  5. Announce state changes — Use aria-live regions to announce dynamic content changes to screen readers.
  6. Respect scroll position — Back navigation must restore scroll position; infinite scroll must not lose user's place.

Anti-Patterns (FORBIDDEN)

  • Spinner for content loading — Spinners give no spatial hint. Use skeletons matching the content shape.
  • Infinite scroll without Load More — Screen readers and keyboard users cannot reach footer content. Always provide a button fallback.
  • Modal for browsable content — Modals trap focus and block interaction. Use drawers or inline expansion for browsing.
  • Drag-only reorder — Excludes keyboard and assistive tech users. Always provide arrow key + Enter alternatives.
  • Toast without ARIA role — Toasts are invisible to screen readers. Use role="status" for success, role="alert" for errors.
  • Auto-dismiss error toasts — Users need time to read errors. Never auto-dismiss error notifications.

Detailed Documentation

ResourceDescription
references/loading-states-decision-tree.mdDecision tree for skeleton vs spinner vs progress bar
references/interaction-pattern-catalog.mdCatalog of 15+ interaction patterns with when-to-use guidance
references/keyboard-interaction-matrix.mdKeyboard shortcuts matrix for all interactive patterns (WAI-ARIA APG)

Related Skills

  • ork:ui-components — shadcn/ui component patterns and CVA variants
  • ork:animation-motion-design — Motion library and View Transitions API
  • ork:accessibility — WCAG compliance, ARIA patterns, screen reader support
  • ork:responsive-patterns — Responsive layout and container query patterns
  • ork:performance — Core Web Vitals and runtime performance optimization

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.79%
按下载量换算208

Claude

31.1%
按下载量换算197

Cursor

19.67%
按下载量换算125

Gemini CLI

9.09%
按下载量换算58

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills