wip-checkpoint
Skill2 starsChanged 5 months agoMITView on GitHub
Continuous WIP-commit discipline for long features. Auto-commit at every decision point so the work survives crashes, terminal closes, and context compaction. Filter-squashed at PR time so history stays clean. From garrytan/gstack.
- Reads credentials
In this repository60 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- animation-disciplineSkill
- api-versioningSkill
- autopilotSkill
- browser-e2eSkill
- characterizeSkill
- clarifySkill
- codemodSkill
- constitution-compactSkill
- constitutionSkill
- context-budgetSkill
- creative-webSkill
- db-migrationSkill
- debugSkill
- detect-stackSkill
- dispatch-criteriaSkill
- dreamSkill
- experimentSkill
- fastapiSkill
- flag-cleanupSkill
- flag-rolloutSkill
- flask-realtimeSkill
- framework-detectorSkill
- front-end-designSkill
- grill-meSkill
- handoffSkill
- image-generationSkill
- implementSkill
- initiativeSkill
- instinctSkill
- loopSkill
- nextjsSkill
- observabilitySkill
- okr-alignSkill
- parallel-swarmSkill
- pivotSkill
- planSkill
- pr-bodySkill
- prime-disciplineSkill
- prod-observabilitySkill
- react-nodeSkill
- react-viteSkill
- release-trainSkill
- researchSkill
- reviewSkill
- security-guardSkill
- self-healSkill
- shipSkill
- skill-creatorSkill
- specifySkill
- tailwind-disciplineSkill
- tasksSkill
- tdd-loopSkill
- token-budgetSkill
- typographySkill
- verify-loopSkill
- verifySkill
- <kebab-case-skill-name>Skill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
After every meaningful decision (file structure choice, dependency added, test scaffold landed, refactor step done):
- Distinctive: line 43
Before opening the PR, squash WIP commits into one (or a few) clean commits:
- Distinctive: line 59
Don't squash if rolling back: If a WIP captured "what went wrong," it's valuable in incidents — let the postmortem reference it.
- Very specific: line 60
Auto-commit safe: Never git add .env, *.key, or anything matched by the pre-write-secret-scan hook (which still runs).
- Distinctive: line 64
After a crash or session loss:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WIP Checkpoint
A crash 6 hours into a feature destroys 6 hours. WIP checkpoints make that recoverable in seconds.
The pattern
After every meaningful decision (file structure choice, dependency added, test scaffold landed, refactor step done):
git add -A
git commit -m "WIP: <decision in 6 words>
[gstack-context]
state: <one line: where we are>
next: <one line: what's next>
why: <one line: rationale>
Co-Authored-By: Claude <noreply@anthropic.com>"When to checkpoint
| Trigger | Example WIP message |
| Scaffolded new module | WIP: scaffold auth module structure |
| Added dependency | WIP: add bcrypt for password hashing |
| Wrote failing test (TDD red phase) | WIP: failing test for login endpoint |
| Passed test (TDD green phase) | WIP: login endpoint returns 200 |
| Refactored | WIP: extract validation to middleware |
| Stuck, exploring | WIP: explore: 3 approaches to session storage |
Aim for one WIP commit every 5-15 minutes of work.
Filter-squash at PR time
Before opening the PR, squash WIP commits into one (or a few) clean commits:
# Interactive rebase from the base branch, squash all WIP into one
git rebase -i origin/main
# Mark all "WIP:" commits as `squash`, keep only the final commit with a Conventional Commits message
# OR use the helper:
bash .claude/scripts/squash-wip.shThe PR ends up with 1-3 clean commits; the WIP scaffold history is preserved in your local reflog and the squashed commit's body if you want to keep it.
Hard rules
- Always WIP-prefix. Filter relies on the literal
WIP:prefix. - Don't push WIP to shared branches. WIPs stay on the feature branch until squashed.
- Don't squash if rolling back. If a WIP captured "what went wrong," it's valuable in incidents — let the postmortem reference it.
- Auto-commit safe. Never
git add.env,*.key, or anything matched by the pre-write-secret-scan hook (which still runs).
Crash recovery
After a crash or session loss:
git log --oneline --grep '^WIP:' -20 # last 20 checkpoints
git log -1 --format='%B' <wip-sha> # full body of one checkpointThe state: / next: / why: lines tell you where to resume. Pair with /context-restore to rebuild session context from WIP commit bodies.
References
- garrytan/gstack (source — continuous checkpoint mode)
- ccg-workflow/templates/hooks/workflow-state.js (loop detection — if same
next:appears 3 turns in a row, warn)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

