react-patterns

Enforce React 18 and TypeScript component and hook standards.

1|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/komluk/scaffolding.template --skill react-patterns-komluk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-patterns
Source: https://github.com/komluk/scaffolding.template/tree/main/stacks/react/.claude/skills/react-patterns
Command: npx skills add https://github.com/komluk/scaffolding.template --skill react-patterns-komluk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces consistent standards and best practices for React 18 and TypeScript development, ensuring maintainable, scalable, and high-quality codebases.

Core Features & Use Cases

  • Component Standards: Defines rules for functional components, props typing, and organization.
  • Hook Standards: Guides the usage of built-in hooks and the creation of custom hooks.
  • TypeScript Requirements: Enforces type safety with import type, export type, and proper prop definitions.
  • Performance Optimization: Provides guidelines on memoization and re-render prevention.
  • Use Case: When building a new feature with multiple React components, use this Skill to ensure all developers follow the same structure, naming conventions, and best practices for hooks and state management.

Quick Start

Apply the react-patterns skill to review the attached React component code for adherence to standards.

Frequently Asked Questions about react-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the React 18 component standards for functional components and props typing?

React 18 component standards require using functional components with explicit prop typing. You must define proper prop definitions and organize your code structure consistently to maintain a scalable and high-quality codebase.

How do I implement custom hooks in React with TypeScript?

To implement custom hooks in React with TypeScript, follow established hook usage guidelines that enforce type safety. This includes applying proper typing to hook inputs and outputs for maintainable state management logic.

What is the best way to prevent re-renders and optimize performance in React 18?

The best way to prevent re-renders and optimize performance in React 18 is through memoization techniques. Applying performance optimization guidelines ensures components only re-render when necessary, maintaining high-quality codebases.

How do I enforce TypeScript requirements like import type and export type in React code?

To enforce TypeScript requirements in React code, apply strict rules for using `import type` and `export type` alongside proper prop definitions. This ensures type safety across your component and hook standards during code reviews.

Can I use this approach to review existing React component code?

Yes, you can use this approach to review existing React component code for adherence to standards. It checks attached code against rules for functional components, explicit prop typing, and hook usage guidelines to ensure maintainability.