Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pproenca avatar

Migrate Js To Modern Typescript

  • 80 installs
  • 191 repo stars
  • Updated July 24, 2026
  • pproenca/dot-skills

migrate-js-to-modern-typescript is a Claude Code skill in the AI & Agent Building category.

Key points

  • migrate-js-to-modern-typescript
  • AI & Agent Building
  • AI-coding skill

Migrate Js To Modern Typescript by the numbers

  • 80 all-time installs (skills.sh)
  • +8 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #5,257 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pproenca/dot-skills --skill migrate-js-to-modern-typescript

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs80
repo stars191
Last updatedJuly 24, 2026
Repositorypproenca/dot-skills

How do I helps with ai & agent building tasks during ai-assisted development?

Helps with ai & agent building tasks during AI-assisted development.

Who is it for?

Best when you're working on ai & agent building and need structured help with migrate-js-to-modern-typescript.

Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.

When should I use this skill?

When you need to helps with ai & agent building tasks during ai-assisted development, or when migrate-js-to-modern-typescript is a claude code skill in the ai & agent building category.

What you get

Structured output aligned to migrate-js-to-modern-typescript: migrate-js-to-modern-typescript; AI & Agent Building; AI-coding skill.

Files

SKILL.mdMarkdownGitHub ↗

JavaScript to TypeScript Migration Best Practices

Guide for taking a JavaScript codebase to strict, modern TypeScript without a big-bang rewrite. Contains 42 rules across 7 categories, prioritized by impact to drive an incremental, file-by-file migration that keeps the build compiling at every step.

When to Apply

Reference these guidelines when:

  • Converting a .js codebase to .ts (whole project or one module at a time)
  • Adding types to existing JavaScript via JSDoc or annotations
  • Choosing a tsconfig and allowJs strategy for a mixed JS/TS repo
  • Turning on strict mode or individual strict flags on a large codebase
  • Replacing any, as casts, and ! assertions left over from a quick conversion
  • Validating external data (JSON, env, API responses) so the types you wrote are true at runtime
  • Converting CommonJS to ESM, prototypes to classes, and other JS idioms to TS
  • Updating the build, runner, and CI to type-check and publish TypeScript

How the Migration Flows

tsconfig & strategy → strictness ratchet → type the surfaces → kill any/casts
   → validate runtime boundaries → convert JS idioms → tooling/build/CI

Decisions at the front cascade: a wrong tsconfig or a top-down conversion order forces you to re-type modules twice, and an early any flood poisons everything downstream. Work from the front of this pipeline and from the leaves of the dependency graph inward.

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Migration Setup & tsconfigCRITICALsetup-
2Strictness RatchetingCRITICALstrict-
3Typing Public SurfacesHIGHsurface-
4Replacing any & Unsafe CastsHIGHunsafe-
5Runtime Data ValidationMEDIUM-HIGHruntime-
6JS-to-TS Idiom ConversionMEDIUMidiom-
7Tooling & Build MigrationLOW-MEDIUMtooling-

Quick Reference

1. Migration Setup & tsconfig (CRITICAL)

  • `setup-allowjs-checkjs-bridge` — Enable allowJs and checkJs for incremental migration
  • `setup-migrate-leaves-first` — Convert dependency leaves before their dependents
  • `setup-jsdoc-before-rename` — Type JS with JSDoc and @ts-check before renaming
  • `setup-prefer-ts-expect-error` — Prefer @ts-expect-error over @ts-ignore for suppressions
  • `setup-skiplibcheck-during-migration` — Set skipLibCheck to silence third-party type noise
  • `setup-modern-module-resolution` — Set module and moduleResolution to a modern pair
  • `setup-noemitonerror-isolatedmodules` — Enable isolatedModules and noEmitOnError for safe output

