Defensive Code Cleaner

Low confidence

Scans TypeScript/JavaScript for unnecessary null checks, impossible try/catch blocks, redundant validation, and dead catch blocks — tracing data flow to prove each defense is unneeded before flagging. Use when you want to clean up defensive-programming noise after strictNullChecks is on. Trigger with "find unnecessary null checks", "audit defensive code".

Type
subagent
GitHub stars
2.5K
Repository
jeremylongshore/claude-code-plugins-plus-skills
Category

Install

  1. 1Manual install

    Copy the subagent file from the repository into ~/.claude/agents/<name>.md. The filename must match the subagent name (e.g. defensive-code-cleaner.md).

  2. 2Verify

    /agents, /commands or /hooks in Claude Code

    Restart Claude Code and list your installed components to confirm it was picked up.

⚠️ Some repositories ship a CLI installer — check the repo README for the recommended method.

View on GitHub ↗

Prefer the full source? The repository README is the authoritative install reference.