Loading...
Loading...
Before declaring work complete, checks for loose ends: unused imports, TODO comments created, missing tests, stale references, incomplete error handling. Activates after implementing features or fixes. The cleanup that always gets skipped.
npx skill4agent add elliotjlt/claude-skill-potions loose-endsanypython scripts/sweep.pyconsole.logprint()debuggerTODOFIXMEXXXHACKdd()var_dump()binding.pry# Find TODOs in changed files
git diff --name-only | xargs grep -n "TODO\|FIXME"
# Find console.log in changed files
git diff --name-only | xargs grep -n "console.log"
# Find unused imports (TypeScript)
npx tsc --noEmit 2>&1 | grep "declared but"
# Find any types added
git diff | grep ": any"| Priority | Type | Action |
|---|---|---|
| Fix now | Broken imports, missing exports | Blocks functionality |
| Fix now | console.log in production code | Leaks info |
| Should fix | Unused imports/variables | Code smell |
| Should fix | Missing tests for new logic | Technical debt |
| Note for later | Old TODOs in touched files | Existing debt |
| Ignore | Style inconsistencies | Not your scope |
## Loose Ends Check
**Files changed:** [count]
**Fixed:**
- [x] Removed unused import in `file.ts`
- [x] Removed console.log in `handler.ts`
**Noted:**
- [ ] `utils.ts:45` has existing TODO (not from this change)
**Clean:** No loose ends found / All addressed## Loose Ends Check
**Files changed:** 4
**Scanning...**
`api/users.ts`:
- Line 3: unused import `lodash` → Removed
- Line 45: console.log for debugging → Removed
`types/user.ts`:
- Clean
`tests/users.test.ts`:
- New endpoint has test → Good
- Edge case (empty input) not tested → Added
`services/user.ts`:
- Line 23: TODO I wrote: "validate email format" → Addressed now
**Result:** 4 loose ends found and fixed. Ready to commit.