loom-react

loom-react is a skill for Claude Code, Codex from cosmix/loom. It costs 25 tokens per session (16,081 once invoked), scanned A, original, MIT.

A development guide for client-side React 19 or newer single-page applications. It covers React components and Hooks with React Router, Jotai, Vite, Bun, and the Oxc linting and formatting tools; it does not cover server-rendered frameworks such as Next.js or Remix.

In plain words
What is it for?
It helps build browser-based React applications, handle routes and forms, manage application state, load data asynchronously, and check code quality and behavior.
Why use it?
It gives developers consistent patterns for routing, shared state, asynchronous data loading, accessibility, performance, and testing. The scope makes clear when the guidance does not apply.

Skill for Claude CodeCodex

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

Good fit It helps build browser-based React applications, handle routes and forms, manage application state, load data asynchronously, and check code quality and behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/loom-react
View source ↗ cosmix/loom
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.

Any agent
npx skills add cosmix/loom --skill loom-react
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

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 loom-react

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-react/github.svg)](https://agentmods.dev/skills/cosmix/loom/loom-react)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-react"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-react/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 loom-react

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-react"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 16,081 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.00025 $0.16081
Opus 5.5 $0.00010 $0.06432
Sonnet 5.5 $0.00005 $0.03216
Haiku 4.5 $0.00003 $0.01608

Measured 27d ago against content hash 0d4127eb72f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loom-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 27d 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.

const response = await fetch(url, { signal: controller.signal });
skills/loom-react/SKILL.md · 1,619 lines

How it starts

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

React SPA Development

Overview

Client-side React 19+ SPAs. Stack: React Router v7 (routing/loaders), Jotai (atomic global state), Vite (build — Rolldown bundler, Oxc transforms and minifier, Lightning CSS), oxlint + oxfmt (lint/format — the Oxc replacements for ESLint and Prettier), Bun (package manager/runtime). NOT for SSR frameworks (Next.js/Remix) — those are out of scope.

The single densest section is Expert Practices at the end — read it first if you know React basics. The middle sections are reference implementations.

React 19 Features

Actions and useActionState

React 19 introduces Actions for handling async state transitions:

import { useActionState } from 'react'

interface FormState {
  message: string
  error?: string
}

async function updateProfile(previousState: FormState, formData: FormData) {
  const name = formData.get('name') as string

  try {
    await fetch('/api/profile', {
      method: 'POST',
      body: JSON.stringify({ name }),
    })
    return { message: 'Profile updated successfully' }
  } catch (error) {
    return { message: '', error: 'Update failed' }
  }
}

export function ProfileForm() {
  const [state, formAction, isPending] = useActionState(updateProfile, { message: '' })

  return (
    <form action={formAction}>
      <input type="text" name="name" disabled={isPending} />
      <button type="submit" disabled={isPending}>
        {isPending ? 'Updating...' : 'Update Profile'}
      </button>
      {state.error && <p className="error">{state.error}</p>}
      {state.message && <p className="success">{state.message}</p>}
    </form>
  )
}

useOptimistic for Instant UI Updates

import { useOptimistic, useState } from 'react'

interface Todo {
  id: string
  title: string
  completed: boolean
}

export function TodoList({ todos }: { todos: Todo[] }) {
  const [optimisticTodos, addOptimisticTodo] = useOptimistic(
    todos,
    (state, newTodo: Todo) => [...state, newTodo]
  )

  async function addTodo(formData: FormData) {
    const title = formData.get('title') as string
    const tempTodo = { id: crypto.randomUUID(), title, completed: false }

    addOptimisticTodo(tempTodo)

    await fetch('/api/todos', {
      method: 'POST',
      body: JSON.stringify({ title }),
    })
  }

  return (
    <div>
      <ul>
        {optimisticTodos.map((todo) => (
          <li key={todo.id}>{todo.title}</li>
        ))}
      </ul>
      <form action={addTodo}>
        <input type="text" name="title" />
        <button type="submit">Add Todo</button>
      </form>
    </div>
  )
}

Read the full file on GitHub · 1,619 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. 27d ago Changed · -1 lines · +15 tokens per session 0d4127eb72f6
  2. 1mo ago Changed · -69 tokens per session 095008f8d3f0
  3. 1mo ago First seen · 1,620 lines · 79 tokens per session scan A 6f83a5495674

Subscribe to this mod's changes

loom-react is a skill published in the GitHub repository cosmix/loom (62 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 16,081 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

nextjs-on-cloudflare

Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext, or setting up vinext for Workers. For setup, migration, or deployment, install vinext's upstream skills with npx skills…

cloudflare/skills · 96 tokens

airflow-plugins

Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or…

astronomer/agents · 147 tokens

shadcn-ui

Provides complete shadcn/ui component library patterns including installation, configuration, and implementation of accessible React components. Use when setting up shadcn/ui, installing components, building forms with React Hook Form and Zod, customizing themes with Tailwind CSS, or implementing UI patterns like…

giuseppe-trisciuoglio/developer-kit · 74 tokens

react-code-review

Provides comprehensive code review capability for React applications, validates component architecture, hooks usage, React 19 patterns, state management, performance optimization, accessibility compliance, and TypeScript integration. Use when reviewing React code changes, before merging pull requests, after…

giuseppe-trisciuoglio/developer-kit · 81 tokens

react-patterns

Provides comprehensive React 19 patterns for Server Components, Server Actions, useOptimistic, useActionState, useTransition, concurrent features, Suspense boundaries, and TypeScript integration. Generates executable code patterns, validates security for public endpoints, and optimizes performance with React Compiler…

giuseppe-trisciuoglio/developer-kit · 87 tokens

aksel-builder

Expert builder for Aksel, the Nav / @navikt design system — React components, design tokens, layout primitives, theming (light/dark), icons, CSS, the Tailwind preset, version migrations, Figma-to-code. Triggers — Aksel, "using/with aksel", Nav/Navikt, "designsystemet", "design system", @navikt/ds- (e.g.…

navikt/copilot · 181 tokens