dependency-cleanup

dependency-cleanup is a skill for Claude Code from yeaight7/agent-powerups. It costs 29 tokens per session (621 once invoked), scanned A, original, Apache-2.0.

A process for finding unused or duplicate third-party packages in a project’s dependency files and removing them with the package manager. Dependencies are external libraries the project needs to build or run.

In plain words
What is it for?
Use it to audit package manifests, compare them with actual imports and build files, remove unnecessary packages, and validate the result.
Why use it?
It can reduce build delays, security exposure, and maintenance work caused by packages the code no longer uses.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the codebase-maintenance plugin — 8 skills, 4 commands, 3 agents shipped together

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.

agentmods
npx agentmods add skills/yeaight7/agent-powerups/dependency-cleanup
Any agent
npx skills add yeaight7/agent-powerups --skill dependency-cleanup
Clone the repo
git clone --depth 1 https://github.com/yeaight7/agent-powerups

Made for: Claude Code.

Or install codebase-maintenance, the plugin that ships this one along with the rest of its 8 skills, 4 commands, 3 agents.

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 dependency-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/yeaight7/agent-powerups/dependency-cleanup.svg)](https://agentmods.dev/skills/yeaight7/agent-powerups/dependency-cleanup)
Your own site
<a href="https://agentmods.dev/skills/yeaight7/agent-powerups/dependency-cleanup"><img src="https://agentmods.dev/badge/skills/yeaight7/agent-powerups/dependency-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 621 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00029 $0.00621
Opus 5 $0.00015 $0.00311
Sonnet 5 $0.00006 $0.00124
Haiku 4.5 $0.00003 $0.00062

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

Security

Grade A, and why

dependency-cleanup 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 5d 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.

plugins/codebase-maintenance/skills/dependency-cleanup/SKILL.md · 65 lines

How it starts

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

Purpose

Bloated dependencies slow down builds, increase security surface area, and complicate updates. Audit manifests against actual imports, remove unused packages via the package manager (so lockfiles stay correct), and validate with the build.

When to Use

  • The dependency list has grown without review
  • Installs/builds are slow, or audits report vulnerabilities in packages nobody remembers using
  • Multiple libraries in the manifest serve the same purpose

Inputs

  • The package manifest(s) — package.json, requirements.txt, Cargo.toml, or equivalent
  • The repo's build and test commands

Workflow

  1. Audit the manifest. List declared dependencies:

    npm ls --depth=0           # JavaScript/TypeScript
    pip list --not-required    # Python: packages nothing else depends on
    
  2. Verify usage — manifest vs imports. For any suspect dependency, perform a global search across the codebase:

    grep -rn "from ['\"]lodash\|require(['\"]lodash" .
    grep -rn "^import requests\|^from requests" .     # Python import forms
    npx depcheck                                      # JS/TS: automated manifest-vs-import report, if available
    

    Search build scripts, configs, and CI files too — not just src/.

  3. Remove with the package manager. If there are zero usages, use the native command (e.g., npm uninstall lodash or pip uninstall ...). Do not just manually edit the manifest unless absolutely necessary, to ensure lockfiles are updated correctly.

  4. Consolidate duplicates. If multiple libraries serve the exact same purpose (e.g., moment and date-fns), flag it to the user for future consolidation. Do not attempt a massive library migration autonomously.

  5. Validate. Run the build and test suite to ensure the removed dependency wasn't implicitly required by a build script or runtime environment.

Output

  • Removed dependencies, each with its zero-usage search evidence
  • Duplicate-purpose libraries flagged for user decision
  • Build/test result after removal

Read the full file on GitHub · 65 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. 5d ago First seen · 65 lines · 29 tokens per session scan A dcf44991015e

Subscribe to this mod's changes

dependency-cleanup is a skill published in the GitHub repository yeaight7/agent-powerups (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 621 once invoked, about $0.0001 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-08-31.