Agent skill

React Component Refactor

by dataelement in dataelement/bisheng

Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

Apache-2.0Auto-check passedFrontend & Design

Install React Component Refactor

skills CLI
$ npx skills add dataelement/bisheng --skill react-component-refactor -a claude-code

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

GitHub CLI
$ gh skill install dataelement/bisheng react-component-refactor --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/dataelement/bisheng.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/react-component-refactor .claude/skills/react-component-refactor && 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-component-refactor
GitHub stars
12k
Token cost
~179 tokens
SKILL.md length
67 words
Files
3
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

  • Works in 3 steps: Read the Guidelines: Read… → Read the Examples: Read… → Execute: Follow the guidelines to…
  • Tasks that involve React components
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Refactoring

What it does

React Component Refactor is an agent skill from dataelement/bisheng. Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

Its SKILL.md is about 180 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `resources/EXAMPLES.md` and `resources/GUIDELINES.md`).

It sits in Frontend & Design, covering React components and Refactoring. The repository describes itself as: BISHENG is an open LLM devops platform for next generation Enterprise AI applications. Powerful and comprehensive features include: GenAI workflow, RAG, Agent, Unified model… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve React components
  • Tasks that involve Refactoring

Example prompts

  • “/react-component-refactor”

Workflow steps

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

  1. Read the Guidelines: Read resources/GUIDELINES.md for the complete refactoring checklist and rules.
  2. Read the Examples: Read resources/EXAMPLES.md for concrete before/after patterns from real refactoring work.
  3. Execute: Follow the guidelines to refactor the target module.

What it can do on your machine

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

    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 Component Refactor loads about 179 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 67 words of instructions outside code blocks.

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

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 dataelement/bisheng at commit cb9b77a, republished under its Apache-2.0 licence (© dataelement). 67 words, ~179 tokens.

Download SKILL.mdSave it as .claude/skills/react-component-refactor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
react-component-refactor
description
Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

React Component Refactor

This skill provides a systematic approach for refactoring complex React components. Use it when a module has overgrown files, tangled state, or unclear separation of concerns.

Instructions

  1. Read the Guidelines: Read resources/GUIDELINES.md for the complete refactoring checklist and rules.
  2. Read the Examples: Read resources/EXAMPLES.md for concrete before/after patterns from real refactoring work.
  3. Execute: Follow the guidelines to refactor the target module.

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

Files

SKILL.md and 2 other files in .claude/skills/react-component-refactor of dataelement/bisheng.

  • SKILL.md
  • resources/EXAMPLES.md
  • resources/GUIDELINES.md

Open the folder on GitHubat commit cb9b77a

Compare with similar skills

React Component Refactor 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 Component Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
React Component Refactor this skilldataelement/bisheng12k—~179Automated safety check: PassApache-2.0
React Composition Patternsvercel-labs/openreview1.7k58 repos~721Automated safety check: PassMIT
Vercel React Best Practicessanity-io/sanity6.4k130 repos~1.6kAutomated safety check: PassMIT
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React Best Practicesmastra-ai/mastra29k—~1.9kAutomated safety check: PassCustom licence
No Use Effectfastrepl/anarlog9.4k—~825Automated safety check: PassMIT

Similar skills

  • 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
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 130 repos~1.6k 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 today
    Frontend & DesignAuto-check passed
  • React Best Practices

    mastra-ai/mastra

    React performance optimization guidelines from Mastra Engineering.

    29k GitHub stars~1.9k tokensUpdated today
    Frontend & DesignAuto-check passed
  • No Use Effect

    fastrepl/anarlog

    Avoid direct React useEffect usage when writing or reviewing React components and hooks.

    9.4k GitHub stars~825 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Refactor a monolithic React component file into a standardized module structure with components/, hooks/, utils/, and config/ subdirectories.

    320 GitHub stars~2.2k tokensUpdated today
    Frontend & DesignAuto-check passed

More from dataelement/bisheng

All 10 skills in this repo
  • BiSheng DOCX Builder

    dataelement/bisheng

    Builds or edits Word .docx documents inside BiSheng's code executor with python-docx, handling Chinese fonts, tables of contents, page numbers and official-document layout.

    12k GitHub stars~2.6k tokensUpdated 7 days ago
    Auto-check passed
  • BiSheng PPTX Builder

    dataelement/bisheng

    Builds PowerPoint decks in BiSheng's code executor with python-pptx, from scratch, from a supplied template or by rewriting an existing file, with Chinese layout rules.

    12k GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Builds, edits and cleans Excel workbooks inside BiSheng's code executor using openpyxl, with LibreOffice recalculation and a pre-delivery check.

    12k GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • BiSheng SDD Document Review

    dataelement/bisheng

    Reviews BiSheng spec, design and tasks documents with checklists for PRD gaps, handover readiness and acceptance traceability, producing a report or an LGTM.

    12k GitHub stars~717 tokensUpdated 7 days ago
    Auto-check passed
  • Task-Level Code Review

    dataelement/bisheng

    Runs a light convention check on one finished spec-driven task, choosing checks by task type and ending in pass, pass-with-notes or needs-fix.

    12k GitHub stars~652 tokensUpdated 7 days ago
    Auto-check passed
  • Maps BiSheng's approval-center architecture to exact service files and methods, so a change to approval logic can be located without searching the whole repo.

    12k GitHub stars~4k tokensUpdated 7 days ago
    Auto-check passed

Questions about React Component Refactor

What does React Component Refactor do?

Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns. React Component Refactor is an agent skill from dataelement/bisheng. Refactor large React components by extracting hooks, splitting sub-components, and organizing directory structure following established patterns.

When should I use React Component Refactor?

React Component Refactor fits situations like: tasks that involve React components; tasks that involve Refactoring.

How do I install React Component Refactor in Claude Code?

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

How do I install React Component Refactor in Codex?

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

Can I use React Component Refactor 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 dataelement/bisheng --skill react-component-refactor -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-component-refactor, .gemini/skills/react-component-refactor, .github/skills/react-component-refactor and .opencode/skills/react-component-refactor in your project.

What does React Component Refactor need to run?

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

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

React Component Refactor is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does React Component Refactor use?

About 179 tokens (SKILL.md is roughly 716 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 Component Refactor?

Skills that share tags, products or a category with React Component Refactor: React Composition Patterns (vercel-labs/openreview, 1.7k stars), Vercel React Best Practices (sanity-io/sanity, 6.4k stars), Dify Component Writing Guide (langgenius/dify, 158k stars) and React Best Practices (mastra-ai/mastra, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains React Component Refactor?

dataelement (a GitHub organization) maintains it in dataelement/bisheng, which has 12,027 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 30, 2026.

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