/nexus-agents:deprecation-and-migrationfrom nexus-agents
Plans and executes removal of deprecated APIs without breaking consumers. Use when retiring @deprecated markers, renaming public surfaces, or version-gating cleanup.
Ships in nexus-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
@deprecated-marked APIsSkip when:
@deprecated marker has been in at least one published release for ≥ 1 minor version. Multi-month bake is preferred for typed APIs.CLAUDE.md / docs/.grep -rn for the deprecated symbol outside the package; check src/exports/*.ts to know if it's truly public or internal-only.List every surface touched by the removal — types, schemas, classes, function names, internal callers, public re-exports, test fixtures, doc references.
# Symbol reach
grep -rn "DeprecatedName" src/ --include="*.ts" | wc -l
# Public-barrel check
grep -rn "DeprecatedName" src/exports/*.ts src/index.ts
# Doc references
grep -rn "DeprecatedName" docs/ skills/
A deprecation removal touching > ~10 files should be split into batches by blast radius:
| Batch | Scope | Semver |
|---|---|---|
| A — Internal-only | Fields/methods never on a public barrel; runtime semantics unchanged | patch |
| B — Typed string-unions | Public union member removal; runtime unchanged | minor |
| C — Public type aliases | Public-barrel type removal; runtime unchanged | minor |
| D — Runtime API | Method/function/return-type changes consumers observe at runtime | major |
Each batch is its own PR. Never bundle batches — the failure mode (one CI gate flake or revert) is much easier when batches are isolated.
main. Confirm git status is clean.pnpm typecheck — let the type errors guide you to every internal consumer.pnpm lint && pnpm typecheck && pnpm test..changeset/<issue>-batch-<X>-<name>.md with semver and migration recipe.docs/ for stale references (auto-regenerated docs like TypeDoc HTML refresh on next build).consensus_vote QA before merge per the standard protocol.npm view <pkg> version against package.json version.| Excuse | Counter |
|---|---|
| "It's deprecated, so just delete it" | Deprecation is a contract with consumers. The marker says "this still works, but plan to migrate." Removal needs replacement + bake + migration recipe. |
| "Nobody uses it" | Verify with grep and npm view <pkg> dist.shasum-then-search-on-sourcegraph if you must be sure. "Nobody uses it" without evidence is a guess. |
| "I'll fix the broken consumers later" | Internal callers should be migrated in the same PR as the removal. Deferring it puts you in a state where main doesn't compile. |
| "It's just a rename" | Renames of public types are TypeScript-typed-only breaks. Minor version. Migration recipe required. |
| "v3.0 will fix it" | (Per nexus-agents experience with epic #2368: this is often a way to indefinitely defer work. Re-evaluate the v-gate periodically — many v3-gated cleanups can ship as typed-only minor breaks once they bake.) |
| "The CHANGELOG will explain" | The CHANGELOG is read by maybe 5% of consumers. Migration recipes need to be self-discoverable from a TypeScript compile error pointing at the new symbol. |
.changeset/*.md file@deprecated bakesrc/exports/*.ts for public reach@deprecated usages of the symbol are migrated in the same PRgrep -rn confirms no remaining references in src/ (excluding the symbol's own definition file, which is being removed)src/exports/*.ts if it was exported there.changeset/<issue>-batch-<X>-<name>.md exists with correct semver bumppnpm typecheck, pnpm lint, pnpm test passconsensus_vote QA approved (architect + security at minimum)package.json version@deprecated doc references swept from docs/ (auto-regen handles docs/api/)Epic #2368 (2026-05-04) retired the v3.0 deprecation gate by shipping all 31 @deprecated markers in 2.x as 5 batches:
tech_lead AgentRole removal → minorLessons from that cycle informed this skill — including the publish-race that produced version-skip publishes (docs/ops/release-changeset-race.md).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
deprecation-removal, api-migration, breaking-changes, cleanup
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.PreToolUse.0: Hook matcher "hooks" must be an array of hook entries; received undefined; hooks.PreToolUse.1: Hook matcher "hooks" must be an array of hook entries; received undefined — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.PreToolUse.0: Hook matcher "hooks" must be an array of hook entries; received undefined; hooks.PreToolUse.1: Hook matcher "hooks" must be an array of hook entries; received undefined — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
34 skills in this plugin
/api-and-interface-designDesign stable, hard-to-misuse interfaces — REST endpoints, MCP tool
schemas, module boundaries, type contracts. Apply when defining new
surfaces or evolving public ones. Triggers on "API design", "interface",
"schema", "contract", "module boundary", "type design".
/browser-testing-with-devtoolsTest UI in real browsers via Chrome DevTools MCP. Apply when debugging
rendering issues, console errors, network behavior, performance, or
accessibility — anywhere static code analysis can't see runtime state.
Triggers on "browser test", "DOM inspect", "console errors",
"network trace", "core web vitals in browser", "ui bug repro".
/bug-fixFix a bug following project standards.
Use when fixing defects, debugging issues, or resolving reported problems.
Triggers on "fix bug", "debug", "fix issue", "resolve bug".
/code-simplificationReduce nesting, extract names, eliminate redundancy without changing
behavior. Apply after features work and tests pass — never as a
drive-by during feature work. Triggers on "simplify", "refactor for clarity",
"this is hard to read", "code review flagged complexity".
/codex-delegatorDelegate code generation tasks to Codex CLI for optimal performance.
Use when implementing features, generating tests, refactoring code, or
making bulk code changes. Triggers on "delegate to codex", "route to codex",
"use codex", "code generation".
/context-engineeringCurate what the agent sees, when, and how it's structured. Apply when
starting a session, when output quality drifts, when fanning out
subagents, or when configuring rules files. Triggers on
"context engineering", "rules file", "agent context",
"subagent fan-out", "context budget".
Other plugins' skills for the same job