Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Dead Code and Unused Dependency Finder with Knip

    1

    Finds unused files, exports and dependencies with knip, vulture, deptry, deadcode or cargo machete, checks false positives, plans git removals. Verdict CLEAN / CLUTTERED / RISKY TO PRUNE

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Dead Code and Unused Dependency Finder with Knip

    Dead Code and Unused Dependency Finder with Knip

    Example session with this skill installed

    Our Next.js shop-web repo feels bloated. Run knip, tell me which unused files, exports and npm packages are actually safe to delete, and give me a removal plan. Don't delete anything yet.

    • Read your context and instructions
    • Compiled the dead code
    • Generated the UI component

    Dead code report: shop-web (2026-10-18)

    Verdict: CLUTTERED. 6 items are safe to remove in 3 small commits; 3 need an owner check.
    Baseline: tests pass (212), build passes. Tools run: knip (default + --production). Not run: none.

    Findings

    #ItemKindEvidenceClass
    1momentdependency0 imports (git grep -w moment = 0), not in any configSAFE TO DELETE
    2lodashdependencyonly lodash.debounce used; lodash itself 0 importsSAFE TO DELETE
    3src/utils/formatDate.tsfile0 references, last touched 14 months agoSAFE TO DELETE
    4src/components/OldBanner.tsxfile0 references, no route fileSAFE TO DELETE
    5slugify in src/lib/text.tsexportknip --trace: no importersSAFE TO DELETE
    6legacyPrice in src/lib/price.tsexportused only in price.test.tsSAFE TO DELETE (with test)
    7app/(marketing)/promo/page.tsxfileNext.js route conventionKEEP
    8scripts/seed.tsfilepackage.json script db:seedKEEP
    9src/flags/checkoutV2.tsfilestring "checkoutV2" in flags.jsonVERIFY (flag owner)
    10pgdependency0 imports, but DATABASE_URL driver loaded by ORMVERIFY
    11@acme/ui exportsexportspackage is published to npmVERIFY (downstream users)

    False positives handled

    • Items 7 and 8 were not real issues; added config so knip stops flagging them:
    { "entry": ["scripts/*.ts"] }
    

    Removal plan (awaiting your go-ahead)

    1. chore(prune): remove unused deps moment, lodash via npm uninstall moment lodash, then npm test && npm run build
    2. chore(prune): remove unused files via git rm src/utils/formatDate.ts src/components/OldBanner.tsx, then test + build
    3. chore(prune): drop unused exports slugify, legacyPrice (and the test for it), then test + build

    Size before / after

    MetricBeforeAfterNote
    node_modules412 MBto measuremeasured before; after is measured once commits land
    .next/static1.9 MBno change expectedestimate: both deps were already tree-shaken

    CI guard

    - run: npx knip --reporter github-actions
    

    OldBanner.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Every codebase collects files nobody imports, exports nobody calls and packages nobody uses. Tools like knip or vulture list them quickly, but their output mixes real dead code with Next.js routes, Django migrations, pytest fixtures, CLI scripts and public library APIs. Delete the wrong one and production breaks. Asking an AI to "clean up unused code" often ends with confident deletions and no evidence.

    This skill gives your coding agent a fixed, cautious procedure and a reference file of checked tool facts. It:

    • Detects your ecosystems and runs the right tool: knip for JS/TS, vulture and deptry for Python, staticcheck U1000 and deadcode for Go, cargo machete and cargo udeps for Rust, mvn dependency:analyze for Maven
    • Cross-checks every hit with git grep, git log and entry-point config, and walks a false-positive checklist (dynamic imports, reflection, framework conventions, entry points, feature flags, runtime-only drivers, published APIs)
    • Classifies each item SAFE TO DELETE, VERIFY or KEEP with one line of evidence, and writes ignore rules for the KEEP items
    • Plans removal as small commits (dependencies, then files, then exports) with tests and build after each, using git rm and your package manager so everything can be reverted
    • Measures install and bundle size before and after, labelled measured or estimate
    • Adds a CI step so new dead code is caught
    • Gives a verdict: CLEAN, CLUTTERED or RISKY TO PRUNE

    It is for developers and tech leads cleaning up an app, a monorepo or a library before an upgrade or a size push.

    Honesty note: it reports first and deletes nothing until you approve the exact list. It never invents tool output, versions or size savings, and it tells you when a tool could not run.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Static tools miss some runtime uses such as reflection, string-named plugins and code called from outside the repo, so the skill marks those VERIFY rather than guessing. It needs the language toolchain installed to run the tools, and size savings are only reported as measured once the removals are actually made.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    Software
    GitDead-code tool for your ecosystemknipNode.jsPythondeptryuv (Python tool runner)vulture

    knip (JS/TS), vulture and deptry (Python), staticcheck or deadcode (Go), or cargo-machete (Rust).

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    A SKILL.md file with the step-by-step procedure, verdict rules and output template, and references/dead-code-tools-facts.md with verified flags, config keys, false-positive patterns, CI snippets and source links for knip, vulture, deptry, staticcheck, deadcode, cargo machete, cargo udeps and Maven dependency:analyze.

    Any agent that reads the SKILL.md format, such as Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. It works best in agents that can run terminal commands in your repo.

    Unzip the folder into your agent's skills directory (for Claude Code, .claude/skills/ in the project or your home folder) and ask something like 'find dead code in this repo'. The analysis tools themselves are run with npx, uvx, go install or cargo install, and the skill asks before installing anything.

    Static analysis cannot see every runtime use, so some items stay VERIFY and need a human who knows the code. It needs the language toolchain to run the tools; without it the skill falls back to a manual grep pass and says so. It does not do runtime coverage or performance profiling.

    It runs the established tool for each ecosystem instead of guessing, requires evidence for every SAFE TO DELETE item, checks a specific false-positive list, never deletes before you approve, and removes code in small reversible git commits with tests after each.

    While it handles standard framework conventions like Next.js or Django, it cannot detect code called via external private reflection or runtime profiling, so manual verification is still recommended for highly dynamic systems.

    New in Code Quality & Review