react-ui-patterns — Claude Code skill: what it does, how to install
Provides practical React interface conventions for handling loading states, empty collections, and network failures. Guides the assistant when building async components.
npx claude-code-templates@latest --skill development/react-ui-patternsWhat react-ui-patterns does
This skill teaches Claude Code strict conventions for asynchronous React interfaces. It stops the agent from flashing spinners whenever cached information already exists on the screen. For predictable layouts, the guidelines demand skeleton placeholders, reserving spinners for button clicks or modal dialogs.
The instructions enforce an explicit error hierarchy alongside mandatory empty views for lists. Silently ignoring errors in catch blocks is forbidden. Crucially, buttons must lock during pending network requests to stop duplicate submissions. The skill also enforces visible user feedback for every triggered mutation.
What it helps with
- prevent spinner flicker when cached records are present
- assign skeleton loaders and spinners to appropriate UI contexts
- disable submit triggers during active mutations
- design informative empty states for search and collections
Example prompts for the agent
- Build an order list component with proper skeleton, error fallback, and an empty state
- Create a profile edit form that disables the submit trigger while pending and alerts on failure
- Refactor the data loading view so background refetches do not trigger a full spinner
How to install react-ui-patterns
1claude-code-templates
npx claude-code-templates@latest --skill development/react-ui-patterns2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill react-ui-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/react-ui-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/react-ui-patterns/
Manually: put the files in place
.agents/skills/react-ui-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/react-ui-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates react-ui-patterns2Manually: put the files in place
.github/skills/react-ui-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/react-ui-patternsManually: put the files in place
.devin/skills/react-ui-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.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 react-ui-patterns
How do I install react-ui-patterns in Claude Code?
Run npx claude-code-templates@latest --skill development/react-ui-patterns in your terminal. This imports the skill into your Claude Code setup.
What is react-ui-patterns used for?
It provides guidelines for handling UI states in React, focusing on async fetches, error presentation, and empty views. These conventions help Claude Code write resilient components without flashing spinners or swallowed exceptions.
When does the skill advise using skeletons over spinners?
Skeletons are recommended during initial page loads for layouts with a predictable structure, like cards or lists. Spinners are reserved for modal actions, inline tasks, and button submissions.