1. Scaffold your project
Run the interactive scaffolder to create a new codemod package:2. Install Codemod MCP
Codemod MCP gives your AI assistant tools for AST analysis, codemod creation, and testing, directly in your IDE. Add the following to your IDE’s MCP configuration:3. Build your codemod
With MCP installed, ask your AI assistant to create a codemod. Be specific about the transformation you need:Extract React components from inside other components to module scope to prevent re-creation on render.
Prompting tips
Tips for writing effective prompts and getting the most out of MCP.
my-codemod
codemod.yaml
workflow.yaml
scripts
codemod.ts
tests
fixtures
input.tsx
expected.tsx
4. Validate and test
Validate the workflow schema:tests/ directory. If MCP generated test fixtures, they will run automatically.
For test structure, CI integration, and debugging strategies, see Testing.
5. Run your codemod
Run your codemod on a target codebase:6. Publish
Share your codemod with your team or the community:npx codemod @your-scope/codemod-name.
For CI/CD automation, trusted publishers, and API keys, see the Publishing guide.
Next steps
Scale your migrations
Your migration experience does not stop here. When you’re managing migrations across large codebases or multiple teams, the same codemod package can power Campaigns for automated multi-repo rollouts and Insights for tracking adoption progress. See the Platform quickstart for the full enterprise workflow.Getting help
Join the community
Ask questions, get help, and connect with other codemod users on Slack.
Book a call
Schedule a demo or get hands-on help from the Codemod team.