react-patterns · davila7 — Claude Code skill: React patterns and setup
Get guidance on React components, hooks, state choices, and performance. Useful when building or refactoring a React interface with TypeScript.
npx claude-code-templates@latest --skill development/react-patternsWhat react-patterns does
This skill covers component boundaries, reusable hooks, and where state belongs, from a component’s own useState to Context or an app-wide store. It also addresses React 19 hooks such as useActionState and useOptimistic, along with TypeScript prop and event-handler types.
For slow renders, the guidance is to inspect performance with DevTools and locate the bottleneck before changing code. Then choose a targeted measure, such as virtualizing a large list or using useMemo for expensive calculations. That means memoization is not treated as a default fix. Error boundaries and testing levels are covered too.
Install it with npx claude-code-templates@latest --skill development/react-patterns. The listed tools are Read, Write, Edit, Glob, and Grep.
What it helps with
- split a large component into focused pieces
- choose where shared state should live
- extract repeated logic into a custom hook
- locate the cause of slow renders before optimizing
- type component props and event handlers in TypeScript
Example prompts for the agent
- Review this large React component and suggest a clearer component and state structure.
- Find repeated logic here that should become a custom hook.
- Help me locate the bottleneck in this slow list and choose a suitable fix.
How to install react-patterns
1claude-code-templates
npx claude-code-templates@latest --skill development/react-patterns2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill react-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/react-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/react-patterns/
Manually: put the files in place
.agents/skills/react-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/react-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates react-patterns2Manually: put the files in place
.github/skills/react-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/react-patternsManually: put the files in place
.devin/skills/react-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-patterns
How do I install react-patterns in Claude Code?
Run npx claude-code-templates@latest --skill development/react-patterns. Then use the skill in Claude Code.
What does react-patterns do?
It provides guidance on React components, hooks, state management, performance, error handling, and testing. It also covers React 19 and TypeScript patterns.
How does react-patterns approach React performance issues?
It recommends profiling with DevTools to identify the bottleneck before applying a focused change. Suggestions include list virtualization and useMemo for expensive calculations.
Similar skills
All skills for Frontend and UI →react-patterns by other authors comes first.