Agent skill

React Patterns

by xenitV1 in xenitV1/Antigravity-Workflows

Modern React patterns and principles. An agent skill from xenitV1/Antigravity-Workflows.

MITAuto-check passedFrontend & Design

Install React Patterns

skills CLI
$ npx skills add xenitV1/Antigravity-Workflows --skill react-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xenitV1/Antigravity-Workflows react-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xenitV1/Antigravity-Workflows.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/react-patterns .claude/skills/react-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
react-patterns
GitHub stars
130
Used in
8 other repos
Token cost
~948 tokens
SKILL.md length
364 words
Files
1
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Modern React patterns and principles. An agent skill from xenitV1/Antigravity-Workflows.

  • Works in 10 steps: Component Design Principles → Hook Patterns → State Management Selection → …
  • Tasks that involve React components
  • SKILL.md covers 1. Component Design Principles, 2. Hook Patterns, 3. State Management Selection and 4. React 19 Patterns, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

React Patterns is an agent skill from xenitV1/Antigravity-Workflows. Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components. It works with TypeScript. The licence is MIT.

When your agent uses it

  • Tasks that involve React components

Example prompts

  • “/react-patterns”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Glob, Grep

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Component Design Principles
  2. Hook Patterns
  3. State Management Selection
  4. React 19 Patterns
  5. Composition Patterns
  6. Performance Principles
  7. Error Handling
  8. TypeScript Patterns
  9. Testing Principles
  10. Anti-Patterns

What it can do on your machine

Read from SKILL.md and the folder at commit f0a1fa7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

React Patterns loads about 948 tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 364 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~948

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xenitV1/Antigravity-Workflows at commit f0a1fa7, republished under its MIT licence (© xenitV1). 364 words, ~948 tokens.

Download SKILL.mdSave it as .claude/skills/react-patterns/SKILL.md (or your agent's skills folder).
name
react-patterns
description
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
allowed-tools
Read, Write, Edit, Glob, Grep

React Patterns

Principles for building production-ready React applications.


1. Component Design Principles

Component Types
TypeUseState
ServerData fetching, staticNone
ClientInteractivityuseState, effects
PresentationalUI displayProps only
ContainerLogic/stateHeavy state
Design Rules
  • One responsibility per component
  • Props down, events up
  • Composition over inheritance
  • Prefer small, focused components

2. Hook Patterns

When to Extract Hooks
PatternExtract When
useLocalStorageSame storage logic needed
useDebounceMultiple debounced values
useFetchRepeated fetch patterns
useFormComplex form state
Hook Rules
  • Hooks at top level only
  • Same order every render
  • Custom hooks start with "use"
  • Clean up effects on unmount

3. State Management Selection

ComplexitySolution
SimpleuseState, useReducer
Shared localContext
Server stateReact Query, SWR
Complex globalZustand, Redux Toolkit
State Placement
ScopeWhere
Single componentuseState
Parent-childLift state up
SubtreeContext
App-wideGlobal store

4. React 19 Patterns

New Hooks
HookPurpose
useActionStateForm submission state
useOptimisticOptimistic UI updates
useRead resources in render
Compiler Benefits
  • Automatic memoization
  • Less manual useMemo/useCallback
  • Focus on pure components

5. Composition Patterns

Compound Components
  • Parent provides context
  • Children consume context
  • Flexible slot-based composition
  • Example: Tabs, Accordion, Dropdown
Render Props vs Hooks
Use CasePrefer
Reusable logicCustom hook
Render flexibilityRender props
Cross-cuttingHigher-order component

6. Performance Principles

When to Optimize
SignalAction
Slow rendersProfile first
Large listsVirtualize
Expensive calcuseMemo
Stable callbacksuseCallback
Show full SKILL.md (137 more words)Show less
Optimization Order
  1. Check if actually slow
  2. Profile with DevTools
  3. Identify bottleneck
  4. Apply targeted fix

7. Error Handling

Error Boundary Usage
ScopePlacement
App-wideRoot level
FeatureRoute/feature level
ComponentAround risky component
Error Recovery
  • Show fallback UI
  • Log error
  • Offer retry option
  • Preserve user data

8. TypeScript Patterns

Props Typing
PatternUse
InterfaceComponent props
TypeUnions, complex
GenericReusable components
Common Types
NeedType
ChildrenReactNode
Event handlerMouseEventHandler
RefRefObject<Element>

9. Testing Principles

LevelFocus
UnitPure functions, hooks
IntegrationComponent behavior
E2EUser flows
Test Priorities
  • User-visible behavior
  • Edge cases
  • Error states
  • Accessibility

10. Anti-Patterns

❌ Don't✅ Do
Prop drilling deepUse context
Giant componentsSplit smaller
useEffect for everythingServer components
Premature optimizationProfile first
Index as keyStable unique ID

Remember: React is about composition. Build small, combine thoughtfully.

© xenitV1, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/react-patterns of xenitV1/Antigravity-Workflows.

Open the folder on GitHubat commit f0a1fa7

Used in 8 other repositories

We found 22 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 8 other GitHub owners. This page covers the copy in xenitV1/Antigravity-Workflows, which our catalogue first saw on October 7, 2026.

Compare with similar skills

React Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

React Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Patterns this skillxenitV1/Antigravity-Workflows1308 repos~948Automated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Formik Form PatternsChrisWiles/claude-code-showcase6.1k3 repos~2.1kAutomated safety check: PassNone
Animated React Component LibrariesHainrixz/editor-pro-max2601 repos~5.7kAutomated safety check: PassCustom licence

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Formik Form Patterns

    ChrisWiles/claude-code-showcase

    Shows how to build forms with Formik and Yup validation, including conditional rules, field helpers, GraphQL submission, edit forms and multi-step flows.

    6.1k GitHub starsUsed in 3 repos~2.1k tokens
    Frontend & DesignAuto-check passed
  • Animated React Component Libraries

    Hainrixz/editor-pro-max

    Helps choose and drop in animated React components from Magic UI and React Bits for landing pages, marketing sites and dashboards, instead of hand-coding animations.

    260 GitHub starsUsed in 1 repo~5.7k tokens
    Frontend & DesignAuto-check passed
  • Phoenix Frontend

    Arize-ai/phoenix

    Frontend development guidelines for the Phoenix AI observability platform.

    12k GitHub stars~709 tokensUpdated today
    Frontend & DesignAuto-check passed

More from xenitV1/Antigravity-Workflows

All 42 skills in this repo
  • Parallel Agents

    xenitV1/Antigravity-Workflows

    Native multi-agent orchestration using Claude Code's Agent Tool.

    130 GitHub starsUsed in 9 repos~1.3k tokens
    Auto-check passed
  • Mobile Design

    xenitV1/Antigravity-Workflows

    Mobile-first design thinking and decision-making for iOS and Android apps.

    130 GitHub starsUsed in 2 repos~3.7k tokens
    Auto-check: notes
  • Bash Linux

    xenitV1/Antigravity-Workflows

    Bash/Linux terminal patterns. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 8 repos~1k tokens
    Auto-check: notes
  • Behavioral Modes

    xenitV1/Antigravity-Workflows

    AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate).

    130 GitHub starsUsed in 8 repos~1.3k tokens
    Auto-check passed
  • Plan Writing

    xenitV1/Antigravity-Workflows

    Structured task planning with clear breakdowns, dependencies, and verification criteria.

    130 GitHub starsUsed in 8 repos~994 tokens
    Auto-check passed
  • I18n Localization

    xenitV1/Antigravity-Workflows

    Internationalization and localization patterns. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 7 repos~758 tokens
    Auto-check passed

