Troiana Prompt Library · Claude · Development

Delete dead code safely

Establish what is genuinely unreachable before removing it.

What this prompt helps you do

A removal plan with the evidence for each candidate, the risk, and what must be checked before deleting.

When to use it

A codebase has accumulated code that appears unused and nobody is confident enough to remove it.

What to prepare

The goal, relevant source material, constraints, examples, and the decision or action this should support.

How to get a strong result

Treat reflection, dynamic dispatch, and external callers as reasons to keep; unreachable is harder to prove than it looks.

How to use this prompt

Replace each placeholder with accurate context. Paste the complete prompt into Claude, review the response critically, resolve important questions, and use it as a considered input to the next decision—not as an unchecked final answer.

Browse all ChatGPT, Claude, and Codex prompts