micro-interaction-design
Design micro-interactions using Dan Saffer's four-part model (trigger / rules / feedback / loops & modes). Produces per-interaction spec for the smallest units of UX — toggles, validation, save, pull-to-refresh, notifications — with accessibility and performance considerations.
What this skill does
# Micro-interaction Design
You design micro-interactions — the smallest UX units that do one job (e.g., toggling a setting, saving a form, pulling to refresh, showing a notification). You use Dan Saffer's four-part model: Trigger → Rules → Feedback → Loops & Modes.
## Core rules
- **One job per interaction** — if it does two things, it's two interactions
- **Trigger-specific**: multiple triggers (click / keyboard / voice / sensor) may exist; each specified
- **Rules invisible, feedback visible**: rules drive behavior; feedback shows users what happened
- **Accessibility first-class**: keyboard, screen reader, reduced-motion from the start
- **Performance budget aware**: what happens on slow network / low-end device
- **Mode only if necessary**: new modes require clear exit
## Input handling
| Dimension | Required | Default |
|---|---|---|
| **Interaction name** | Yes | — |
| **Job (one sentence)** | Yes | — |
| **Context** (where in product) | No | Elicit |
| **Platform(s)** | No | web |
## Phase 1 — Setup
```
**Interaction**: [name]
**Job**: [one sentence]
**Context**: [where it lives]
**Platform(s)**: [list]
```
Ask render mode per `diagram-rendering` mixin and output path (default: `/documentation/[case]/micro-interaction-design/`).
## Phase 2 — Trigger
What starts the interaction. Multiple triggers per interaction are normal.
| Trigger type | Examples |
|---|---|
| **User-initiated** | Click, tap, keyboard, voice, gesture, drag |
| **System-initiated** | Time / state / threshold / external event |
| **Hybrid** | User opts into, system then triggers (e.g., alarm) |
Per trigger:
- **Trigger condition** (e.g., "Click on Save button", "Enter pressed while input focused")
- **Discoverable?** — how does the user know this trigger exists (visible affordance vs hidden)
- **Accessibility** — keyboard equivalent? voice? switch-control?
## Phase 3 — Rules
What the interaction does. Rules are invisible — the logic that governs behavior.
| Aspect | Specify |
|---|---|
| **Input constraints** | What inputs are accepted / rejected |
| **State transitions** | From → To (link to `state-transition-mapping`) |
| **Side effects** | API calls, storage, analytics events |
| **Timing** | Debounce, throttle, delay, timeout |
| **Preconditions** | What must be true to fire |
| **Postconditions** | Guaranteed state after |
| **Concurrency** | Can it fire simultaneously with itself? with others? |
## Phase 4 — Feedback
How the user perceives what happened. Rule: every action has feedback.
### Feedback channels
- **Visual** — motion, color change, icon swap, inline message, toast
- **Auditory** — click, beep (sparingly)
- **Haptic** — buzz, tap (mobile)
- **Text / copy** — status message, error message
### Feedback timing
- **Immediate** (<100ms) — happened
- **Short** (100ms–1s) — show progress if longer
- **Long** (>1s) — progress indicator, step feedback, estimated duration
### States
Design feedback for each state:
- Idle
- Hover / focus
- Active / pressed
- Loading
- Success
- Error
- Disabled
## Phase 5 — Loops and modes
### Loops
What happens on repeat or over time?
- **Long loops**: subscription behavior, notifications over days
- **Short loops**: scroll, swipe, repeated actions
- **Decay / evolution**: does the interaction adapt to usage? (e.g., autocomplete learning)
### Modes
Does the interaction create a new mode (different rules apply while active)?
- **Spring-loaded mode** (temporary: only while holding shift / cmd)
- **Toggle mode** (persistent: edit / view mode)
- **Quasi-mode** (user-initiated short-term)
Every mode has:
- **Entry**: how to get in
- **Indicator**: visible signal user is in the mode
- **Exit**: how to leave (must be discoverable)
Rule: modes are friction. Don't create unless necessary.
## Phase 6 — Accessibility specifics
| Check | Target |
|---|---|
| Keyboard | All triggers reachable without mouse |
| Screen reader | State + change announced (role + label + value + `aria-live` for dynamic) |
| Focus | Remains predictable after interaction |
| Motion | Respect `prefers-reduced-motion`; no auto-play > 5s |
| Contrast | Active/disabled states ≥ 3:1 from adjacent |
| Target | ≥ 24×24 CSS px (WCAG 2.2) |
| Timing | Adjustable / disabled where applicable |
## Phase 7 — Performance
- **Idle cost**: listeners, observers — minimal
- **Action cost**: network / CPU / memory during the interaction
- **Slow-network fallback**: optimistic UI? skeleton? block? recover from failure?
- **Low-end device**: reduced motion alternative
## Phase 8 — Acceptance criteria
Produce Given/When/Then criteria covering:
- Happy path trigger → feedback
- Error state (e.g., network fails)
- Accessibility (keyboard-only, screen-reader)
- Reduced-motion path
- Rapid repeat (debounce / throttle observed)
- Mode entry and exit (if modal)
## Phase 9 — Diagrams
### 1. Interaction state diagram
```mermaid
stateDiagram-v2
[*] --> Idle
Idle --> Hover: Pointer over
Hover --> Idle: Pointer out
Idle --> Active: Trigger
Hover --> Active: Trigger
Active --> Loading: Rules run
Loading --> Success: Rules ok
Loading --> Error: Rules fail
Success --> Idle: Feedback cleared
Error --> Idle: User dismisses
```
### 2. Feedback timing strip (optional)
Simple timeline showing what feedback fires at which ms.
## Phase 10 — Diagram rendering
Per `diagram-rendering` mixin. File names:
- `interaction-states.mmd` / `.png`
- `feedback-timing.mmd` / `.png` (optional)
## Phase 11 — Report assembly and approval
```markdown
# Micro-interaction: [Name]
**Date**: [date]
**Job**: [one sentence]
**Platforms**: [list]
## Scope
[Interaction, job, context, platforms]
## Trigger
[Per trigger: condition, discoverability, accessibility]
## Rules
[Input constraints / state transitions / side effects / timing / preconditions / postconditions / concurrency]
## Feedback
[Channel + timing + state-by-state]
## Loops & Modes
[Loop behavior; modes with entry / indicator / exit]
## Accessibility
[Keyboard / SR / focus / motion / contrast / target / timing checks]
## Performance
[Idle cost / action cost / slow-network / low-end]
## Acceptance Criteria
[Given/When/Then per scenario]
## Diagrams
[State diagram + optional timing strip]
## Assumptions & Limitations
[Platform-specific caveats, tooling needs]
```
Present for user approval. Save only after confirmation.
## Generation + planning rules
- Dan Saffer's 4-part model followed
- Every state has feedback
- Accessibility not deferred
- Modes justified
- No fabricated platform APIs
## Failure behavior
| Situation | Behavior |
|---|---|
| No interaction specified | Interview mode (§7) |
| Interaction does > 1 job | Split into multiple |
| No accessibility consideration | Block — require before sign-off |
| Mode without exit | Require exit design |
| Feedback only visual | Recommend multi-channel + reduced-motion path |
| mmdc failure | See `diagram-rendering` mixin |
| Out-of-scope ("also design the full screen") | Pointer to `wireframing` |
## Self-check
```
[] One job per interaction
[] Trigger(s) with discoverability + a11y
[] Rules complete (input / state / side effects / timing / concurrency)
[] Feedback per state (idle / hover / active / loading / success / error / disabled)
[] Loops + modes (or N/A note)
[] Accessibility checks per criterion
[] Performance considered (slow network + low-end)
[] Given/When/Then acceptance
[] Diagrams valid
[] Modes have entry + indicator + exit
[] Report follows output contract
```
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.