Works with

Questions about React Patterns

What does React Patterns do?

Modern React patterns and principles. An agent skill from xenitV1/Antigravity-Workflows. React Patterns is an agent skill from xenitV1/Antigravity-Workflows. Modern React patterns and principles.

When should I use React Patterns?

React Patterns fits situations like: tasks that involve React components.

How do I install React Patterns in Claude Code?

Run `npx skills add xenitV1/Antigravity-Workflows --skill react-patterns -a claude-code`. Or copy the skill folder (skills/react-patterns in xenitV1/Antigravity-Workflows) into .claude/skills/react-patterns in your project. Claude Code loads it when a task matches its description.

How do I install React Patterns in Codex?

Run `npx skills add xenitV1/Antigravity-Workflows --skill react-patterns -a codex`. Or copy the skill folder (skills/react-patterns in xenitV1/Antigravity-Workflows) into .agents/skills/react-patterns in your project. Codex loads it when a task matches its description.

Can I use React Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xenitV1/Antigravity-Workflows --skill react-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/react-patterns, .gemini/skills/react-patterns, .github/skills/react-patterns and .opencode/skills/react-patterns in your project.

What does React Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: React Patterns is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep.

Does React Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is React Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does React Patterns use?

React Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Patterns use?

About 948 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to React Patterns?

Skills that share tags, products or a category with React Patterns: Web Artifacts Builder (anthropics/skills, 180k stars), Dify Component Writing Guide (langgenius/dify, 158k stars), React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k stars) and Formik Form Patterns (ChrisWiles/claude-code-showcase, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Patterns?

xenitV1 (a GitHub user) maintains it in xenitV1/Antigravity-Workflows, which has 130 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on January 14, 2026.

Source: xenitV1/Antigravity-Workflows on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.