AgentStack
SKILL verified MIT Self-run

Deadcode

skill-tommylower-cortex-deadcode · by tommylower

find and remove dead code. scans for unused files, exports, dependencies, and types using knip. lists every finding with reasoning before deleting anything. Triggers: deadcode, dead code, unused code, clean up code, remove unused, prune dependencies.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-tommylower-cortex-deadcode

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Deadcode? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

deadcode

scan the project for unused code, list every finding with reasoning, then clean up after approval.

steps

  1. run knip to detect dead code:

``bash npx knip ``

  1. present findings as a table with columns:
  • item (file, export, dependency, or type)
  • location (file path and line number)
  • reason it's flagged (nothing imports it, no file references it, etc.)
  1. verify each finding before recommending deletion:
  • grep the codebase for references (imports, dynamic requires, string references)
  • check if it's used in scripts, configs, or tests that knip might miss
  • check if it's a public API entry point that external consumers use
  • flag anything uncertain as "needs review" instead of "safe to delete"
  1. wait for approval before making any changes. never auto-delete.
  1. after approval, make changes and run the build to confirm nothing broke.

what it catches

  • unused files: components, utils, pages that nothing imports
  • unused exports: exported functions, types, constants that nothing outside the file uses
  • unused dependencies: packages in package.json that no file imports
  • unused devDependencies: dev packages that no config or script references
  • unlisted dependencies: packages used in code but missing from package.json
  • unused types: exported TypeScript types with no external consumers

rules

  • never delete without showing findings and getting approval first
  • always verify with grep before calling something unused. knip can miss dynamic imports, barrel files, and config references
  • always run the build after cleanup to catch breakage
  • if a dependency is only used in a script (not src/), check scripts before flagging
  • commit cleanup separately from feature work

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.