react-patterns

react-patterns is a skill for Claude Code, Codex from Global-mindee/WAY. It costs 22 tokens per session (1,692 once invoked), scanned A, original, MIT.

A guide to React 19 features for composing components, loading data, handling actions, and managing loading states. React is a JavaScript library for building user interfaces.

In plain words
What is it for?
Use it when building React pages and components with Server Components, the use hook, Suspense, actions, and reusable composition patterns.
Why use it?
It helps developers choose suitable ways to share data, split browser and server work, and handle asynchronous screens.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createPost } from '../actions';.

Good fit Use it when building React pages and components with Server Components, the use hook, Suspense, actions, and reusable composition patterns.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Global-mindee/WAY
agentmods
npx agentmods add skills/global-mindee/way/react-patterns

Made for: Claude Code, Codex.

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/global-mindee/way/react-patterns/github.svg)](https://agentmods.dev/skills/global-mindee/way/react-patterns)
Your own site
<a href="https://agentmods.dev/skills/global-mindee/way/react-patterns"><img src="https://agentmods.dev/badge/skills/global-mindee/way/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/global-mindee/way/react-patterns"><img src="https://agentmods.dev/badge/skills/global-mindee/way/react-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00022 $0.01692
Opus 5 $0.00011 $0.00846
Sonnet 5 $0.00004 $0.00338
Haiku 4.5 $0.00002 $0.00169

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

Security

Grade A, and why

react-patterns scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/04_infra-platform/react-patterns/SKILL.md · 283 lines

How it starts

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

React Patterns

use() Hook (React 19)

use() reads values from Promises and Context directly in render. Unlike other hooks, it can be called inside conditionals and loops.

import { use } from 'react';

function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
  const user = use(userPromise);
  return <h1>{user.name}</h1>;
}

function ThemeButton() {
  const theme = use(ThemeContext);
  return <button style={{ background: theme.primary }}>Click</button>;
}

Wrap components that use use() with a Promise in a <Suspense> boundary.

Server Components

// app/users/page.tsx - Server Component (default, no directive needed)
import { UserList } from './UserList';

export default async function UsersPage() {
  const users = await fetch('https://api.example.com/users', {
    next: { revalidate: 60 },
  }).then(r => r.json());

  return <UserList users={users} />;
}

// app/users/UserList.tsx - Still a Server Component
export function UserList({ users }: { users: User[] }) {
  return (
    <ul>
      {users.map(u => (
        <li key={u.id}>
          {u.name}
          <DeleteButton userId={u.id} />
        </li>
      ))}
    </ul>
  );
}

Push 'use client' as deep as possible. Only leaves that need interactivity should be Client Components.

Server Actions

// app/actions.ts
'use server';

import { revalidatePath } from 'next/cache';
import { redirect } from 'next/navigation';

export async function createPost(formData: FormData) {
  const title = formData.get('title') as string;
  const body = formData.get('body') as string;

  await db.insert(posts).values({ title, body });

  revalidatePath('/posts');
  redirect('/posts');
}
// app/posts/new/page.tsx
import { createPost } from '../actions';

export default function NewPostPage() {
  return (
    <form action={createPost}>
      <input name="title" required />
      <textarea name="body" required />
      <button type="submit">Create</button>
    </form>
  );
}

Read the full file on GitHub · 283 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. 6d ago First seen · 283 lines · 22 tokens per session scan A 2a871823f73f

Subscribe to this mod's changes

react-patterns is a skill published in the GitHub repository Global-mindee/WAY (11 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,692 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Remotion

Creates programmatic video with React via Remotion — compositions, sequences, and motion graphics animated with useCurrentFrame() and rendered to MP4. USE WHEN video, animation, motion graphics, video rendering, React video, render video, animate content, make a short, create animations, video overlay, explainer…

danielmiessler/LifeOS · 121 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

dashboard-widgets

Author a dashboard widget — a small React component backed by named LangWatchQL queries — from a plain question. Discovers the analytics schema, writes the queries, writes the widget file, saves it, then proves it renders. Use when asked to build, prototype, or iterate on a custom chart widget, or to add a widget…

langwatch/langwatch · 79 tokens

assistant-ui-primitives

Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive. Use when customizing chat UI components.

compozy/compozy · 28 tokens

menu-testing-ssr

Server rendering and testing for react-horizontal-scrolling-menu: the library is client-only ('use client' required in React Server Components, else "createContext is not a function"), SSR first paint is controlled by the useIsVisible defaultValue argument (canonical ('first', true) / ('last', false))…

asmyshlyaev177/react-horizontal-scrolling-menu · 144 tokens

menu-transitions-rtl

Animate react-horizontal-scrolling-menu scrolling and build right-to-left menus: noPolyfill defaults to true since v8, so transitionDuration (default 500), a custom-easing-function transitionBehavior, and per-call ScrollOptions { duration, boundary } on scrollToItem/scrollNext/scrollPrev are silently ignored unless…

asmyshlyaev177/react-horizontal-scrolling-menu · 137 tokens