> ## Documentation Index
> Fetch the complete documentation index at: https://docs.detail.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Dead Code Detection and Removal

> Detail's finds unused symbols, functions, and files across your repositories and automatically opens pull requests to remove them.

Detail detects unused symbols, functions, and files in your codebase and automatically opens pull requests to remove them. You get a steady stream of focused PRs that keep your codebase lean.

If your CI pipeline catches an issue with a removal, Detail will update the PR automatically.

## How it works

<Steps>
  <Step title="Agent analyzes the repository">
    Detail scans your repository looking for dead code. It only flags code it can verify is truly unreferenced and has been dead for a minimum amount of time.
  </Step>

  <Step title="Detail opens pull requests">
    For each batch of dead code found, the agent opens a pull request containing the removal patch. The PR description explains what was removed, when it was introduced, when it became unused, and why Detail is sure it's safe to remove. Detail will automatically assign the PR to an engineer who has context on the dead code.
  </Step>

  <Step title="Review and merge">
    Treat the PR like any other: review the diff, leave comments, request changes, or merge. You stay in full control of what lands in your main branch.
  </Step>
</Steps>

## Enabling dead code scanning

<Steps>
  <Step title="Open Dead Code settings">
    In the Detail dashboard, go to **Dead Code** and select the repository you want to configure.
  </Step>

  <Step title="Enable Dead Code">
    Toggle **Dead Code** to on. You can schedule scans nightly, weekly, or on weekdays only. Optionally, you can specify a single reviewer to whom Detail will assign all Dead Code PRs.
  </Step>
</Steps>
