loose-ends

Detect unused imports, TODOs, and missing tests across changed files.

60|2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/ElliotJLT/Claude-Skill-Potions --skill loose-ends
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loose-ends
Source: https://github.com/ElliotJLT/Claude-Skill-Potions/tree/main/skills/loose-ends
Command: npx skills add https://github.com/ElliotJLT/Claude-Skill-Potions --skill loose-ends

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Before declaring work complete, teams risk leaving unused imports, TODO comments, missing tests, stale references, or incomplete error handling. This skill provides a final hygiene sweep to catch and remediate those issues.

Core Features & Use Cases

  • Loose Ends Sweep: Detects unused imports and variables, stray console statements, outstanding TODOs/FIXME, and outdated references across touched files.
  • Guided Remediation: Produces actionable items and a report to guide developers through fixes before merging or releasing.
  • Use Case: After implementing a feature or fix, run the sweep to ensure no cruft remains and that tests still cover the changes.

Quick Start

Run the sweep against your changed files to surface cleanup opportunities. Then address the findings and re-run until clean.

  • python scripts/sweep.py
  • Review the output and fix any flagged issues.

Frequently Asked Questions about loose-ends

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

FAQPage Schema
How do I identify unused imports and variables in my codebase before release?

Unused imports and variables create technical debt and obscure code intent. Run the sweep script against your changed files to automatically detect unused imports, stray variables, and console statements, then remediate the flagged issues before merging.

What's the best way to catch TODO and FIXME comments left in code?

TODO and FIXME comments signal incomplete work that risks shipping unfinished logic. The sweep identifies all outstanding TODOs and FIXMEs across touched files, surfacing them as actionable items so you can resolve or document them before release.

Can I detect missing tests and incomplete error handling automatically?

Yes. The sweep detects missing test coverage and incomplete error handling patterns across multi-file changes. It reports these gaps alongside other loose ends, guiding you to add tests and error paths before declaring work complete.

How do I clean up stale references and unused code without breaking functionality?

Stale references and dead code accumulate during refactoring. The sweep identifies unused references and incomplete patterns without altering runtime behavior, producing a report of cleanup opportunities you can safely remediate.

When should I run a code cleanup sweep in my development workflow?

Run the sweep after implementing a feature or fix and before submitting for review or release. It catches cruft early, reduces review friction, and ensures test coverage aligns with your changes.