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.
npx skills add secondsky/claude-skills --skill interaction-design -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/interaction-design/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/interaction-design/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill interaction-design -a codex2Manually: put the files in place
.agents/skills/interaction-design/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill interaction-design -a cursor2Manually: put the files in place
.cursor/skills/interaction-design/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills interaction-design2Manually: put the files in place
.github/skills/interaction-design/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill interaction-design -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/interaction-design/skills/interaction-designManually: put the files in place
.devin/skills/interaction-design/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill interaction-design -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.