Agent skill

Typescript Migration

by secondsky in secondsky/claude-skills

TypeScript version migration guide (5.x to 6 to 7, tsgo native port).

MITAuto-check passedDevelopment

Install Typescript Migration

skills CLI
$ npx skills add secondsky/claude-skills --skill typescript-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills typescript-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/typescript-migration/skills/typescript-migration .claude/skills/typescript-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript-migration
GitHub stars
227
Token cost
~2.7k tokens
SKILL.md length
1,226 words
Files
16 (incl. scripts, references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

TypeScript version migration guide (5.x to 6 to 7, tsgo native port).

  • Works in 3 steps: Detect current version — run… → Classify the path → Audit before changing anything — run…
  • TS 6 tsconfig breaking changes
  • SKILL.md covers Status, The Golden Rule, Quick Triage (1 Minute) and Project-Type Decision Matrix, plus 10 more sections
  • Runs Shell scripts from its folder; calls tsc, npm and npx

What it does

Typescript Migration is an agent skill from secondsky/claude-skills. TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Use for TS 6 tsconfig breaking changes, TS 7 Go rewrite rollout, or TS5xxx deprecation codes.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 18 other files, including scripts and reference files (for example `references/ecosystem-compatibility.md`, `references/migration-playbooks.md` and `references/ts-migrating-tool-guide.md`).

It sits in Development, covering Code migrations. It works with TypeScript. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • TS 6 tsconfig breaking changes
  • TS 7 Go rewrite rollout
  • TS5xxx deprecation codes

Example prompts

  • “/typescript-migration”

Requirements

  • Node.js
  • A Bash shell

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Detect current version — run scripts/detect-ts-version.sh (reads package.json).
  2. Classify the path
  3. Audit before changing anything — run scripts/audit-ts7-breakers.sh to detect tooling that breaks under TS 7 (typescript-eslint, ts-morph…

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • tsc
    • npm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • devblogs.microsoft.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript Migration loads about 2.7k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 1,226 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 1,226 words, ~2,745 tokens.

Download SKILL.mdSave it as .claude/skills/typescript-migration/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
typescript-migration
description
TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Use for TS 6 tsconfig breaking changes, TS 7 Go rewrite rollout, or TS5xxx deprecation codes.
license
MIT

TypeScript Migration

Authoritative migration guide for TypeScript 5.x → 6 → 7 (native Go port). Sourced from Microsoft's official announcements.

Status

The Golden Rule

NEVER skip TypeScript 6. The only supported paths are 5.x → 6 → 7.

Skipping TS 6 produces a wall of hard errors because TS 7 removes everything TS 6 deprecated. Use "ignoreDeprecations": "6.0" only as a temporary pause inside TS 6; it does NOT work in TS 7.

Quick Triage (1 Minute)

  1. Detect current version — run scripts/detect-ts-version.sh (reads package.json).
  2. Classify the path:
    • 5.x → start with references/migration-playbooks.md § "5.x → 6".
    • 6.x → may go directly to TS 7 (see references/ts7-go-rewrite.md).
    • 5.x wanting TS 7 → must go 5 → 6 → 7 (no shortcuts).
    • Intra-version strict-flag rollout (no version change) → see references/ts-migrating-tool-guide.md for the optional ts-migrating tool.
  3. Audit before changing anything — run scripts/audit-ts7-breakers.sh to detect tooling that breaks under TS 7 (typescript-eslint, ts-morph, ts-node, Vue/Svelte/Astro/MDX/Angular templates, ts-patch, ttypescript, typia, baseUrl, node10, ES5 target).

Project-Type Decision Matrix

Project typeRecommendationWhy
Greenfield, no API-dependent toolingAdopt TS 7 directlyFull speedup, no blockers
Existing TS project, no special tooling5 → 6 → 7 sequentiallyTS 6 surfaces every deprecation as a warning first
Uses typescript-eslint / ts-morph / API consumers5 → 6 → 7 via @typescript/typescript6 side-by-sideTS 7 has no programmatic API until 7.1
Vue / Svelte / Astro / MDX (Volar-based)Stay on TS 6Volar needs the programmatic API; not yet supported
Angular with template type-checkingTS 7 for CLI + TS 6 for editorMicrosoft's official split workaround
ts-patch / ttypescript / typia / custom AST transformersStay on TS 6 until migrated to Oxc/SWCTransformer API gone in TS 7

TS 6 — Top Breaking Changes (Quick View)

ChangeOld defaultTS 6 defaultFix
strictfalsetrueSet explicitly or fix errors
moduleCommonJSesnextSet commonjs if needed
targetES3es2025 (floating)Set explicitly
moduleResolutionnode10bundlerSet nodenext for Node targets
rootDirinferred. (tsconfig dir)Set "rootDir": "./src"
typesall @types[]Set "types": ["node"]
esModuleInteropfalsetrueRemove :false; fix import * as → import
noUncheckedSideEffectImportsfalsetrueFix typos or set false for bundler CSS
libReplacementtruefalse—
allowSyntheticDefaultImportsvariestrue—

Deprecated in 6, HARD ERRORS in 7: target: es5; downlevelIteration; moduleResolution: node | node10 | classic; module: amd | umd | systemjs | none; baseUrl; esModuleInterop: false; allowSyntheticDefaultImports: false; alwaysStrict: false; outFile; module Foo {} keyword; assert { } on imports; /// <reference no-default-lib="true"/>; tsc <file> + tsconfig present (use --ignoreConfig).

For full detail per change including PR citations, examples, and the official ts5to6 codemod usage, load references/ts6-breaking-changes.md.

TS 7 — What Changed (Quick View)

  • Native Go port; the standard typescript npm package IS TS 7 (npm install -D typescript).
  • All TS 6 deprecations become hard errors (see table above).
  • No programmatic Compiler API in 7.0 — TS 7.1 will ship a new one. Affects ts-morph, ts-node, ts-jest, ts-loader, ts-patch, ttypescript, typia, typescript-eslint (use the side-by-side pattern below).
  • preserveConstEnums removed — always emits const enums.
  • stableTypeOrdering now true by default; cannot be turned off.
  • NEW flags: --checkers N (default 4), --builders N, --singleThreaded.
  • NEW breaking change: template literal types preserve Unicode code points (not UTF-16 code units).
  • NEW: JS file handling reworked (Closure-style @enum, @class, ?, postfix ! no longer special).
  • Performance (official, real OSS codebases): 7.7x–11.9x faster builds (up to 16.7x with --checkers 8); 6–26% lower memory.

Full install options, compatibility matrix, performance tables, and known issues in references/ts7-go-rewrite.md.

The Official Side-by-Side Pattern (TS 7 + TS 6 API)

Microsoft's recommended path for projects whose tooling depends on the TS Compiler API. Declare an alias in package.json:

json
{
  "devDependencies": {
    "@typescript/native": "npm:typescript@^7.0.2",
    "typescript": "npm:@typescript/typescript6@^6.0.2"
  }
}
  • npx tsc runs TS 7 (via the @typescript/native alias).
  • Tools importing typescript (typescript-eslint, ts-morph) transparently get TS 6's API via @typescript/typescript6.
  • A tsc6 executable is also available if a TS 6 invocation is needed directly.
  • Remove this workaround once TS 7.1 ships the new API.

The 4-Step Standard Workflow

  1. Detect — scripts/detect-ts-version.sh reports the installed version.
  2. Audit — scripts/audit-ts7-breakers.sh detects breakers BEFORE any upgrade. scripts/ts6-deprecation-scan.sh extracts TS5xxx codes from tsc output.
  3. Migrate — follow references/migration-playbooks.md for the appropriate path. Run ts5to6 --fixBaseUrl and ts5to6 --fixRootDir if the user explicitly approves (these are official Microsoft-endorsed codemods). All other changes are manual.
  4. Verify — scripts/compare-tsc7-tsc6.sh diffs diagnostic codes between TS 7 tsc and TS 6 tsc6. Match on TSxxxx codes, NOT message text (wording differs between compilers). Delete stale .tsbuildinfo files before the first TS 7 run (incompatible between the JS and Go compilers).
Show full SKILL.md (476 more words)Show less

Critical Rules

Always
  • ✅ Migrate through TS 6 — never skip it.
  • ✅ Match on diagnostic codes (TSxxxx), not message wording.
  • ✅ Delete stale .tsbuildinfo before the first TS 7 run.
  • ✅ Cite Microsoft's official blog posts as authoritative; treat third-party tutorials as secondary.
  • ✅ Run audit-ts7-breakers.sh BEFORE any upgrade.
Never
  • ❌ Never install @typescript/native-preview for stable use — it's the legacy nightly package; stable is the standard typescript package.
  • ❌ Never assert the unverified third-party claims listed in references/unverified-claims.md (e.g. "moduleResolution default is node16", "--ts6-migration flag exists", "ES5 target is removed in 6", "--keyofStringsOnly was removed").
  • ❌ Never recommend ts-migrating (the tool) for TS version migration — it only helps tighten compilerOptions within a version.
  • ❌ Never assume VS Code needs a setting key to enable TS 7 — install the official extension; it auto-enables.
  • ❌ Never auto-edit user source via custom scripts — only detection/audit scripts and officially-blessed codemods (ts5to6).

The ts-migrating Tool — Conditional Offer

Offer this tool ONLY when the user wants to enable a stricter compilerOption (e.g. noUncheckedIndexedAccess, strict, erasableSyntaxOnly) on an existing large codebase — NOT for version migration.

Gate conditions (all must hold):

  • Existing, non-greenfield TypeScript project.
  • The goal is enabling a compilerOption incrementally.
  • This is not a tsgo / TS-7 migration.

Warnings:

  • The annotate subcommand rewrites source — run on a clean git tree and review the diff.
  • The IDE plugin has ZERO effect on tsc; wire ts-migrating check into CI for it to matter.
  • // @ts-migrating markers are tech debt needing a cleanup sweep.
  • This is NOT Airbnb's ts-migrate (different tool — JS → TS conversion).

Full install, commands, and gate logic in references/ts-migrating-tool-guide.md.

Common Error Codes

CodeMeaningAction
TS5011rootDir mismatchSet "rootDir": "./src"
TS5101Option deprecated, stops in TS {ver}Add "ignoreDeprecations": "6.0" (TS 6 only) or fix
TS5102Option removedRemove from tsconfig
TS5107Option=value deprecatedSame as TS5101
TS5108Option=value removedRemove
TS5111Migration info (baseUrl, node10)See references/ts6-breaking-changes.md
TS5112tsc file-args + tsconfig presentUse --ignoreConfig

When to Load References

Load these reference files when the user needs detail beyond the quick-reference above:

Load This FileWhen
references/ts6-breaking-changes.mdMigrating to TS 6; need full PR-cited detail on each default change, deprecation, or syntax change
references/ts7-go-rewrite.mdAdopting TS 7; need install detail, compat matrix, performance tables, known gaps
references/ecosystem-compatibility.mdChecking whether a specific tool (typescript-eslint, ts-morph, ts-node, vite, webpack, vitest, etc.) works under TS 7
references/migration-playbooks.mdNeed ordered checklists for 5→6, 6→7, or 5→7-via-6
references/ts-migrating-tool-guide.mdUser wants to enable a stricter compilerOption incrementally on an existing large codebase
references/unverified-claims.mdEncountering a claim that contradicts official sources; verify before asserting

Dependencies

  • Required for migration: typescript (target version), tsconfig.json in the project root.
  • Optional helpers:
    • @andrewbranch/ts5to6 — official codemod for baseUrl / rootDir.
    • @typescript/typescript6 — side-by-side API compat for TS 7.
    • ts-migrating — incremental strict-flag rollout (see guide).

Package Versions (Verified 2026-07-09)

json
{
  "devDependencies": {
    "typescript": "^7.0.2",
    "@typescript/typescript6": "^6.0.2"
  },
  "optionalHelpers": {
    "@andrewbranch/ts5to6": "latest",
    "ts-migrating": "latest"
  }
}

All facts in this skill are cited to Microsoft's official TypeScript blog (devblogs.microsoft.com/typescript). Third-party tutorial claims that conflict with official sources are catalogued in references/unverified-claims.md and treated as suspect.

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (scripts, references) in plugins/typescript-migration/skills/typescript-migration of secondsky/claude-skills.

  • SKILL.md
  • references/ecosystem-compatibility.md
  • references/migration-playbooks.md
  • references/ts-migrating-tool-guide.md
  • references/ts6-breaking-changes.md
  • references/ts7-go-rewrite.md
  • references/unverified-claims.md
  • scripts/README.md
  • scripts/audit-ts7-breakers.sh
  • scripts/compare-tsc7-tsc6.sh
  • scripts/detect-ts-version.sh
  • scripts/ts6-deprecation-scan.sh
  • templates/github-actions-tsc-tsc6.yml
  • templates/package.side-by-side.json
  • templates/tsconfig.ts6.json
  • templates/tsconfig.ts7.json

Open the folder on GitHubat commit 8837836

Compare with similar skills

Typescript Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript Migration this skillsecondsky/claude-skills227—~2.7kAutomated safety check: PassMIT
Convert Internal Package to TypeScriptTryGhost/Ghost55k—~1.2kAutomated safety check: PassMIT
jscpd Code Migration Trackerkucherenko/jscpd6.3k—~5kAutomated safety check: PassMIT
ast-grep Codemod Referencewarp-drive-data/warp-drive3.2k—~2.6kAutomated safety check: PassMIT
Codemodpmndrs/glyph392—~1.2kAutomated safety check: PassMIT
Code Migrationanthropics/code-migration-kit-with-claude-code742—~983Automated safety check: PassCustom licence

Similar skills

  • Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.

    55k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Measures a code port between languages or frameworks with jscpd's function-level comparison, porting tests before code and tracking what is left unmatched.

    6.3k GitHub stars~5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • ast-grep Codemod Reference

    warp-drive-data/warp-drive

    Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.

    3.2k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Codemod

    pmndrs/glyph

    Author, archive, apply, and verify TypeScript codemods with ts-morph for APIs that have reached the remote default branch or external users.

    392 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Migration

    anthropics/code-migration-kit-with-claude-code

    Official

    Run a large-scale language migration with the six-step process: create the map and the rules, stress-test the rules, translate everything, compile, run it, match behavior.

    742 GitHub stars~983 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Guides migrating AngularJS 1.x apps to modern Angular: choosing a strategy, running a hybrid app with ngUpgrade, and converting controllers, directives and services.

    40k GitHub starsUsed in 10 repos~1.8k tokens
    DevelopmentAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about Typescript Migration

What does Typescript Migration do?

TypeScript version migration guide (5.x to 6 to 7, tsgo native port). Typescript Migration is an agent skill from secondsky/claude-skills.x to 6 to 7, tsgo native port).

When should I use Typescript Migration?

Typescript Migration fits situations like: TS 6 tsconfig breaking changes; TS 7 Go rewrite rollout; TS5xxx deprecation codes.

How do I install Typescript Migration in Claude Code?

Run `npx skills add secondsky/claude-skills --skill typescript-migration -a claude-code`. Or copy the skill folder (plugins/typescript-migration/skills/typescript-migration in secondsky/claude-skills) into .claude/skills/typescript-migration in your project. Claude Code loads it when a task matches its description.

How do I install Typescript Migration in Codex?

Run `npx skills add secondsky/claude-skills --skill typescript-migration -a codex`. Or copy the skill folder (plugins/typescript-migration/skills/typescript-migration in secondsky/claude-skills) into .agents/skills/typescript-migration in your project. Codex loads it when a task matches its description.

Can I use Typescript Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill typescript-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript-migration, .gemini/skills/typescript-migration, .github/skills/typescript-migration and .opencode/skills/typescript-migration in your project.

What does Typescript Migration need to run?

Going by SKILL.md and its folder, Typescript Migration needs a shell for the scripts in its folder and the command-line tools its instructions call (tsc, npm and npx). Our summary lists: Node.js; A Bash shell.

Does Typescript Migration access the network?

SKILL.md names 2 domains. As links in the text: devblogs.microsoft.com and github.com. This is read from the text; nothing was executed.

Is Typescript Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Typescript Migration use?

Typescript Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript Migration use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Typescript Migration?

Skills that share tags, products or a category with Typescript Migration: Convert Internal Package to TypeScript (TryGhost/Ghost, 55k stars), jscpd Code Migration Tracker (kucherenko/jscpd, 6.3k stars), ast-grep Codemod Reference (warp-drive-data/warp-drive, 3.2k stars) and Codemod (pmndrs/glyph, 392 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript Migration?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.