plugins/claude-code-expert/skills/verify-between-waves/SKILL.md
Checkpoint-between-waves cadence for multi-file refactors. After each logical batch (wave) of edits, run typecheck + tests; commit only on green; roll back the wave (not the whole branch) on red. Use for any refactor touching more than three files or three distinct concerns.
npx skillsauth add markus41/claude verify-between-wavesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A named cadence for multi-file refactors. This codifies what happens in practice on successful large refactors — and what's missing on the ones that go sideways.
Refactors fail when edits compound before any get verified. Classic failure mode: wave 1 edits look fine; wave 2 breaks something subtle in wave 1; by wave 4 the tsc errors are so tangled the repro takes longer than redoing the work.
Applied to the scrapin-aint-easy Tier-A refactor pass (one real session, n=1):
this._initialized rename broke two write sites (caught by tsc immediately after rename wave)now unused after the dead-comparator removal wave (caught on the same tsc pass)npx tsc --noEmit && pnpm test — no exceptionsAny edit set that:
Skip for single-file fixes, one-line edits, and documentation-only commits.
Wave = a logically coherent group of edits that can be reasoned about as one change.
Per wave:
1. Read the target files (batched, parallel Reads).
2. Make the edits (batched, parallel Edits). Keep edits narrow and related.
3. Gate: run typecheck (`tsc --noEmit`) and tests (`pnpm test` or equivalent).
4. If RED:
a. Do NOT add more edits.
b. Fix the regression inside the current wave.
c. Re-run the gate until GREEN.
d. If the fix grows the wave beyond "one coherent change", split into two waves
with a commit boundary between them.
5. If GREEN:
a. Commit with a scoped message naming the wave.
b. Move to the next wave.
After N waves: push.
| Signal | Wave size |
|---|---|
| Mechanical replace_all (e.g., errMsg helper replacing 11 ternaries) | One wave by itself |
| Related fixes in one file | One wave |
| Same pattern applied across 2-3 files | One wave |
| Cross-cutting change (interface extraction, rename of a widely-used symbol) | One wave, then verify, then cleanup wave |
| New feature + tests | One wave for feature, one for tests |
Anti-pattern: stuffing "security fixes + cleanup + new tests + doc update" into one wave.
Minimum:
Better (if available):
wave 1 — security hardening
wave 2 — tools.ts cleanup + schema visibility
wave 3 — pino redact + telemetry race + HNSW init
wave 4 — Puppeteer page pool
wave 5 — safePaginate helper, vector dirty flag
Each message states the wave's coherent theme; body documents what changed and what was left out.
cc-orchestrate.md Template 5): verify-between-waves is the "Verifier"
role formalized as a repeating cadence instead of a single final step.skills/checkpointing/SKILL.md): checkpointing saves orchestrator state
periodically; verify-between-waves saves code state (commits) periodically. Complementary.skills/context-budgeting/SKILL.md): waves are natural /compact
boundaries — after each green commit, the surrounding context is a good candidate to summarize.git reset --mixed HEAD~1 # undo the wave commit but keep files
git checkout -- <files> # drop the bad edits
# or: git stash # keep them for inspection
Then either redo the wave in smaller steps, or abandon that particular change and move on.
Any of these → stop editing, run the gate, commit what's green, re-plan the rest as new waves.
tools
Managing project and task state in .claude/projects/{id}/ with atomic writes and session continuity
tools
Deep research before task execution using 4-source protocol: codebase→Perplexity→Context7→Firecrawl
tools
Validating task completion against acceptance criteria with per-type automated checks
tools
Using and creating project templates for webapp, API, ML pipeline, mobile, and infrastructure projects