codemod-react-pipeline
Installation
SKILL.md
Codemod React Pipeline
A safe, repeatable workflow for applying JSX / TSX / React codemods to large legacy
codebases — from a 50-file rename to a 100k-file API migration. It composes the
Codemod CLI (JSSG, ast-grep, workflows) into an inner/outer loop and
gates every mass change behind a dry-run plus validation. For the why behind each rule it cites,
see the sibling codemod best-practices reference.
When to Apply
Use this skill when:
- You're migrating a pattern across a large React/TS codebase (component/prop rename, deprecated
API, import swap, hook migration) and a hand-run
codemod jssg run ./t.ts ./srcis too risky. - You need the change to land incrementally and reviewably — per-batch commits, resumable on failure, with the build/typecheck/tests green at every checkpoint.
- You want to see and validate the findings (what would change, and whether it's safe) before touching files at scale.
- The transform must be idempotent and proven so before mass apply.