scan-cleanup

Detect dead code and stale patterns in monorepos using ripgrep scans.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/TrevorPLam/agency --skill scan-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan-cleanup
Source: https://github.com/TrevorPLam/agency/tree/main/.windsurf/skills/scan-cleanup
Command: npx skills add https://github.com/TrevorPLam/agency --skill scan-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean up codebases by detecting dead code, stale TODOs, and duplicate utilities that accumulate in long-running projects.

Core Features & Use Cases

  • Dead code detection: Identify unused exports and unreachable branches across apps and packages.
  • TODO/duplication audit: Surface stale TODOs and duplicated utilities to prioritize cleanup.
  • Automated triage workflow: Generate issues for each unique finding to track remediation.

Quick Start

Execute the scan commands and paste the full output into Windsurf to generate remediation tasks.

Frequently Asked Questions about scan-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect dead code and stale TODOs across multiple packages in a monorepo?

To detect dead code and stale TODOs in a monorepo, you can run automated ripgrep-based scans that surface unused exports, stale patterns, and duplicated utilities across all apps and packages.

What is the best way to automate triage for unused exports and duplicate utilities?

Automating triage for unused exports involves hashing each scan finding to ensure uniqueness, then appending the detected dead code and duplicate utilities directly to a tracking file like tasks/issues.md.

Does ripgrep work for finding stale TODOs and unreachable branches in long-running projects?

Yes, ripgrep works effectively for finding stale TODOs and unreachable branches by executing rapid text-based scans across large codebases to surface accumulated dead code patterns.

How do I generate remediation tasks after a dead code scan?

To generate remediation tasks after a dead code scan, execute the scan commands and paste the full output into Windsurf, which automatically creates actionable tasks for each unique finding.

Can I audit duplicated utilities and unused exports without installing external dependencies?

You can audit duplicated utilities and unused exports without installing external dependencies, as this scanning capability operates autonomously without requiring additional packages or components.