| name | codemod-react-pipeline |
| description | Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases. Use when you need to scaffold a codemod, dry-run it, validate its findings, and apply it across many files (50 to 100k+) without breaking the build. Walks the full inner/outer loop with the Codemod CLI (JSSG, ast-grep, workflows). Triggers on large-scale refactor, legacy React migration, codemod a prop/API change, migrate components across the codebase, run a codemod safely, batched/resumable codemod apply, dry-run a codemod. |
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 ./src is 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.
Don't use it for a one-file edit, or a change better done by hand in a single PR.
Workflow Overview
00 plan ─▶ 01 scaffold ─▶ 02 inner loop ─▶ 03 dry-run ─▶ 04 validate ─▶ 05 batched apply ─▶ 06 verify
goal templates fixture tests preview gates per-batch final
+ blast (transform/ + 1-file trial + findings (idempotency, apply+verify+commit assertions
radius rule/wf/tests) report type/lint/test) (resumable)
│ │
└── sentinel ──── required by ──────┘
(on any failure: working tree reverted; fix and re-run — nothing committed yet)