skills/stack-modernization/SKILL.md
Modernize a project's stack — outdated dependencies, dead/unused packages, deprecated packages, and framework-pattern drift (old patterns lingering after a major upgrade). Verifies the current latest of each package before proposing an upgrade, then applies changes incrementally with tests between each. Use when asked to update dependencies, modernize the stack, remove dead packages, or migrate stale framework patterns, across frontend and backend.
npx skillsauth add shipshitdev/library stack-modernizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Keep a project on current, minimal, idiomatic dependencies. Three jobs: upgrade what
is behind, delete what is unused, and migrate patterns a major upgrade left stranded
(the v3 config still sitting in a v4 repo). Edits package.json and source, so it
runs behind a confirmation gate and verifies before it upgrades.
Never trust training data for a version number — the current latest is looked up, not recalled.
Inputs:
deps / dead / patterns / all, default all).Outputs:
Creates/Modifies:
package.json, lockfile, and source during pattern migration. Only after the
plan is approved.External Side Effects:
bun install/upgrade commands; WebSearch to confirm latest versions. No deploys.Confirmation Required:
Delegates To:
refactor-code when a migration is a real code refactor, not a mechanical swap.dependency-audit for the security/CVE angle (this skill is about currency, that
one about vulnerability).bun outdated # what is behind, and by how much (patch / minor / major)
bun pm ls # installed tree
# Dead/unused packages: run knip or depcheck if present; else grep imports per dep.
Also flag framework-pattern drift — a stale lockfile or config alongside a newer major:
npm/yarn/pnpm lockfiles or install commands in a Bun project.tailwind.config.{js,ts} or @apply/@tailwind directives in a Tailwind v4
project (v4 configures in the CSS @theme block).middleware.ts where the framework's current major expects proxy.ts.For each candidate upgrade, confirm the current latest with WebSearch (npm/GitHub
releases) — do not use a version from memory. Note the target major and whether the
package publishes a breaking-change / migration guide.
## Stack Modernization Plan — <repo>
### Upgrade
| Package | Current | Latest | Jump | Migration |
|---------|---------|--------|------|-----------|
| <name> | x.y.z | a.b.c | major/minor/patch | <link or "none"> |
### Remove (unused)
- <package> — no imports found
### Pattern migration
- <stale pattern> → <current pattern>
Order the work: security/patch and minor upgrades first (low risk), then majors with migrations one at a time, then dead-package removal, then pattern migration.
One change at a time; tests between each so a regression is attributable:
bun add <pkg>@<verified-latest> # or `bun remove <pkg>` for dead deps
bun run type-check || bunx tsc --noEmit
bun run test <affected-area>
Commit each successful step so any failure rolls back cleanly. For a major with a migration guide, follow it explicitly rather than guessing the new API.
bun add.development
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.