Agent skill

React Best Practices

by freekmurze in freekmurze/dotfiles

Provides React patterns for hooks, effects, refs, and component design.

No licenceAuto-check passedFrontend & Design

Install React Best Practices

skills CLI
$ npx skills add freekmurze/dotfiles --skill react-best-practices -a claude-code

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

GitHub CLI
$ gh skill install freekmurze/dotfiles react-best-practices --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/freekmurze/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/config/claude/skills/react-best-practices .claude/skills/react-best-practices && 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-best-practices
GitHub stars
1k
Used in
1 other repo
Token cost
~1.3k tokens
SKILL.md length
257 words
Files
6 (incl. references)
Skills in repo
51
Repo updated
First seen
Licence
None found

At a glance

Provides React patterns for hooks, effects, refs, and component design.

  • Works in 7 steps: Need to respond to user interaction? Use… → Need computed value from props/state?… → Need cached expensive calculation? Use… → …
  • Writing React components (.tsx
  • SKILL.md covers Core Principle: Effects Are…, When to Use Effects, When NOT to Use Effects and Summary: Decision Tree, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

React Best Practices is an agent skill from freekmurze/dotfiles. Provides React patterns for hooks, effects, refs, and component design. Covers escape hatches, anti-patterns, and correct effect usage. Must use when reading or writing React components (.tsx, .jsx files with React imports).

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/component-patterns.md`, `references/custom-hooks.md` and `references/effect-cleanup.md`).

It sits in Frontend & Design, covering React components. It works with React.

When your agent uses it

  • Writing React components (.tsx
  • .jsx files with React imports)

Example prompts

  • “Use the react-best-practices skill to provide React patterns for hooks, effects, refs, and component design”
  • “/react-best-practices”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Need to respond to user interaction? Use event handler
  2. Need computed value from props/state? Calculate during render
  3. Need cached expensive calculation? Use useMemo
  4. Need to reset state on prop change? Use key prop
  5. Need to synchronize with external system? Use Effect with cleanup
  6. Need non-reactive code in Effect? Use useEffectEvent
  7. Need mutable value that doesn't trigger render? Use ref

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    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 Best Practices loads about 1.3k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 257 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 257 words (~1,278 tokens).

“Effects let you "step outside" React to synchronize with external systems. Most component logic should NOT use Effects. Before writing an Effect, ask: "Is there a way to do this without an Effect?"”

— opening of SKILL.md by freekmurze
name
react-best-practices
paths
**/*.{tsx,jsx}

Read the full SKILL.md on GitHub

Files

SKILL.md and 5 other files (references) in config/claude/skills/react-best-practices of freekmurze/dotfiles.

  • SKILL.md
  • references/component-patterns.md
  • references/custom-hooks.md
  • references/effect-cleanup.md
  • references/effect-dependencies.md
  • references/refs.md

Open the folder on GitHubat commit 296be1a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in freekmurze/dotfiles, which our catalogue first saw on October 7, 2026.

Compare with similar skills

React Best Practices 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 Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Best Practices this skillfreekmurze/dotfiles1k1 repos~1.3kAutomated safety check: PassNone
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
React Composition Patternsvercel-labs/openreview1.7k58 repos~721Automated safety check: PassMIT
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
React UI State PatternsChrisWiles/claude-code-showcase6.1k7 repos~1.6kAutomated safety check: PassNone
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT

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
  • React Composition Patterns

    vercel-labs/openreview

    Official

    Rules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes.

    1.7k GitHub starsUsed in 58 repos~721 tokens
    Frontend & DesignAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • React UI State Patterns

    ChrisWiles/claude-code-showcase

    Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.

    6.1k GitHub starsUsed in 7 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations).

    4k GitHub starsUsed in 5 repos~1.2k tokens
    Frontend & DesignAuto-check passed

More from freekmurze/dotfiles

All 51 skills in this repo
  • Social Content

    freekmurze/dotfiles

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms.

    1k GitHub starsUsed in 22 repos~2.1k tokens
    Auto-check passed
  • Email Sequence

    freekmurze/dotfiles

    When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program.

    1k GitHub starsUsed in 18 repos~2k tokens
    Auto-check passed
  • Referral Program

    freekmurze/dotfiles

    When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy.

    1k GitHub starsUsed in 16 repos~1.8k tokens
    Auto-check passed
  • Ab Test Setup

    freekmurze/dotfiles

    When the user wants to plan, design, or implement an A/B test or experiment.

    1k GitHub starsUsed in 15 repos~1.8k tokens
    Auto-check passed
  • Onboarding Cro

    freekmurze/dotfiles

    When the user wants to optimize post-signup onboarding, user activation, first-run experience, or time-to-value.

    1k GitHub starsUsed in 15 repos~1.6k tokens
    Auto-check passed
  • Typefully

    freekmurze/dotfiles

    Create, schedule, and manage social media posts via Typefully.

    1k GitHub starsUsed in 1 repo~3.4k tokens
    Auto-check: notes

Works with

Questions about React Best Practices

What does React Best Practices do?

Provides React patterns for hooks, effects, refs, and component design. React Best Practices is an agent skill from freekmurze/dotfiles. Provides React patterns for hooks, effects, refs, and component design.

When should I use React Best Practices?

React Best Practices fits situations like: writing React components (.tsx; .jsx files with React imports).

How do I install React Best Practices in Claude Code?

Run `npx skills add freekmurze/dotfiles --skill react-best-practices -a claude-code`. Or copy the skill folder (config/claude/skills/react-best-practices in freekmurze/dotfiles) into .claude/skills/react-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install React Best Practices in Codex?

Run `npx skills add freekmurze/dotfiles --skill react-best-practices -a codex`. Or copy the skill folder (config/claude/skills/react-best-practices in freekmurze/dotfiles) into .agents/skills/react-best-practices in your project. Codex loads it when a task matches its description.

Can I use React Best Practices 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 freekmurze/dotfiles --skill react-best-practices -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-best-practices, .gemini/skills/react-best-practices, .github/skills/react-best-practices and .opencode/skills/react-best-practices in your project.

What does React Best Practices need to run?

SKILL.md names no scripts, command-line tools or credentials: React Best Practices is instructions for the agent only.

Does React Best Practices 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 Best Practices 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 Best Practices use?

No licence was found for React Best Practices or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does React Best Practices use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to React Best Practices?

Skills that share tags, products or a category with React Best Practices: Web Artifacts Builder (anthropics/skills, 180k stars), React Composition Patterns (vercel-labs/openreview, 1.7k stars), React Router Development (remix-run/react-router, 57k stars) and React UI State 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 Best Practices?

freekmurze (a GitHub user) maintains it in freekmurze/dotfiles, which has 1,012 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 5, 2026.

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