2. Strictness Ratcheting (CRITICAL)

  • `strict-enable-flags-incrementally` — Enable strict flags one at a time, not all at once
  • `strict-prioritize-null-checks` — Prioritize strictNullChecks for the highest bug yield
  • `strict-no-implicit-any` — Enable noImplicitAny to surface every untyped value
  • `strict-no-unchecked-indexed-access` — Enable noUncheckedIndexedAccess for index safety
  • `strict-use-unknown-in-catch` — Type caught errors as unknown, not any
  • `strict-exact-optional-property-types` — Separate missing from undefined with exactOptionalPropertyTypes

3. Typing Public Surfaces (HIGH)

  • `surface-annotate-exported-signatures` — Annotate exported function signatures explicitly
  • `surface-replace-jsdoc-with-types` — Replace JSDoc type tags with real annotations
  • `surface-type-default-params` — Type default and optional parameters precisely
  • `surface-interface-for-object-args` — Convert loose object arguments to named interfaces
  • `surface-type-callbacks` — Type callback and higher-order parameters
  • `surface-type-class-fields` — Declare class field types instead of relying on assignment

4. Replacing any & Unsafe Casts (HIGH)

  • `unsafe-prefer-unknown-over-any` — Replace any with unknown at untrusted boundaries
  • `unsafe-eliminate-as-casts` — Replace as casts with narrowing or validation
  • `unsafe-avoid-double-assertion` — Avoid double assertions that force unrelated types
  • `unsafe-type-dynamic-property-access` — Type dynamic property access with Records or index signatures
  • `unsafe-replace-function-type` — Replace the Function type with specific call signatures
  • `unsafe-narrow-instead-of-nonnull` — Narrow values instead of using the non-null assertion

5. Runtime Data Validation (MEDIUM-HIGH)

  • `runtime-validate-external-data` — Validate external data at the boundary
  • `runtime-type-environment-variables` — Parse and type environment variables once
  • `runtime-derive-types-from-schemas` — Derive static types from runtime schemas
  • `runtime-type-guards-at-boundaries` — Write type guards for untyped library returns
  • `runtime-type-json-parse` — Type JSON.parse results through validation

6. JS-to-TS Idiom Conversion (MEDIUM)

  • `idiom-require-to-import` — Convert require and module.exports to ESM syntax
  • `idiom-prototype-to-class` — Convert prototype constructors to class syntax
  • `idiom-type-only-imports` — Use import type for type-only imports
  • `idiom-replace-arguments-object` — Replace the arguments object with rest parameters
  • `idiom-enum-to-union-or-const` — Convert frozen-object enums to const objects or unions
  • `idiom-default-export-to-named` — Prefer named exports over default exports
  • `idiom-optional-chaining-over-guards` — Replace manual existence guards with optional chaining

7. Tooling & Build Migration (LOW-MEDIUM)

  • `tooling-declare-untyped-modules` — Provide ambient declarations for untyped dependencies
  • `tooling-install-types-packages` — Install @types packages before casting library returns
  • `tooling-use-tsx-over-ts-node` — Run TypeScript directly with tsx instead of ts-node flags
  • `tooling-emit-declaration-files` — Emit declaration files for migrated libraries
  • `tooling-typecheck-in-ci` — Add a type-check step to CI separate from the build

How to Use

Read individual reference files for detailed explanations and code examples:

  • Section definitions — Category structure and impact levels
  • Rule template — Template for adding new rules

Related Skills

  • typescript-refactor — Refactoring and modernizing code that is already TypeScript
  • typescript-advanced-patterns — Advanced type-level patterns once the migration is done

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Related skills

FAQ

What does migrate-js-to-modern-typescript do?

migrate-js-to-modern-typescript is a Claude Code skill in the AI & Agent Building category.

When should I use migrate-js-to-modern-typescript?

When you need to helps with ai & agent building tasks during ai-assisted development, or when migrate-js-to-modern-typescript is a claude code skill in the ai & agent building category.

What are the main capabilities?

migrate-js-to-modern-typescript; AI & Agent Building; AI-coding skill.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.