migrate-js-to-modern-typescript

migrate-js-to-modern-typescript is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 186 tokens per session (2,208 once invoked), scanned A, original, MIT.

A practical guide for moving a JavaScript project to TypeScript gradually, including adding type information and enabling stricter checks over time.

In plain words
What is it for?
Use it to plan a file-by-file migration, configure mixed JavaScript and TypeScript projects, improve type safety, update JavaScript patterns, and adjust builds, runners, and CI.
Why use it?
It helps avoid a risky full rewrite while keeping the project building as files are converted. It also covers common gaps such as loose types, unsafe casts, and unvalidated data from APIs or configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan a file-by-file migration, configure mixed JavaScript and TypeScript projects, improve type safety, update JavaScript patterns, and adjust builds, runners, and CI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/migrate-js-to-modern-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pproenca/dot-skills --skill migrate-js-to-modern-typescript
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-js-to-modern-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/pproenca/dot-skills/migrate-js-to-modern-typescript/github.svg)](https://agentmods.dev/skills/pproenca/dot-skills/migrate-js-to-modern-typescript)
Your own site
<a href="https://agentmods.dev/skills/pproenca/dot-skills/migrate-js-to-modern-typescript"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/migrate-js-to-modern-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrate-js-to-modern-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/pproenca/dot-skills/migrate-js-to-modern-typescript"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/migrate-js-to-modern-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00186 $0.02208
Opus 5 $0.00093 $0.01104
Sonnet 5 $0.00037 $0.00442
Haiku 4.5 $0.00019 $0.00221

Measured 6d ago against content hash 313b8badea1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

migrate-js-to-modern-typescript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/.experimental/migrate-js-to-modern-typescript/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Priority Category Impact Prefix
1 Migration Setup & tsconfig CRITICAL setup-
2 Strictness Ratcheting CRITICAL strict-
3 Typing Public Surfaces HIGH surface-
4 Replacing any & Unsafe Casts HIGH unsafe-
5 Runtime Data Validation MEDIUM-HIGH runtime-
6 JS-to-TS Idiom Conversion MEDIUM idiom-
7 Tooling & Build Migration LOW-MEDIUM tooling-

Quick Reference

1. Migration Setup & tsconfig (CRITICAL)

Read the full file on GitHub · 126 lines

Files

What ships with it

46 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 126 lines · 186 tokens per session scan A 313b8badea1f

Subscribe to this mod's changes

migrate-js-to-modern-typescript is a skill published in the GitHub repository pproenca/dot-skills (206 stars, last pushed 25d ago), licensed MIT. It adds 186 tokens to every session and 2,208 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

sickn33/agentic-awesome-skills · 26 tokens

league-akari-shard-development

Use when creating, extending, refactoring, splitting, or reviewing League Akari main or renderer shards, including shard file organization, controller/loader/executor/handler boundaries, naming conventions, renderer TSX usage, platform guards, and public contract compatibility.

LeagueAkari/LeagueAkari · 58 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens