Agent skill Frontend
Chakra UI Migrate
Build or refine reusable components for a web interface.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add chakra-ui/chakra-ui --skill chakra-ui-migrate --agent claude-code --yesCheck this file in your project.claude/skills/chakra-ui-migrate/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add chakra-ui/chakra-ui --skill chakra-ui-migrateSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring a clean migration branch, Node 20+ and the current Chakra lockfile. The scratch fixture used @chakra-ui/codemod and @chakra-ui/react 3.38.0.
View operation manualWhat this skill helps with
- Build or refine reusable components for a web interface.
Good for
- Component implementation
- Skill name
- chakra-ui-migrate
- Scenario
- Preview and migrate one Chakra v2 settings form
- Deliverable
- A dry-run file list, scoped approved patch and a verified v3 form journey.
- Skill name
chakra-ui-migrate- Repository
chakra-ui/chakra-ui
Define a component task with an observable result
A request with an unclear outcome
Swap package versions and fix errors when the site launches.
Provider, compound forms and renamed props can fail independently.
A workflow with observable results
- Inventory v2 usage and run the dry preview
- Apply approved changes and check the provider
- Build and verify the form's real states
Chakra UI Migrate operation manual
Separate reversible codemod discovery from manual provider and form verification.
Replace the bracketed details with your own project and target.
Inventory v2 usage and run the dry preview
Read the codemod's real terminal output and unchanged files.
Prompt · Step 1Use chakra-ui-migrate on [v2 settings form project]. Inventory Chakra dependencies, provider and imported form components. From the intended project root run the documented `npx @chakra-ui/codemod@3.38.0 upgrade --dry` with interactive terminal access if the version asks questions. Report dependency plans and would-change files, and confirm that code and package files did not change.Apply approved changes and check the provider
Review the patch for prop names, form anatomy and dependencies.
Prompt · Step 2Use chakra-ui-migrate to apply [approved form migration] in the isolated branch. Review dependency removals for other consumers. Verify the v3 ChakraProvider system value, migrate FormControl to the Field compound parts, and check Stack `gap`, button `colorPalette` and native `disabled`. Review generated changes and fill manual gaps in the selected form.Build and verify the form's real states
Test empty, valid and disabled behavior with local data.
- The dry run reports candidate files without modifying the fixture.
- The migrated form detects errors and accepts the corrected value.
Prompt · Step 3Use chakra-ui-migrate to run the existing v3 build for [local settings form]. Submit an invalid test value, check the Field error association, correct it and verify the local save occurs once. Confirm disabled controls and keyboard focus. Report the tested v3 version, remaining v2 usages and any manual follow-up.
Find the relevant rule
Point the assistant to the installed Skill and a specific issue.
The dry run waits at a terminal questionReference
- Command or reference
SKILL.md · Run the codemod- Examples
- Review the proposed changes in an interactive terminal; the `--dry` flag keeps the run as a preview.
The migrated UI is unstyled or missing contextReference
- Command or reference
SKILL.md · Update the Provider- Examples
- Check the v3 Provider receives the project's system value.
Chakra UI Migrate troubleshooting
Does the dry run give the exact patch?
The tested codemod listed candidate files and transforms. Review the actual patch on an isolated branch when you approve applying it.