deprecated-code-cleanup-skill

deprecated-code-cleanup-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 54 tokens per session (958 once invoked), scanned C, original, Apache-2.0.

A cleanup workflow for finding and safely removing deprecated TypeScript and Next.js code. Deprecated code is code marked as no longer recommended or supported.

In plain words
What is it for?
Use it to classify unused deprecated files and exports, remove them in phases, and run type checks, linting, and builds during cleanup.
Why use it?
It prevents accidental breakage by tracing imports and re-exports, checking whether code is still reachable, and verifying the project after each removal stage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to classify unused deprecated files and exports, remove them in phases, and run type checks, linting, and builds during cleanup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill
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 darellchua2/opencode-config-template --skill deprecated-code-cleanup-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

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 deprecated-code-cleanup-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill/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 deprecated-code-cleanup-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/deprecated-code-cleanup-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 958 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00054 $0.00958
Opus 5.5 $0.00022 $0.00383
Sonnet 5.5 $0.00011 $0.00192
Haiku 4.5 $0.00005 $0.00096

Measured 2mo ago against content hash 83b0e5d1fcb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

deprecated-code-cleanup-skill scanned grade C with 1 finding 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

When protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p
skills/deprecated-code-cleanup-skill/SKILL.md · 66 lines

How it starts

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

What I do

Remove @deprecated code from TypeScript/Next.js codebases with dependency-traced, tier-based safety (proven: ~800+ lines removed across ~50 files, zero typecheck/lint errors). Discovery → dependency trace → tier classification → phased removal → verify after every phase.

When to use me

Removing deprecated functions/interfaces/modules; post-migration cleanup; barrel-file audit; pre-release debt removal. Ask when scope is unclear, protected modules exist, or a Tier-3 migration path is preferred.

Prereqs: tsc, npm run lint, npm run build available; clean git tree for rollback.

Phases (strict order; verify after each)

Phase 0 — Discovery & classification (analysis only): grep -rn '@deprecated' src/ --include='*.ts' --include='*.tsx'. For EACH item, trace consumers through ALL import forms — alias (from "@/path"), relative (from "./module" — the most-missed form), dynamic (import(), barrel re-exports (index.ts); JSDoc @see references are comment-only, ignore. Propagate through deprecated chains: if a deprecated item's only consumer is also deprecated, both are dead. Then classify into tiers and verify page.tsx reachability (no active App Router entry may transitively reach it):

Tier Definition Action
1 Zero non-deprecated consumers Delete
2 Consumers exist, all trivially migratable Migrate consumers, then delete
3 Migration-dependent (consumer rework non-trivial) Plan per-item; delete only after migration
4 Public API / externally consumed Keep + document (removal is a semver-major decision)

Phase 1 — Dead files (Tier 1, zero importers): delete file, check for orphaned tests/styles beside it. Phase 2 — Dead exports (from surviving files): remove the export + its local helpers if now unused; leave the file. Phase 3 — Migration-dependent (Tier 3): per item — migrate consumers first, delete in the same phase, never leave consumers importing a deleted symbol. Phase 4 — Barrel audit: index.ts re-exports of deleted symbols must go; a barrel whose exports are ALL dead is itself dead — delete it and fix importers to direct paths.

Read the full file on GitHub · 66 lines

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. 2mo ago Changed · -422 lines 83b0e5d1fcb8
  2. 3mo ago First seen · 488 lines · 54 tokens per session scan C 12cd822aef24

Subscribe to this mod's changes

deprecated-code-cleanup-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 958 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

deprecated-code-cleanup-skill compared with skills from other repositories

deprecated-code-cleanup-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
deprecated-code-cleanup-skilldarellchua2/opencode-config-templateSkill62mo agoApache-2.0C54Claude Code, Codex
codebase-refactoringkucherenko/jscpdSkill6.7kyesterdayMITA63Claude Code, Codex
recipe-diagnoseshinpr/claude-code-workflowsSkill7254d agoMITA15Claude Code
roamCranot/roam-codeSkill5175d agoApache-2.0A86Claude Code
dorodangoathola/claude-night-marketSkill358yesterdayMITA31Claude Code
ring:searching-codeLerianStudio/ringSkill2181mo agoApache-2.0A74Claude Code, Cursor
ring:using-assertLerianStudio/ringSkill2181mo agoApache-2.0A99Cursor