Agent skill

Refactor React Effects

by langfuse in langfuse/langfuse

Refactor avoidable React useEffect usage in Langfuse frontend code.

Custom licenceAuto-check passedDevelopment

Install Refactor React Effects

skills CLI
$ npx skills add langfuse/langfuse --skill refactor-react-effects -a claude-code

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

GitHub CLI
$ gh skill install langfuse/langfuse refactor-react-effects --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/langfuse/langfuse.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/refactor-react-effects .claude/skills/refactor-react-effects && 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
refactor-react-effects
GitHub stars
35k
Token cost
~1.7k tokens
SKILL.md length
860 words
Files
3 (incl. references)
Skills in repo
33
Repo updated
First seen
Licence
Custom licence

At a glance

Refactor avoidable React useEffect usage in Langfuse frontend code.

  • Works in 5 steps: Establish the Behavior Boundary → Inventory Every Effect → Refactor One Semantic Seam at a Time → …
  • Removing effects
  • SKILL.md covers Required Context, Decision Rules, Fast Smell Test and Workflow, plus 1 more section
  • Calls rg and pnpm

What it does

Refactor React Effects is an agent skill from langfuse/langfuse. Refactor avoidable React useEffect usage in Langfuse frontend code. Use when adding, reviewing, or removing effects; initializing forms or local UI state from query data; synchronizing client and server state; moving mutations or async workflows out of components; cleaning every effect from a frontend submodule; or reviewing whether an effect has a valid external-system owner.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/refactoring-patterns.md`).

It sits in Development, covering Refactoring and LLM observability. It works with React and Langfuse. The repository describes itself as: 🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

When your agent uses it

  • Removing effects
  • Initializing forms
  • Local UI state from query data
  • Synchronizing client and server state

Example prompts

  • “/refactor-react-effects”

Workflow steps

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

  1. Establish the Behavior Boundary
  2. Inventory Every Effect
  3. Refactor One Semantic Seam at a Time
  4. Complete a Submodule Migration
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 8b58764. 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

    Shell commands in SKILL.md call:

    • rg
    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    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

Refactor React Effects loads about 1.7k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 860 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 860 words (~1,673 tokens).

“Do not add useEffect by default. Use it only to synchronize a component with a concrete system outside React. If there is no external system, remove the effect.”

— opening of SKILL.md by langfuse, Custom licence
name
refactor-react-effects

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files (references) in .agents/skills/refactor-react-effects of langfuse/langfuse.

  • SKILL.md
  • agents/openai.yaml
  • references/refactoring-patterns.md

Open the folder on GitHubat commit 8b58764

Compare with similar skills

Refactor React Effects 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.

Refactor React Effects compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactor React Effects this skilllangfuse/langfuse35k—~1.7kAutomated safety check: PassCustom licence
Change CleanupSimon-Initiative/oli-torus119—~3.7kAutomated safety check: PassMIT
No Use Effectmattiacerutti/supernova1872 repos~1.7kAutomated safety check: PassMIT
React Best Practicesshapeshift/web2061 repos~2kAutomated safety check: PassMIT
Migrate Componentasyncapi/generator1.1k—~3kAutomated safety check: PassApache-2.0
Elixirstreamband/hydra-srt146—~804Automated safety check: PassApache-2.0

Similar skills

  • Change Cleanup

    Simon-Initiative/oli-torus

    Clean up and harden code introduced by the current branch without drifting into broad refactors.

    119 GitHub stars~3.7k tokensUpdated today
    DevelopmentAuto-check passed
  • No Use Effect

    mattiacerutti/supernova

    Enforce the no-useEffect rule when writing or reviewing React code.

    187 GitHub starsUsed in 2 repos~1.7k tokens
    DevelopmentAuto-check passed
  • React Best Practices

    shapeshift/web

    Comprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering.

    206 GitHub starsUsed in 1 repo~2k tokens
    DevelopmentAuto-check passed
  • Migrate Component

    asyncapi/generator

    Promote a duplicated React/JSX template-local component into the shared @asyncapi/generator-components package.

    1.1k GitHub stars~3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Elixir

    streamband/hydra-srt

    A skill your agent uses for Elixir/Phoenix development in this repo: implementing features, refactors, debugging, tests, Ecto changes, and production-safe fixes.

    146 GitHub stars~804 tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Project Form Patterns

    AkaraChen/aghub

    Form implementation guidance for the aghub desktop app. An agent skill from AkaraChen/aghub.

    272 GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from langfuse/langfuse

All 33 skills in this repo
  • Linear Context Handover

    langfuse/langfuse

    Use Linear as the org's memory: reconstruct a feature's history before touching it, and leave the reasoning behind finished work in the ticket description so the next agent inherits it.

    35k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Add Model Price

    langfuse/langfuse

    A skill your agent uses when editing worker/src/constants/default-model-prices.json, packages/shared/src/server/llm/types.ts, pricing tiers, tokenizer IDs, or matchPattern regexes for OpenAI…

    35k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Backend Dev Guidelines

    langfuse/langfuse

    Build or review Langfuse backend code. An agent skill from langfuse/langfuse.

    35k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Navigate Langfuse repositories, code areas, and agent skills.

    35k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Add To Dependabot CSV

    langfuse/langfuse

    Append GitHub Dependabot or Snyk/code-scanning alerts to an existing vulnerability CSV after verifying their API metadata.

    35k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Clickhouse Best Practices

    langfuse/langfuse

    MUST USE when reviewing ClickHouse schemas, queries, or configurations.

    35k GitHub stars~3.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Refactor React Effects

What does Refactor React Effects do?

Refactor avoidable React useEffect usage in Langfuse frontend code. Refactor React Effects is an agent skill from langfuse/langfuse. Refactor avoidable React useEffect usage in Langfuse frontend code.

When should I use Refactor React Effects?

Refactor React Effects fits situations like: removing effects; initializing forms; local UI state from query data; synchronizing client and server state.

How do I install Refactor React Effects in Claude Code?

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

How do I install Refactor React Effects in Codex?

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

Can I use Refactor React Effects 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 langfuse/langfuse --skill refactor-react-effects -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor-react-effects, .gemini/skills/refactor-react-effects, .github/skills/refactor-react-effects and .opencode/skills/refactor-react-effects in your project.

What does Refactor React Effects need to run?

Going by SKILL.md and its folder, Refactor React Effects needs the command-line tools its instructions call (rg and pnpm).

Does Refactor React Effects 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 Refactor React Effects 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 Refactor React Effects use?

Refactor React Effects has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Refactor React Effects use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Refactor React Effects?

Skills that share tags, products or a category with Refactor React Effects: Change Cleanup (Simon-Initiative/oli-torus, 119 stars), No Use Effect (mattiacerutti/supernova, 187 stars), React Best Practices (shapeshift/web, 206 stars) and Migrate Component (asyncapi/generator, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactor React Effects?

langfuse (a GitHub organization) maintains it in langfuse/langfuse, which has 35,460 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 7, 2026.

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