react

A quick reference for building interfaces with React 18 or later, a JavaScript library for composing user interfaces from reusable components. It covers component structure, properties, hooks, and related project patterns.

In plain words
What is it for?
Use it during React development or review when the project uses React dependencies or JSX/TSX files, especially for creating components and organizing their types and behavior.
Why use it?
It gives an agent a concise guide to common React conventions while working in a React, Next.js, Vite, or similar project.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fortiumpartners/ensemble/react
Any agent
npx skills add FortiumPartners/ensemble --skill react
Clone the repo
git clone --depth 1 https://github.com/FortiumPartners/ensemble

Made for: Claude Code, Codex.

Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,304 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00014 $0.05304
Opus 5 $0.00007 $0.02652
Sonnet 5 $0.00003 $0.01061
Haiku 4.5 $0.00001 $0.00530

Measured 2d ago against content hash 2bc4414d4275, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

react 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 2d ago.

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.

fetch(url, { signal: abortController.signal })
packages/codex/.codex/skills/react/SKILL.md · 944 lines

How it starts

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

React Framework - Quick Reference

Version: 1.0.0 Framework: React 18+ Use Case: Fast lookups during active development


When to Use

This skill is loaded by frontend-developer when:

  • package.json contains "react" dependency (≥18.0.0)
  • Project has .jsx or .tsx files in src/
  • User explicitly mentions "React" in task description
  • Next.js, Vite, or Create React App detected

Minimum Detection Confidence: 0.8 (80%)


Quick Start

Basic Component

import { FC } from 'react';

interface Props {
  title: string;
  onAction?: () => void;
}

export const MyComponent: FC<Props> = ({ title, onAction }) => {
  return (
    <div>
      <h1>{title}</h1>
      <button onClick={onAction}>Action</button>
    </div>
  );
};

Core Patterns

1. Component Design

Functional Component Structure
// 1. Imports (grouped and sorted)
import { useState, useEffect } from 'react';
import type { FC, ReactNode } from 'react';

// 2. Types/Interfaces
interface Props {
  children: ReactNode;
  className?: string;
}

// 3. Component
export const Component: FC<Props> = ({ children, className }) => {
  // 4. Hooks (state, effects, context)
  const [state, setState] = useState<string>('');

  useEffect(() => {
    // Side effects
  }, []);

  // 5. Event handlers
  const handleClick = () => {
    setState('clicked');
  };

  // 6. Early returns (error states, loading)
  if (!children) return null;

  // 7. Main render
  return <div className={className}>{children}</div>;
};
Component Composition
// Container/Presentational Pattern
interface User {
  id: number;
  name: string;
}

// Container: Logic and data fetching
export const UserProfileContainer: FC<{ userId: number }> = ({ userId }) => {
  const [user, setUser] = useState<User | null>(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    fetch(`/api/users/${userId}`)
      .then(res => res.json())
      .then(setUser)
      .finally(() => setLoading(false));
  }, [userId]);

  if (loading) return <LoadingSpinner />;
  if (!user) return <ErrorMessage />;

  return <UserProfile user={user} />;
};

// Presentational: Pure UI
interface UserProfileProps {
  user: User;
}

export const UserProfile: FC<UserProfileProps> = ({ user }) => {
  return (
    <div>
      <h2>{user.name}</h2>
    </div>
  );
};

Read the full file on GitHub · 944 lines

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. 2d ago First seen · 944 lines · 14 tokens per session scan A 2bc4414d4275

Subscribe to this mod's changes

react is a skill published in the GitHub repository FortiumPartners/ensemble (11 stars, last pushed 28d ago), licensed MIT. It adds 14 tokens to every session and 5,304 once invoked, about $0.0001 per session on Opus 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-08-30.