comment-batch
Run /comment-file across a glob of files (e.g., one Comment Plan session at a time). Tracks progress with TaskCreate, runs /typecheck after each batch, and commits at the end. Use to execute one C-ses
SKILL.md.claude/skills/comment-batch/SKILL.md
GitHubcomment-batch
Drives one session of [[Sessions/Comment Plan C1-C20]]. Takes a glob, runs /comment-file on each file, verifies, and commits.
Inputs
- Session number (e.g.
C4) — used for the commit message and task labels - Glob or file list — what to process (e.g.
apps/api/routes/{leads,customers,activities,contact-log,appointments}.ts) - Mode (default
update) — passed through to/comment-file
Steps
- Read [[Sessions/Comment Plan C1-C20]] and confirm the session scope matches what the user asked for. If the glob doesn't match the plan, ask before proceeding.
- Read [[Engineering/Comment Style]] once for this session.
- List the files matching the glob. Show the user the count and ask to confirm before starting (commenting is reversible but noisy).
- Create TaskCreate items — one per file. Mark the first
in_progress. - For each file:
a. Run
/comment-fileon it b. Mark the taskcompletedc. Run/typecheckevery 5 files (cheap insurance against accidentally breaking imports) - After all files:
- Run
/typecheckonce more for the whole monorepo - Run
/coverage-reportand report the new coverage % - Read the diff (
git diff --stat) and sanity-check the file count
- Run
- Tick the master plan — edit
Aqarkom_Knowledge/Sessions/Comment Plan C1-C20.md, change ⏳ → ✅ for this session row - Commit with
/commit-and-trackusing a message likedocs: comment session C4 — CRM routes (5 files) - Report to the user:
- Files commented
- Coverage % before/after
- Next ⏳ session in the plan
Verification
- User confirmed the file list before processing
-
/typecheckclean at the end - Master plan row ticked
- Single commit landed
- Coverage % reported
Anti-patterns
- ❌ Don't run
comment-batchacross an entire app in one shot — that's why the C plan is broken into 20 sessions - ❌ Don't commit per file — one commit per session keeps history readable
- ❌ Don't skip
/typecheckbetween batches — broken imports surface late and waste time - ❌ Don't continue past a typecheck error — fix or rollback the offending file first
Notes
- Typical session is 5–15 files. If a session has 30+ files (like
components/admin/), run two/comment-batchcalls and commit twice. - For Prisma schema (C2), don't use this skill — it's a single file with a different syntax (
///triple-slash). Run/comment-filedirectly.