AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Dead Code Removal

skill-yeaight7-agent-powerups-dead-code-removal · by yeaight7

Use when unused functions, classes, exports, or files need to be identified and safely deleted.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-yeaight7-agent-powerups-dead-code-removal

✓ 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-yeaight7-agent-powerups-dead-code-removal)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Dead Code Removal? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Purpose

Dead code increases maintenance overhead and confuses developers. Verify a symbol is truly unused across the entire repository, then delete it outright — never comment it out.

When to Use

  • A symbol, file, or export looks unused
  • A feature removal or migration left orphaned helpers behind
  • A coverage or lint report flags unreachable code

Inputs

  • The candidate symbols/files to remove
  • The repo's test and type-check commands

Workflow

  1. Verify unused — search the entire repository. Do not assume code is dead just because the current file doesn't use it:

``bash grep -rn "symbolName" . --include="*.ts" --include="*.tsx" # all references grep -rn "from ['\"].*module-name" src/ # import sites git log -3 --oneline -- path/to/suspect-file # recent touches ``

Ecosystem tools can shortcut the inventory when available (e.g., knip or ts-prune for TypeScript exports, vulture for Python).

  1. Check for dynamic invocation. Be wary of dynamically invoked code — reflection, dependency injection by string name, ORM mappers, route tables, config-driven dispatch:

``bash grep -rn "\"symbolName\"\|'symbolName'" . # string-keyed references ``

If there is any doubt, leave it alone or ask the user.

  1. Delete aggressively. Once confirmed unused, delete the code. Do not comment it out.
  1. Prune dependencies. If you delete the only code that was using an imported module, remove the import statement as well.
  1. Run tests. Always run tests and/or type checkers (e.g., tsc --noEmit) after removal to ensure you didn't accidentally break a hidden dependency.

Output

  • The deletion diff plus, per removed symbol, the search evidence that it was unused

Verification

  • [ ] Whole-repo search performed per symbol — including string-keyed/dynamic references
  • [ ] No commented-out code left behind
  • [ ] Orphaned imports pruned along with the dead code
  • [ ] Tests and type checker green after removal

Failure Modes

  • Current-file blindness — "this file doesn't use it" is not "the repo doesn't use it".
  • Dynamic-invocation casualties — reflection/DI/ORM references don't appear as imports; search string keys too.
  • Commenting instead of deleting — commented-out code is still dead code; git history already preserves it.

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.