agentleFS
qyndexqyndex/claude-init/.claude/skills/wip-checkpoint/SKILL.md

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

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
  1. Distinctive:

    After every meaningful decision (file structure choice, dependency added, test scaffold landed, refactor step done):

    line 14
  2. Distinctive:

    Before opening the PR, squash WIP commits into one (or a few) clean commits:

    line 43
  3. Distinctive:

    Don't squash if rolling back: If a WIP captured "what went wrong," it's valuable in incidents — let the postmortem reference it.

    line 59
  4. Very specific:

    Auto-commit safe: Never git add .env, *.key, or anything matched by the pre-write-secret-scan hook (which still runs).

    line 60
  5. Distinctive:

    After a crash or session loss:

    line 64

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

TriggerExample WIP message
Scaffolded new moduleWIP: scaffold auth module structure
Added dependencyWIP: 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
RefactoredWIP: extract validation to middleware
Stuck, exploringWIP: 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.sh

The 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 checkpoint

The 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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.