openstory: Skill for Claude Code

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

react-patterns is a skill for Claude Code from openstory-so/openstory. It costs 49 tokens per session (707 once invoked), scanned A, original, MIT.

A set of do-and-don't examples for this repository's React code conventions. React is a JavaScript library for building user interfaces, and the examples cover data loading, styling, and forms.

In plain words
What is it for?
Use it when writing or reviewing React components, especially components that load data, use Suspense, apply shadcn styling, or validate FormData with Zod.
Why use it?
It gives developers concrete patterns to follow instead of relying on habits that conflict with the repository's rules.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

This is openstory-so/openstory's own configuration. It tells Claude Code how to work on openstory 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 openstory configures →

Reuse

Borrowing it

Nothing to install: this file belongs to openstory-so/openstory. 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/openstory-so/openstory/main/.claude/skills/react-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/openstory-so/openstory

Made for: Claude Code.

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/openstory-so/openstory/react-patterns/github.svg)](https://agentmods.dev/skills/openstory-so/openstory/react-patterns)
Your own site
<a href="https://agentmods.dev/skills/openstory-so/openstory/react-patterns"><img src="https://agentmods.dev/badge/skills/openstory-so/openstory/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/openstory-so/openstory/react-patterns"><img src="https://agentmods.dev/badge/skills/openstory-so/openstory/react-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 707 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.00049 $0.00707
Opus 5.5 $0.00020 $0.00283
Sonnet 5.5 $0.00010 $0.00141
Haiku 4.5 $0.00005 $0.00071

Measured 19d ago against content hash f42da263aeca, 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 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 19d 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.

.claude/skills/react-patterns/SKILL.md · 77 lines

How it starts

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

React patterns — examples

The rules are in the React Patterns section of AGENTS.md; these are the examples for the ones that go against habit.

Data fetching

// ❌ useState + useEffect
const [user, setUser] = useState(null);
const [isLoading, setIsLoading] = useState(true);
useEffect(() => { fetch(...).then(r => r.json()).then(d => { setUser(d); setIsLoading(false); }); }, [userId]);
if (isLoading) return <div>Loading...</div>;

// ✅ TanStack Query + Suspense — no isLoading checks
const UserContent: React.FC<{ userId: string }> = ({ userId }) => {
  const { data: user } = useQuery({ queryKey: ['user', userId], queryFn: () => fetchUser(userId), suspense: true });
  return <div>{user.name}</div>;
};

export const UserProfile: React.FC<{ userId: string }> = (props) => (
  <Suspense fallback={<Skeleton className="h-6 w-32" />}><UserContent {...props} /></Suspense>
);

Styling

// ❌ Hard-coded colors, dark variants, margin on the component
<div className="w-[300px] m-4 p-6 bg-white dark:bg-slate-900 text-slate-900 dark:text-white rounded-xl shadow-lg border border-slate-200 dark:border-slate-700">
  <h3 className="text-xl font-bold mb-2">{frame.title}</h3>
</div>

// ✅ shadcn base handles theming; Tailwind for layout only; gap on parent (not margin on child)
<Card onClick={onSelect} className="cursor-pointer">
  <CardHeader><CardTitle>{frame.title}</CardTitle><CardDescription>{frame.description}</CardDescription></CardHeader>
</Card>

// Parent owns spacing:
<div className="grid grid-cols-3 gap-4">
  {frames.map(f => <FrameCard key={f.id} frame={f} />)}
</div>

Forms

// ❌ Controlled inputs everywhere, manual validation, setState per field

// ✅ Uncontrolled + FormData + Zod + TanStack Query mutation
export const ScriptForm: React.FC = () => {
  const mutation = useMutation({ mutationFn: createScript });

  const onSubmit = (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    const result = scriptSchema.safeParse(
      Object.fromEntries(new FormData(e.currentTarget))
    );
    if (!result.success) return; // surface errors inline
    mutation.mutate(result.data);
  };

  return (
    <form onSubmit={onSubmit} className="flex flex-col gap-4">
      <Input name="title" placeholder="Script title…" required />
      <Button type="submit" disabled={mutation.isPending}>
        {mutation.isPending ? 'Creating…' : 'Create'}
      </Button>
    </form>
  );
};

Read the full file on GitHub · 77 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. 19d ago First seen · 77 lines · 49 tokens per session scan A f42da263aeca

Subscribe to this mod's changes

react-patterns is a skill published in the GitHub repository openstory-so/openstory (687 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 707 once invoked, about $0.0002 per session on Opus 5.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-10-06.

Related

Other skills, from other repositories

video

Make a complete Remotion video from a short brief with remocn components: pick the archetype, plan a storyboard with frame budgets, install the components, compose the scenes, check the render and offer to open the project in Remocn Studio. Use when the user asks for a whole video (product demo, launch, feature…

Remocn/remocn · 96 tokens

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

review-system-design

Review a system design someone else provided - screenshot, drawio, Mermaid, slides, doc, or IaC - by extracting it into a confirmed fact sheet, then scoring it on the nine axes.

HoangNguyen0403/agent-skills-standard · 44 tokens

react-patterns

React 19 performance patterns and composition architecture for Vite + Cloudflare projects. 50+ rules ranked by impact — eliminating waterfalls, bundle optimisation, re-render prevention, composition over boolean props, server/client boundaries, and React 19 APIs. Use when writing, reviewing, or refactoring React…

jezweb/claude-skills · 110 tokens

codebase-review

Review an entire codebase for architecture, engineering health, and exploitable risk; generate a prioritized remediation plan, an evidence-anchored system knowledge document, or both.

HoangNguyen0403/agent-skills-standard · 38 tokens

review-ticket

Review a ticket or PR through focused specialist lenses: scope, architecture, security, tests, AC coverage, and PR metadata.

HoangNguyen0403/agent-skills-standard · 28 tokens