What problem does it solve?
Merging a pre-ESM branch into the v8 ESM mainline of apps/app silently reintroduces CommonJS code (require, module.exports, __dirname, .js specifiers) that only fails later at build or runtime. This Skill runs the post-merge coverage pass that detects, converts, and verifies those incoming files so the merge finishes green.
Core Features & Use Cases
- Scoped detection and conversion: Diffs against the merge base to find incoming files, then runs the repo's codemods (cjs-to-esm, migrations-cjs-to-esm, normalize-import-convention) bucket by bucket, leaf to root.
- CJS isolation and config handling: Keeps genuinely CJS-only configs as .cjs with .d.cts siblings, converts migrate-mongo migrations to named ESM exports, and re-evaluates package.json type fields and transpilePackages.
- Verification gates: Drives lint:no-cjs, lint:import-convention, lint:route-guard, build:server, verify-dist-resolution, and a boot smoke test to prove the conversion is complete.
- Use Case: After merging a v7-era feature branch into master, run this Skill to convert the incoming server sources, strip stray .js extensions, fix circular-dependency hazards via factory DI, and confirm all gates pass before opening the PR.
Quick Start
After merging a pre-ESM branch into apps/app, ask the assistant to run the ESM merge coverage pass and bring the merged code up to the ESM convention.