Scan todos

From melodic-software/claude-code-plugins · View interactive version

Scan todos is an AI agent skill from the GitHub repository melodic-software/claude-code-plugins. Sweep source comments, not tracker items, for TODO/FIXME/HACK/XXX markers and resolve or file each one. Use when: 'scan TODOs', 'scan for FIXME', 'sweep the codebase for markers', 'find TODO comments', 'resolve TODO/FIXME/HACK', 'scan for tech-debt comments', 'clean up markers'. Not the workflow for

How to use this skill

Skill file

Variables

Arguments: $ARGUMENTS, parsed as the flags below.

Shared tracker context

The seam, operation routing, label taxonomy, canonical-role remapping, recurring schedule, and

memory-tier write rule that every work-items skill relies on live in

CODE0

(and the references it links). Read it at the start of an invocation. Item creation goes through the

seam via the /work-items:track add path; the core inlines no provider commands.

Purpose

Resolve or file each actionable comment marker. To catch new markers as they land, prefer a commit-time hygiene gate (linter or git hook) in the consuming repo.

Flags

several repositories. With none of them, the scan covers the current repository as below.

Several repositories

The target forms resolve, count, fan out and merge as

CODE0

"Target forms", "Resolving repositories", "Fan-out" and "Merging findings" say. Each repository's

subagent runs Scan and Group only, with <project root> set to its own root and --path applied

inside it, and returns its groups. Outside the session's own checkout, Detection greps

origin/HEAD (git -C <root> grep -nE '<pattern>' origin/HEAD -- ...) and drops the

origin/HEAD: prefix from each hit. The parent keys groups by repository and parent folder,

presents one table of them all by count, and takes the selection; --work picks the smallest

group across every repository. The selected group's markers are resolved under "Writes stay per

repository", in a worktree of that group's repository, and each significant marker is filed with

/work-items:track add --repo <owner/name> so it lands in that repository's tracker.

Detection

If the consuming repo has its own comment-hygiene tooling (a shared pattern library, a lint lane), detect with it. Otherwise scan tracked files directly:

# -C roots the scan at the repo top — a bare git grep from a subdirectory searches only that subtree.
# With --path <dir>, thread it in as a root-relative pathspec: ... -- '<dir>'
# Thread the consuming repo's documented exclusion paths in the same way, as ':!<path>' pathspecs after --.
git -C "<project root>" grep -nE '\b(TODO|FIXME|HACK|XXX)\b' | tr -d '\r'

<project root> is the literal path CODE1 "Project root" resolves, in its own Bash call before this snippet.

Next

/work-items:triage for the raw items it filed.

Workflow

  1. Scan using the detection command above (or the repo's own tooling). Avoid per-file grep loops over large trees, one git grep pass scales; per-file spawning is unusable on Windows.
  1. Group by parent folder. Count items per group.
  1. Present summary table sorted by count (smallest first).
  1. User selects a group (by #) or use --work to auto-select the smallest.
  1. For each marker, read 10 lines of context before and after, then classify:

Never "Keep (intentional)" for actionable TODO/FIXME/HACK/XXX in merged production code.

  1. After processing a group, present a results table: file, line, action, detail.
  1. Verify: run the consuming repo's build/test/lint commands if any source file changed.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.