react-modernization Skill for Claude: Upgrade React and Move to Hooks
Guides Claude through React version upgrades, class-to-hooks rewrites and codemods.
- Installs
- 12.9K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 1
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
react-modernization is a guidance skill from the wshobson/agents collection. When you ask Claude to upgrade a React app, convert class components to hooks, or adopt React 18 features, it follows the skill's upgrade path from 16 to 17 to 18, its before-and-after examples and its migration checklist.
The skill bundles no scripts, but references/details.md lists shell commands that run React codemods with npx. Those commands are written into the guide for Claude to use, so read them before you approve a run.
Good for
- Frontend developers upgrading an older React app to React 18
- Teams converting class components to function components with hooks
- Engineers who want codemods for repetitive refactors
- Anyone adding TypeScript or code splitting during a React cleanup
Install react-modernization
Claude Code
- 1
Copy this prompt.
Install the react-modernization skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install framework-migration@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole framework-migration plugin: 2 agents, 3 commands and 4 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands.
From the project README. Source.
What's in the skill
When it loads
Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing React codebases, migrating to React Hooks, or upgrading to latest React versions.
Sections in SKILL.md
- When to Use This Skill
- Version Upgrade Path
- React 16 → 17 → 18
- Class to Hooks Migration
- State Management
- Lifecycle Methods to Hooks
- Context and HOCs to Hooks
- React 18 Concurrent Features
- New Root API
- Automatic Batching
- Transitions
- Suspense for Data Fetching
- Additional patterns and templates
Key facts
- Author
- wshobson
- Repository
- wshobson/agents
- Installs on skills.sh
- 12,873 as of 2026-11-02
- GitHub stars
- 42,081 for the whole repo, 2026-11-02
- License
- MIT (repo metadata)
- Last commit to the repo
- 2026-10-30
What it includes
Lists breaking changes for React 17 and 18
Names what changes in each step: event delegation and effect cleanup timing in 17, then automatic batching, concurrent rendering, Strict Mode double invocation and the new root API in 18.
Try: “Upgrade this app from React 17 to 18 and list what will break.”
Version upgrade pathBefore and after examples for state, lifecycle, context and HOCs
Shows how this.state becomes useState, lifecycle methods become useEffect, contextType becomes useContext and a data-fetching HOC becomes a custom hook.
Try: “Convert this class component to a function component with hooks.”
Class to hooks migrationNew createRoot API and automatic batching examples
Shows ReactDOM.render replaced by createRoot, and how updates are batched even inside timers, with flushSync as the opt-out.
React 18 concurrent featuresnpx jscodeshift and npx codemod commands in references/details.md
Lists commands that run react-codemod transforms on src/, including a TypeScript variant, a dry run with --dry --print, and a class-to-hooks codemod. A custom codemod example is included.
Try: “Run the update-react-imports codemod as a dry run first.”
Runs code ·
CodemodsuseMemo, useCallback, React.memo, code splitting and typing components
Gives patterns for memoization and lazy loading plus a TypeScript migration section with generic component props.
Performance and TypeScriptPre-migration, hooks, React 18, performance and testing checklists
Ends with checklists, such as updating dependencies step by step, starting with leaf components and testing under StrictMode.
Migration checklist
From the official docs
Permissions
Medium risk
The codemod commands in the reference file download and run third-party transforms on your source folder. Use a clean git branch, try the dry run first and review the diff before you commit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
Codemods run third-party code on your source
The guide runs npx jscodeshift with transforms from raw.githubusercontent.com/reactjs/react-codemod and npx codemod react/hooks/convert-class-to-function. Run them on a clean branch, read the transform first, and review the diff. github.com
Dry run is shown for one transform only
The guide shows --dry --print for rename-unsafe-lifecycles. Add the same flags to the others when you want a preview before any change. github.com
Technical details
| Talks to | raw.githubusercontent.com (react-codemod transforms named in references/details.md) |
|---|---|
| Scopes |
|
Questions
What does the react-modernization skill do?
It guides Claude through upgrading React, moving class components to hooks, adopting React 18 features and running codemods.
How do I install it in Claude Code, the Claude app or Codex?
Use the install box at the top of this page. It installs the skill folder with SKILL.md and references/details.md.
Does it change my code by itself?
The skill has no scripts of its own. Claude edits your files when you ask it to, and the guide lists codemod commands that act on src/.
Is it safe?
The codemod commands in references/details.md fetch transforms from raw.githubusercontent.com and run them with npx on your source folder. Use a clean git branch, start with the dry-run command in the guide, and review the diff.
Does it need an API key?
No key is mentioned in SKILL.md or references/details.md. The codemod commands need Node.js and network access to download the transforms.
Does it cover React versions after 18?
SKILL.md describes the upgrade path from 16 to 18 and React 18 features. The skill text does not describe later versions.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/framework-migration/skills/react-modernization
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- react-modernization SKILL.md · github.com
- wshobson/agents README · github.com
- framework-migration plugin manifest · github.com
- react-modernization references/details.md · github.com