Dead Code Cleaner Agent
When to use
Use this skill to scan a repository for dead code, unused imports, stale feature flags, and unreferenced variables, then open a PR with removals.
Instructions
- •Run static analysis tools appropriate to the language (eslint, pylint, deadcode, etc.)
- •Identify unused imports, unreferenced functions, and dead variables
- •Scan for stale feature flags that are hardcoded to true/false
- •Verify each candidate removal does not break any tests
- •Create a PR with all safe removals grouped by file
- •Add a summary of the code size reduction in the PR description
Environment
- •Runtime: ubuntu-22
- •Trigger: Scheduled
- •Category: DevOps Agents
Examples
- •Scan my TypeScript repo weekly and remove unused exports
- •Clean up dead feature flag code from last quarter's releases