К основному содержанию
скилл CX Codex

interaction-patterns — скилл для Claude Code

Скилл interaction-patterns для Claude Code помогает выбирать паттерны взаимодействия в интерфейсе. Подключается при работе с загрузкой данных, пагинацией, оверлеями и уведомлениями.

MIT 160 установок ★ 305 обновлён 2026-11-14

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add yonatangross/orchestkit --skill interaction-patterns -a claude-code
Открыть на GitHub

Что делает interaction-patterns

Скилл описывает правила для состояний загрузки, бесконечной прокрутки, раскрытия сложных функций, модальных окон и перетаскивания. В наборе 10 правил: также есть рекомендации для вкладок, форм, уведомлений, когнитивной нагрузки и этики взаимодействия.

Правила задают выбор между скелетоном, спиннером и индикатором прогресса, а также варианты для модальных окон, боковых панелей и встроенных элементов. Для взаимодействий мышью нужны клавиатурные альтернативы; для списков с бесконечной прокруткой описаны объявления для скринридеров и кнопка «Загрузить ещё». В Claude Code требуется версия 2.1.277 или новее.

Какие задачи решает

  • выбрать состояние загрузки для списка или формы
  • добавить доступную бесконечную прокрутку
  • решить, где показать подтверждение: в окне или на странице
  • организовать перетаскивание с управлением клавиатурой
  • показать уведомления и обработать переполнение вкладок

Примеры запросов агенту

  • Подбери паттерн загрузки для списка карточек.
  • Добавь бесконечную прокрутку с поддержкой клавиатуры и скринридера.
  • Как лучше показать подтверждение действия: в модальном окне или прямо на странице?

Как установить interaction-patterns

1Через Skills CLI (Vercel)

npx skills add yonatangross/orchestkit --skill interaction-patterns -a claude-code

2Вручную: положить файлы

~/.claude/skills/interaction-patterns/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/interaction-patterns/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об interaction-patterns

Как установить interaction-patterns в Claude Code?

Выполни npx skills add yonatangross/orchestkit --skill interaction-patterns -a claude-code. Файл скилла появится по пути ~/.claude/skills/interaction-patterns/SKILL.md.

Что делает interaction-patterns?

Скилл содержит правила для загрузки контента, пагинации, оверлеев, перетаскивания, вкладок, форм и уведомлений. В правилах также рассматриваются доступность и этика взаимодействия.

Какие паттерны доступны для загрузки контента?

Для списков и карточек предлагаются скелетоны, для отправки формы — спиннер, для загрузки файла — индикатор прогресса. Для изображений описан размытый плейсхолдер.

Исходный текст

SKILL.md · MIT
---
name: interaction-patterns
license: MIT
compatibility: "Claude Code 2.1.277+."
description: "UI interaction patterns: skeleton loading, infinite scroll, progressive disclosure, modal/drawer/inline selection, drag-and-drop, tab overflow, toasts. Use when implementing loading states, pagination, overlays, reorderable lists, or notifications."
user-invocable: false
metadata:
  owner-agent: "frontend-ui-developer"
  category: document-asset-creation
  version: "1.0.0"
  author: "OrchestKit"
  complexity: "medium"
  tags: "interaction-design, skeleton-loading, infinite-scroll, progressive-disclosure, modal, drawer, drag-drop, tabs, toast, ux-patterns"
allowed-tools: "Read Glob Grep WebFetch WebSearch"
---

# 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

| Rule | File | Impact | When to Use |
|------|------|--------|-------------|
| Skeleton Loading | `rules/interaction-skeleton-loading.md` | HIGH | Content-shaped placeholders for async data |
| Infinite Scroll | `rules/interaction-infinite-scroll.md` | CRITICAL | Paginated content with a11y and keyboard support |
| Progressive Disclosure | `rules/interaction-progressive-disclosure.md` | HIGH | Revealing complexity based on user need |
| Modal / Drawer / Inline | `rules/interaction-modal-drawer-inline.md` | HIGH | Choosing overlay vs inline display patterns |
| Drag & Drop | `rules/interaction-drag-drop.md` | CRITICAL | Reorderable lists with keyboard alternatives |
| Tabs Overflow | `rules/interaction-tabs-overflow.md` | MEDIUM | Tab bars with 7+ items or dynamic tabs |
| Toast Notifications | `rules/interaction-toast-notifications.md` | HIGH | Success/error feedback and notification stacking |
| Cognitive Load Thresholds | `rules/interaction-cognitive-load-thresholds.md` | HIGH | Enforcing Miller's Law, Hick's Law, and Doherty Threshold with numeric limits |
| Form UX | `rules/interaction-form-ux.md` | HIGH | Target sizing, label placement, error prevention, and smart defaults |
| Persuasion Ethics | `rules/interaction-persuasion-ethics.md` | HIGH | Detecting dark patterns and applying ethical engagement principles |

