Typescript React Patterns
A reference catalog of 33 TypeScript typing rules for React components, hooks, events, refs, and generics.
- CCM score
- 61 of 100
- skills.sh installs
- 1.2K
- GitHub stars
- 109
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers 7 categories: component typing, hook typing, event handling, ref typing, generic components, context and state, and utility types
- Lists rules by prefix (
comp-,hook-,event-,ref-,generic-,ctx-,util-) with a priority ranking from CRITICAL to LOW - Includes typed patterns for props interfaces, null-checked context hooks, and generic list components, with individual rule files for detailed reading
- Designed for writing typed React components or fixing TypeScript errors in React code
Install
$ npx -y skills add asyrafhussin/agent-skills --skill typescript-react-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
TypeScript React Patterns
Type-safe React with TypeScript. Contains 33 rules across 7 categories covering component typing, hooks, event handling, refs, generics, context, and utility types.
Metadata
- Version: 2.0.0
- Rule Count: 33 rules across 7 categories
- License: MIT
When to Apply
Reference these guidelines when:
- Typing React component props
- Creating custom hooks with TypeScript
- Handling events with proper types
- Working with refs (DOM, mutable, imperative)
- Building generic, reusable components
- Setting up typed Context providers
- Fixing TypeScript errors in React code
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Component Typing | CRITICAL | comp- |
| 2 | Hook Typing | CRITICAL | hook- |
| 3 | Event Handling | HIGH | event- |
| 4 | Ref Typing | HIGH | ref- |
| 5 | Generic Components | MEDIUM | generic- |
| 6 | Context & State | MEDIUM | ctx- |
| 7 | Utility Types | LOW | util- |
Quick Reference
1. Component Typing (CRITICAL)
Details
- Repository
- github.com/asyrafhussin/agent-skills
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the typescript-react-patterns skill do?
typescript-react-patterns gives an agent TypeScript best practices for React, covering typed components, hooks, events, refs, and generic components. It contains 33 rules across 7 categories, from component typing to utility types.
How do I install the typescript-react-patterns skill?
Run npx -y skills add asyrafhussin/agent-skills --skill typescript-react-patterns -y in your project. Once installed, typescript-react-patterns lets the agent follow its rules when typing props, hooks, and events.
Which tasks should I use typescript-react-patterns for?
Use typescript-react-patterns when writing typed React components, custom hooks, or generic components, or when fixing TypeScript errors in React code. It also covers typed Context providers and discriminated unions for state.
Where does typescript-react-patterns sit in the Frontend & UI Code category?
typescript-react-patterns is in the Frontend & UI Code category, next to vercel-react-best-practices and web-design-guidelines. Its focus is type safety in React rather than general React or design guidance.
More from asyrafhussin/agent-skills
All 14- Laravel Owasp Security1.1K
- Tailwind Best Practices1.1K
- Api Design Patterns1K
- Testing Best Practices993
- Web Design Guidelines990
- Git Workflow920
- State Management862
- Php Best Practices4K
- React Vite Best Practices3K
- Laravel Best Practices2.4K
- Laravel Inertia React2.1K
- Clean Code Principles2K
- Laravel Database Optimization1.2K
Similar to Typescript React Patterns
More Frontend & UI Codereact-devsoftaworks/agent-toolkit4.2K installsType-safe React 18-19 patterns covering generic components, event typing, hooks, and router integration.
react-patternssickn33/agentic-awesome-skills1.2K installsModern React guidance covering components, hooks, state, React 19, performance, and TypeScript typing.
react-component-architectureaj-geddes/useful-ai-prompts687 installsReusable React component patterns covering functional components, custom hooks, composition, and typed props, with reference guides.
react-best-practicesalleneubank/claude-code3.2K installsDecision-tree guide for React components that steers logic away from unnecessary Effects toward render, events, and refs.
react-composition-patternssecondsky/claude-skills504 installsReact composition patterns that scale for refactoring boolean-prop components and designing flexible, reusable APIs.