Skip to content
Back to skills

Dead Code

ASecurity

Finds unused functions, variables, exports, and dependencies across the codebase

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 1, 2026
ai-agentstypescriptgobash

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill dead-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dead Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dead Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-dead-code/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-dead-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dead-code
description: Finds unused functions, variables, exports, and dependencies across the codebase
user-invocable: true
allowed-tools: Bash Grep Glob Read
effort: medium
---

## Dead Code Analysis

1. Find unused exports (TypeScript/JS):
```bash
npx ts-prune 2>/dev/null || npx unimported 2>/dev/null || echo "Running manual search"
```

2. Manual search for likely dead code:
```bash
# Exported but never imported
grep -r "^export " src/ --include="*.ts" -l | head -20

# Functions defined but never called
grep -r "^function \|^const .* = (" src/ --include="*.ts" | head -30
```

3. For each candidate, verify by searching for all usages across the codebase.

4. Report categories:
   - **Safe to delete**: confirmed zero usages
   - **Probably dead**: only used in tests or commented-out code
   - **Keep**: used dynamically or via reflection

5. For safe-to-delete items: ask confirmation, then remove.

Never delete code you're not certain about - mark uncertain items with `// TODO: verify unused`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.