**Total: 10 rules across 6 categories**

## Decision Table — Loading States

| Scenario | Pattern | Why |
|----------|---------|-----|
| List/card content loading | Skeleton | Matches content shape, reduces perceived latency |
| Form submission | Spinner | Indeterminate, short-lived action |
| File upload | Progress bar | Measurable operation with known total |
| Image loading | Blur placeholder | Prevents layout shift, progressive reveal |
| Route transition | Skeleton | Preserves layout while data loads |
| Background sync | None / subtle indicator | Non-blocking, low priority |

## Quick Start

### Skeleton Loading

```tsx
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

```tsx
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

| Resource | Description |
|----------|-------------|
| [references/loading-states-decision-tree.md](references/loading-states-decision-tree.md) | Decision tree for skeleton vs spinner vs progress bar |
| [references/interaction-pattern-catalog.md](references/interaction-pattern-catalog.md) | Catalog of 15+ interaction patterns with when-to-use guidance |
| [references/keyboard-interaction-matrix.md](references/keyboard-interaction-matrix.md) | Keyboard shortcuts matrix for all interactive patterns (WAI-ARIA APG) |

## Related Skills

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

© OrchestKit · MIT · yonatangross/orchestkit

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
interaction-patterns-components hueyexe Скилл interaction-patterns-components помогает агенту выбирать и критиковать UI-паттерны и переиспользуемые компоненты: навигация, таблицы, модалки, формы, состояния. CX Codex +1 622установок interaction-design aj-geddes Скилл interaction-design для Claude Code, Cursor и Codex помогает проектировать интерфейсы с анимациями, микровзаимодействиями и обратной связью. Запускается при работе над сценариями, переходами и загрузкой. CX Codex +1 511установок feedback-patterns Owl-Listener Скилл feedback-patterns для Claude Code и Codex: учит агента проектировать отклик системы на действие пользователя — тосты, индикаторы, бейджи и уведомления. Закрывает молчание интерфейса после нажатия. CX Codex +1 2 500установок screenshot-interaction-analyzer davila7 Субагент screenshot-interaction-analyzer для Claude Code, который читает скриншоты интерфейсов и описывает кликабельные элементы, навигацию, переходы состояний и пути взаимодействия пользователя. CX Codex 414установок micro-interaction-spec Owl-Listener Скилл micro-interaction-spec для Claude Code. Описывает микровзаимодействие целиком: триггер, правила, отклик, циклы и режимы. Готовит спецификацию для передачи в разработку. CX Codex +1 2 700установок interaction-reviewer ShuaiMXu Скилл interaction-reviewer для Claude Code проверяет сценарии взаимодействия и поведение элементов интерфейса. Находит лишние шаги, отсутствие отклика и небезопасные переходы состояний. CX Codex +1 ★ 529звёзд репо

Из того же набора86

Весь набор →
storybook-mcp-integration Скилл storybook-mcp-integration для Claude Code подключает инструменты Storybook MCP к работе с существующими компонентами. Агент ищет компоненты и их документацию, открывает предпросмотры и запускает тесты историй. CX Codex +1 166установок help Скилл help ищет установленный набор OrchestKit и показывает навыки по категориям. Запускается для выбора workflow или подходящего скилла. CX Codex +1 166установок business-case Скилл business-case считает ROI, NPV, IRR, срок окупаемости и TCO для инвестиционных решений. Запускается, когда агент собирает финансовое обоснование проекта или сравнивает build vs buy. CX Codex +1 162установок testing-e2e Скилл testing-e2e задаёт правила E2E-тестов на Playwright: выбор семантических локаторов, Page Objects и проверки axe-core. Включается при работе с тестами и playwright.config.*. CX Codex +1 160установок documentation-patterns Скилл documentation-patterns для Codex даёт шаблоны README, ADR, OpenAPI-документации и changelog. Помогает оформлять документацию проекта и записывать архитектурные решения. CX Codex +1 150установок okr-design Скилл okr-design для Claude Code помогает ставить цели и выбирать метрики успеха. Он подключается при работе с OKR, KPI и дизайном экспериментов. CX Codex +1 140установок figma-design-handoff Скилл figma-design-handoff для Claude Code помогает переносить макеты Figma в код и описывать компоненты. Включается при подготовке дизайн-токенов, разборе Dev Mode или сравнении интерфейса с макетом. CX Codex +1 136установок user-research Скилл user-research для структурированного исследования пользователей: персоны, карты пути, интервью, тестирование юзабилити и card sorting. Помогает понять, что нужно пользователям, и обоснованно проектировать продукт. CX Codex +1 134установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой