Codebase Task Finder
Scan the codebase for work that should be done — TODOs, fixmes, tech debt, dead code, missing error handling at boundaries, and low-hanging improvements. Prioritize by impact and effort, and optionally fix the quick wins.
Input: "$ARGUMENTS"
Workflow
1. Determine Scope
- If a path or scope is provided (e.g.,
apps/sync, packages/, src/), limit the scan to that area
- If no scope is provided, scan the full repo but focus on
src/, apps/, packages/, lib/ — skip node_modules, dist, .next, vendor directories
2. Scan for Explicit Markers
Search for developer-left markers:
# TODOs and FIXMEs
grep -rn "TODO\|FIXME\|HACK\|XXX\|TEMP\|WORKAROUND" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.go" --include="*.py" <scope>
# Disabled or skipped tests
grep -rn "\.skip\|xdescribe\|xit\|@skip\|@disabled" --include="*.test.*" --include="*_test.*" <scope>
# Commented-out code blocks (3+ consecutive commented lines)
3. Scan for Implicit Issues
Read key files and look for:
Dead code:
- Exported functions/types that are never imported elsewhere
- Unused variables flagged by linter configs but not yet cleaned up
- Files that haven't been modified in 6+ months and aren't referenced
Error handling gaps:
- Empty catch blocks
- Caught errors that are silently swallowed (no log, no rethrow)
- API endpoints without try/catch at the handler level
Consistency issues:
- Mixed patterns in the same directory (some files use one approach, others use another)
- Duplicated logic that could be a shared utility
Dependency concerns:
- Check
package.json or equivalent for packages with known deprecations
- Major version bumps available for key dependencies
4. Prioritize
Categorize each finding:
| Priority |
Criteria |
| Quick win |
Can be fixed in <10 lines, no risk, clear improvement |
| Should do |
Real issue, moderate effort, worth scheduling |
| Consider |
Valid improvement but low urgency |
| Skip |
Noise, intentional tech debt, or not worth the effort |
5. Present Findings
# Codebase Tasks — [repo/scope]
## TLDR
[X] items found: [Y] quick wins, [Z] should-do, [W] consider
## Quick Wins (fix now)
| # | File:Line | Issue | Effort |
|---|---|---|---|
| 1 | src/api/handler.ts:42 | Empty catch block swallows auth error | 2 min |
| 2 | lib/utils.ts:15 | TODO from 6 months ago — dead code below | 1 min |
## Should Do (schedule)
| # | File:Line | Issue | Effort | Impact |
|---|---|---|---|---|
| 1 | apps/sync/worker.ts:200 | Retry logic has no backoff | 30 min | Reliability |
## Consider
- [Lower priority items, briefly listed]
## Skipped
- [Items that look like issues but are intentional, with a note why]
6. Fix Quick Wins (if --fix flag passed)
If the user passed --fix:
- Fix each quick win (empty catches, dead TODOs, obvious dead code)
- Stage the changes
- Create a commit per logical group of fixes
- Push to a new branch and put up a PR
- Follow the repo's CLAUDE.md commit format and branch naming
If --fix was NOT passed, just present the findings.
Rules
- Don't flag style preferences — only flag things that are objectively improvable
- Don't flag things a linter or type checker would catch — assume those run in CI
- TODOs with context ("TODO(alex): revisit after Q2 migration") are lower priority than naked TODOs
- If the repo has a CLAUDE.md, respect its conventions for what counts as an issue
- Dead code removal should be verified — check imports and references before flagging
- When fixing, keep changes minimal — fix the issue, don't refactor the neighborhood
1---2name: codebase-tasks3description: Scan a codebase for TODOs, tech debt, and improvements — prioritize and optionally put up PRs for the quick wins4---56# Codebase Task Finder78Scan the codebase for work that should be done — TODOs, fixmes, tech debt, dead code, missing error handling at boundaries, and low-hanging improvements. Prioritize by impact and effort, and optionally fix the quick wins.910**Input:** "$ARGUMENTS"1112## Workflow1314### 1. Determine Scope1516- If a path or scope is provided (e.g., `apps/sync`, `packages/`, `src/`), limit the scan to that area17- If no scope is provided, scan the full repo but focus on `src/`, `apps/`, `packages/`, `lib/` — skip `node_modules`, `dist`, `.next`, vendor directories1819### 2. Scan for Explicit Markers2021Search for developer-left markers:2223```bash24# TODOs and FIXMEs25grep -rn "TODO\|FIXME\|HACK\|XXX\|TEMP\|WORKAROUND" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.go" --include="*.py" <scope>2627# Disabled or skipped tests28grep -rn "\.skip\|xdescribe\|xit\|@skip\|@disabled" --include="*.test.*" --include="*_test.*" <scope>2930# Commented-out code blocks (3+ consecutive commented lines)31```3233### 3. Scan for Implicit Issues3435Read key files and look for:3637**Dead code:**38- Exported functions/types that are never imported elsewhere39- Unused variables flagged by linter configs but not yet cleaned up40- Files that haven't been modified in 6+ months and aren't referenced4142**Error handling gaps:**43- Empty catch blocks44- Caught errors that are silently swallowed (no log, no rethrow)45- API endpoints without try/catch at the handler level4647**Consistency issues:**48- Mixed patterns in the same directory (some files use one approach, others use another)49- Duplicated logic that could be a shared utility5051**Dependency concerns:**52- Check `package.json` or equivalent for packages with known deprecations53- Major version bumps available for key dependencies5455### 4. Prioritize5657Categorize each finding:5859| Priority | Criteria |60|---|---|61| **Quick win** | Can be fixed in <10 lines, no risk, clear improvement |62| **Should do** | Real issue, moderate effort, worth scheduling |63| **Consider** | Valid improvement but low urgency |64| **Skip** | Noise, intentional tech debt, or not worth the effort |6566### 5. Present Findings6768```69# Codebase Tasks — [repo/scope]7071## TLDR72[X] items found: [Y] quick wins, [Z] should-do, [W] consider7374## Quick Wins (fix now)75| # | File:Line | Issue | Effort |76|---|---|---|---|77| 1 | src/api/handler.ts:42 | Empty catch block swallows auth error | 2 min |78| 2 | lib/utils.ts:15 | TODO from 6 months ago — dead code below | 1 min |7980## Should Do (schedule)81| # | File:Line | Issue | Effort | Impact |82|---|---|---|---|---|83| 1 | apps/sync/worker.ts:200 | Retry logic has no backoff | 30 min | Reliability |8485## Consider86- [Lower priority items, briefly listed]8788## Skipped89- [Items that look like issues but are intentional, with a note why]90```9192### 6. Fix Quick Wins (if --fix flag passed)9394If the user passed `--fix`:95- Fix each quick win (empty catches, dead TODOs, obvious dead code)96- Stage the changes97- Create a commit per logical group of fixes98- Push to a new branch and put up a PR99- Follow the repo's CLAUDE.md commit format and branch naming100101If `--fix` was NOT passed, just present the findings.102103## Rules104105- Don't flag style preferences — only flag things that are objectively improvable106- Don't flag things a linter or type checker would catch — assume those run in CI107- TODOs with context ("TODO(alex): revisit after Q2 migration") are lower priority than naked TODOs108- If the repo has a CLAUDE.md, respect its conventions for what counts as an issue109- Dead code removal should be verified — check imports and references before flagging110- When fixing, keep changes minimal — fix the issue, don't refactor the neighborhood