Dead code eliminator

From a5c-ai/babysitter · View interactive version

Dead code eliminator is an AI agent skill from the GitHub repository a5c-ai/babysitter. Identify and safely remove dead, unused, and unreachable code from codebases

How to use this skill

Skill file

Dead Code Eliminator Skill

Identifies and safely removes dead code, unused functions, unreachable code paths, and orphaned files from codebases to reduce complexity and maintenance burden.

Purpose

Enable safe dead code removal for:

Capabilities

1. Unused Function Detection

2. Unreachable Code Identification

3. Unused Variable Detection

4. Orphan File Detection

5. Safe Removal Verification

6. Impact Analysis

Tool Integrations

| Tool | Language | Integration Method |

|------|----------|-------------------|

| ts-prune | TypeScript | CLI |

| unimported | JavaScript | CLI |

| deadcode | Python | CLI |

| UCDetector | Java | Eclipse Plugin |

| unused | Rust | CLI |

| deadcode | Go | CLI |

| webpack-bundle-analyzer | JavaScript | CLI |

Output Schema

{
  "analysisId": "string",
  "timestamp": "ISO8601",
  "deadCode": {
    "functions": [
      {
        "file": "string",
        "name": "string",
        "line": "number",
        "confidence": "high|medium|low",
        "reason": "string"
      }
    ],
    "variables": [],
    "files": [],
    "unreachable": []
  },
  "impact": {
    "filesAffected": "number",
    "linesRemovable": "number",
    "estimatedSizeReduction": "string"
  },
  "risks": [],
  "recommendations": []
}

Integration with Migration Processes

Related Skills

Related Agents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.