agentleFS
ku5icku5ic/claude-kit/skills/react-patterns/SKILL.md

react-patterns

Skill2 starsChanged 54 days agoMITView on GitHub

React core patterns - hooks rules, component design, rendering performance, anti-patterns, and review checklist, independent of any meta-framework. Use whenever the project contains `.jsx`/`.tsx` files or `react` in `package.json`, OR the user asks about React, its hooks, component structure, or rendering and hydration behavior, even if React is not mentioned by name.

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use typescript-strict, testing-strategy and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kevinaimonsterSkill

    typescript-strict

    TypeScript strict mode and advanced type system assistant. Helps write strictly-typed TypeScript code with generics, type guards, utility types, conditional types, mapped types, and template literal types. Trigger when user says 'TypeScript types' 'type gymnastics' 'TypeScript generics' 'strict TypeScript' 'type guard' 'TS类型' 'TypeScript严格模式' '类型体操' '泛型怎么写' 'TS type help'. Keywords: TypeScript, strict mode, generics, type guard, utility types, conditional types, mapped types, template literal types, infer, extends, keyof, typeof, type narrowing, discriminated unions, type assertion, type predicate, type gymnastics, TS, 类型体操, 泛型, 类型守卫, 严格类型

    Also in 3 projects that use this

  • AnthropicSkill

    testing-strategy

    Design test strategies and test plans. Trigger with "how should we test", "test strategy for", "write tests for", "test plan", "what tests do we need", or when the user needs help with testing approaches, coverage, or test architecture.

    Also in 4 projects that use this

  • rohitg00Skill

    springboot-patterns

    Spring Boot patterns including JPA repositories, REST controllers, layered services, and configuration

    Also in 3 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 9 projects that use this

  • MicrosoftSkill

    error-handling

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。

    Also in 4 projects that use this

  • Svenja-devSkill

    e2e-testing

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default assumption: React 19 with the modern (concurrent) renderer.

    line 8

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React patterns

Default assumption: React 19 with the modern (concurrent) renderer.

  • Most rules apply unchanged to React 18; deltas (use, useActionState, useFormStatus, useOptimistic, Actions) are called out where they matter.
  • Server Components are a feature of frameworks built on React; framework-specific patterns load when those framework signals are present in the project.
  • Adapt advice to the version in the project's package.json or lockfile.

Reference files

FileCovers
reference/correctness.mdRules of Hooks, dependency arrays, key stability, effect cleanup, render pitfalls
reference/performance.mdMemoization costs, React.memo, virtualization, lazy init, context, React Compiler
reference/structure.mdControlled vs uncontrolled, derived state, prop drilling, effects vs handlers
reference/anti-patterns.mdSeven review-time anti-patterns with severity calls
reference/when-to-split.mdHeuristics for component splitting and what does not justify a split

References

Version notes

Checked: 2026-09-26 against https://react.dev/blog and Context7 /react/react

  • 19.3 (2026-09-09): patch-level; no guidance change. use() may be called in conditionals and loops (https://react.dev/reference/react/use); do not branch on the promise's own status before calling it.
  • 19.0 (2024-12-05): Actions, use, useActionState, useFormStatus, useOptimistic. Verify against the per-hook page on react.dev, not older blog posts.
  • React Compiler: stable, opt-in, installed per build tool; not present in every project.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.