Skip to main content
skill CX Codex

interaction-design · secondsky — Claude Code skill: loading and error states

A skill for designing interface feedback: loading states, errors, empty screens, animation timing and accessibility. Useful when you need to plan how UI behaves, not just how it looks.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill interaction-design -a claude-code
Open on GitHub

What interaction-design does

The skill sets rules for interaction: how long a microinteraction, a transition or a list entrance should run, how to show a wait, and what to do when a request fails. It ships a duration table, a CSS skeleton loader, JSX components for error and empty states, and an accessibility section covering aria-live and prefers-reduced-motion.

Animations should stay under 500ms, with ease-out for entering and ease-in for exiting. Focus indicators must stay visible, and keyboard navigation needs testing. Those are the spots where interfaces usually break for keyboard users or anyone with reduced motion turned on.

Install with npx skills add secondsky/claude-skills --skill interaction-design -a claude-code; the file lands at ~/.claude/skills/interaction-design/SKILL.md. Codex, Cursor, Gemini CLI and OpenCode have their own install commands, and GitHub Copilot uses gh skill install. MIT licensed.

What it helps with

  • design loading states for slow requests
  • write an error screen with a retry button
  • make an empty list look intentional instead of broken
  • pick animation durations for a modal and a list entrance
  • announce state changes to screen readers

Example prompts for the agent

  • Design loading and error states for an orders list page
  • Pick animation durations for the modal and the card entrance
  • Check that the error screen works with keyboard navigation and screen readers

How to install interaction-design

1Skills CLI (Vercel)

npx skills add secondsky/claude-skills --skill interaction-design -a claude-code

2Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/interaction-design/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about interaction-design

How do I install interaction-design in Claude?

Run npx skills add secondsky/claude-skills --skill interaction-design -a claude-code. The skill file then sits at ~/.claude/skills/interaction-design/SKILL.md.

What does interaction-design do?

It covers interface feedback patterns: animation durations, loading, error and empty states, plus accessibility requirements such as aria-live and prefers-reduced-motion.

Which platforms does the skill support?

Beyond Claude there are install paths for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. GitHub Copilot uses a different command: gh skill install secondsky/claude-skills interaction-design.

Source text

SKILL.md · MIT
---
name: interaction-design
description: Creates intuitive user experiences through feedback patterns, microinteractions, and accessible interaction design. Use when designing loading states, error handling UX, animation guidelines, or touch interactions.
license: MIT
---

# Interaction Design

Create intuitive user experiences through thoughtful feedback and interaction patterns.

## Interaction Patterns

| Pattern | Duration | Use Case |
|---------|----------|----------|
| Microinteraction | 100-200ms | Button press, toggle |
| Transition | 200-400ms | Page change, modal |
| Entrance | 300-500ms | List items appearing |

## Loading States

```css
/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

```jsx
function LoadingState({ isLoading, children }) {
  if (isLoading) {
    return <div className="skeleton" style={{ height: 200 }} />;
  }
  return children;
}
```

## Error States

```jsx
function ErrorState({ error, onRetry }) {
  return (
    <div className="error-container" role="alert">
      <Icon name="warning" />
      <h3>Something went wrong</h3>
      <p>{error.message}</p>
      <button onClick={onRetry}>Try Again</button>
    </div>
  );
}
```

## Empty States

```jsx
function EmptyState({ title, description, action }) {
  return (
    <div className="empty-state">
      <Illustration name="empty-inbox" />
      <h3>{title}</h3>
      <p>{description}</p>
      {action && <button onClick={action.onClick}>{action.label}</button>}
    </div>
  );
}
```

## Accessibility

```jsx
// Announce state changes to screen readers
function StatusAnnouncer({ message }) {
  return (
    <div aria-live="polite" aria-atomic="true" className="sr-only">
      {message}
    </div>
  );
}

// Respect motion preferences
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
```

## Animation Guidelines

- Keep animations under 500ms (longer feels sluggish)
- Use ease-out for entering, ease-in for exiting
- Respect `prefers-reduced-motion`
- Ensure focus indicators are always visible
- Test with keyboard navigation

## Best Practices

- Provide immediate feedback for all actions
- Show loading states for waits >0.5s
- Include clear error messages with recovery options
- Design meaningful empty states
- Support keyboard navigation

© secondsky · MIT · secondsky/claude-skills

Similar skills

Everything for Design →

interaction-design by other authors comes first.

interaction-design Seth Hobson This skill helps design microinteractions, transitions, and feedback states. Use it when polishing a UI or building loading and gesture patterns. CX Codex 16,146installs interaction-design aj-geddes A skill for designing interactions: animations, loading and error states, feedback on touch. Useful when the interface works but feels flat. CX Codex +1 505installs design-better BuilderOS A skill that pushes any coding agent toward designer-quality frontend work: hierarchy, states, accessibility, motion. Useful when the UI runs fine but still looks unfinished. CX Codex +1 1,100installs interaction-patterns-components hueyexe Guides the agent through picking and critiquing UI interaction patterns and reusable components: navigation, tables, modals, forms, states. CX Codex +1 539installs micro-interaction-spec Owl-Listener Specifies one micro-interaction end to end: trigger, rules, feedback, loops and modes. Useful when a single interaction goes to engineering. CX Codex +1 2,300installs animation-micro-interaction-pack patricio0312rev A set of reusable motion patterns for interfaces: hover effects, entrances and exits, gesture feedback. Useful when a UI feels static and you want it to move without hand-tuning timings. CX Codex +1 499installs impeccable pbakaus A skill for your coding agent that designs and reworks interfaces: landing pages, dashboards, forms, iOS and Android screens. Useful when the UI needs real design decisions, not guesswork. CX Codex +1 361,300installs uizze-ui UIZZE Guides the agent through layout fixes, typography adjustments, and UI state handling. Helpful when improving component hierarchy using existing project tokens. CX Codex +1 144,000installs

From the same set89

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor