Skip to content
Back to skills

Quality No Dead Code Dead Branches Cleanup

ASecurity

Removes unreachable or obsolete logic branches caused by legacy flags, impossible conditions, or retired compatibility paths while preserving intentional behavior.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
developmentjavascripttypescriptgojavanode

Security analysis

A100/100

Scanned October 2, 2026

npx -y skills add janpereira-dev/ngAutoPilot --skill quality--no-dead-code--dead-branches-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Quality No Dead Code Dead Branches Cleanup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Quality  No Dead Code  Dead Branches Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/janpereira-dev-quality-no-dead-code-dead-branches-cleanup/badge)](https://www.skillsdirectory.com/skills/janpereira-dev-quality-no-dead-code-dead-branches-cleanup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: quality.no-dead-code.dead-branches-cleanup
name: Dead Branches Cleanup
description: >
  Removes unreachable or obsolete logic branches caused by legacy flags, impossible conditions, or retired compatibility paths while preserving intentional behavior.
stack:
  - JavaScript
  - TypeScript
category: no-dead-code
status: stable
version: 0.10.0
owner: NgAutoPilot
triggers:
  - dead branches
  - unreachable code
  - obsolete branch
  - legacy flags
  - conditional cleanup
compatibility:
  runtime:
    browser: true
    node: true
---

# Dead Branches Cleanup

## Purpose

Use this skill to remove unreachable or obsolete logic branches.

The goal is to simplify control flow after migrations, flag removals, or compatibility drops.

The core rule is simple:

```txt
Delete only branches you can prove are dead.
```

## When to Use

Use this skill when:

- old feature flags are retired
- legacy compatibility paths are gone
- impossible conditions remain
- code after return or throw is still present

## Do

Verify the branch against:

- current feature flags
- current versions
- runtime contracts
- tests

## Do Not

Avoid removing branches that still serve real compatibility.

Avoid broad refactors that are unrelated to the dead branch.

## Review Checklist

- [ ] The branch is provably dead.
- [ ] Compatibility implications were checked.
- [ ] Tests still describe the intended behavior.

## Expected Output

1. Prove the branch is dead.
2. Remove it safely.
3. Keep compatibility in view.
4. Validate behavior.
5. Keep the cleanup bounded.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…