claude-copilot: Skill for Claude Code

.claude/skills/code/react-patterns/SKILL.md

react-patterns is a skill for Claude Code from Everyone-Needs-A-Copilot/claude-copilot. It costs 102 tokens per session (2,622 once invoked), scanned A, original, MIT.

A guide to React components, hooks, and common design mistakes, with checks for patterns in JSX and TypeScript React files.

In plain words
What is it for?
Use it when building or reviewing React components, hooks, composition, data flow, and related JSX or TSX files.
Why use it?
It gives a consistent way to review React code and catch issues such as conditional hooks, unsuitable keys, and problematic state or context use.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is Everyone-Needs-A-Copilot/claude-copilot's own configuration. It tells Claude Code how to work on claude-copilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-copilot configures →

Part of the claude-copilot plugin — 73 skills, 18 commands, 16 agents, 6 hooks shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to Everyone-Needs-A-Copilot/claude-copilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Everyone-Needs-A-Copilot/claude-copilot/main/.claude/skills/code/react-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Everyone-Needs-A-Copilot/claude-copilot

Made for: Claude Code.

Or install claude-copilot, the plugin that ships this one along with the rest of its 73 skills, 18 commands, 16 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/react-patterns/github.svg)](https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/react-patterns)
Your own site
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/react-patterns"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/react-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/everyone-needs-a-copilot/claude-copilot/react-patterns"><img src="https://agentmods.dev/badge/skills/everyone-needs-a-copilot/claude-copilot/react-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.02622
Opus 5.5 $0.00041 $0.01049
Sonnet 5.5 $0.00020 $0.00524
Haiku 4.5 $0.00010 $0.00262

Measured 1mo ago against content hash 9821b2204874, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-patterns scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/react_patterns.py, scripts/test_react_patterns.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(url, { signal: controller.signal });
.claude/skills/code/react-patterns/SKILL.md · 382 lines

How it starts

The opening of the file, as written. The whole thing — 382 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Patterns

Modern React patterns, hooks best practices, anti-patterns, and quality rules.

Core Principles

Principle Description
Composition Small, focused components over inheritance
Unidirectional Data flows down, events flow up
Declarative Describe what, not how
Hooks Functional components with hooks over class components

Component Patterns

Functional Components

// GOOD: Typed functional component
interface ButtonProps {
  label: string;
  onClick: () => void;
  variant?: 'primary' | 'secondary';
  disabled?: boolean;
}

export function Button({
  label,
  onClick,
  variant = 'primary',
  disabled = false,
}: ButtonProps) {
  return (
    <button
      className={`btn btn-${variant}`}
      onClick={onClick}
      disabled={disabled}
    >
      {label}
    </button>
  );
}

// BAD: Class component (outdated)
class Button extends React.Component { }

Composition Over Props Drilling

// GOOD: Compound components
function Card({ children }: { children: React.ReactNode }) {
  return <div className="card">{children}</div>;
}

Card.Header = function CardHeader({ children }: { children: React.ReactNode }) {
  return <div className="card-header">{children}</div>;
};

Card.Body = function CardBody({ children }: { children: React.ReactNode }) {
  return <div className="card-body">{children}</div>;
};

// Usage
<Card>
  <Card.Header>Title</Card.Header>
  <Card.Body>Content</Card.Body>
</Card>

Render Props / Children as Function

// GOOD: Flexible render pattern
interface DataFetcherProps<T> {
  url: string;
  children: (data: T | null, loading: boolean, error: Error | null) => React.ReactNode;
}

function DataFetcher<T>({ url, children }: DataFetcherProps<T>) {
  const { data, loading, error } = useFetch<T>(url);
  return <>{children(data, loading, error)}</>;
}

// Usage
<DataFetcher<User[]> url="/api/users">
  {(users, loading, error) => {
    if (loading) return <Spinner />;
    if (error) return <ErrorMessage error={error} />;
    return <UserList users={users!} />;
  }}
</DataFetcher>

Read the full file on GitHub · 382 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 382 lines · 102 tokens per session scan A 9821b2204874

Subscribe to this mod's changes

react-patterns is a skill published in the GitHub repository Everyone-Needs-A-Copilot/claude-copilot (14 stars, last pushed yesterday), licensed MIT. It adds 102 tokens to every session and 2,622 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

react-docs

Comprehensive React 19 reference covering all built-in hooks, components, APIs, concurrent features, Server Components, React Compiler, and advanced patterns. Use whenever the user mentions React, JSX, hooks, components, state management, effects, Context, Suspense, transitions, forms, Server Components, or React…

pledgeandgrow/pledge-skills · 68 tokens

react-development

Comprehensive React development with hooks, components, state management, context, effects, and performance optimization based on official React documentation.

manutej/luxor-claude-marketplace · 27 tokens

react-expert

Expert-level React development with hooks, performance optimization, state management, and modern patterns. Use when the user mentions frontend, hooks, JSX, TypeScript, or Next.js, or when the task involves Modern React, State Management, Forms, or Performance Optimization.

personamanagmentlayer/pcl · 56 tokens

react-core

General React fundamentals - components and JSX, props and state, the core hooks (useState/useEffect/useRef/useMemo/useCallback/useContext), composition, conditional and list rendering, and controlled inputs. The canonical "depends on React" reference.

bobmatnyc/claude-mpm-skills · 52 tokens

ui-design-patterns

Common interface patterns, navigation patterns, form patterns, data display patterns, feedback patterns, and accessibility considerations.

manutej/luxor-claude-marketplace · 25 tokens

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json…

shadcn-ui/ui · 113 tokens