checkpointing
Skill199 starsChanged 2 months agoMITView on GitHub
Save session activity, rebuild rolling PROGRESS.md, and compact stale working blocks in .claude/STATE.md.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- ilhae-ai/claude-code-orchestratortheir own version, first seen Oct 20, 2026
- AI-Driven-School/aikitheir own version, first seen Feb 23, 2026
- gaebalai/claude-code-orchestratortheir own version, first seen Jan 31, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- gaebalai/claude-code-orchestrator★ 18same name
- ilhae-ai/claude-code-orchestrator★ 18same name
- AI-Driven-School/aiki★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- catchupSkill
- codex-systemSkill
- context-loaderSkill
- design-trackerSkill
- featureSkill
- initSkill
- planSkill
- research-libSkill
- simplifySkill
- spikeSkill
- tddSkill
- team-executeSkill
- troubleshootSkill
- update-lib-docsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Write a Japanese five-part summary containing: 何をしたのか, どういうやり取りをユーザーと行ったのか, どうやったのか, 途中でどういう課題が起こったのか, and 将来のアクション.
- Very specific: line 52
Add --label <slug> when the session's commit messages would not name it well.
- Distinctive: line 82
Run the Compact Phase below.
- Distinctive: line 124
Write the candidate state to a draft:
- Very specific: line 131
Ask for approval before replacing .claude/STATE.md or moving research notes.
- Distinctive: line 133
After approval, apply the compaction with the script — never by hand:
- Distinctive: line 164
All destructive moves require an explicit preview and user approval.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Checkpointing
Capture durable session context without growing the always-loaded root
AGENTS.md. Canonical state and artifacts live under .claude/.
Owned Paths
.claude/checkpoints/: full timestamped checkpoints; never deleted by the compact phase..claude/checkpoints/INDEX.md: generated catalog of every checkpoint.PROGRESS.md: latest five checkpoint summaries..claude/STATE.md: one Progress Tracker link and current working blocks..claude/logs/: drafts, previews, work logs, and CLI activity..claude/docs/research/: research notes; inactive notes may be archived only after user approval.
Both scripts write nothing without --apply. Every default run produces preview
files under .claude/logs/ and leaves PROGRESS.md and .claude/STATE.md
untouched.
Full Checkpoint
- Determine the time window from the newest checkpoint, or use all available history when none exists.
- Gather the user requests and decisions from the current conversation, git changes, CLI logs, team work logs, and relevant design changes.
- Write a Japanese five-part summary containing:
何をしたのか,どういうやり取りをユーザーと行ったのか,どうやったのか,途中でどういう課題が起こったのか, and将来のアクション. This is the irreducible judgment in the skill and is never generated: a missing, empty, stale, or incomplete summary aborts the run with exit2. Save the summary to
.claude/logs/pending-summary.md, then preview:python3 .claude/skills/checkpointing/checkpoint.py \ --summary-file .claude/logs/pending-summary.mdExit
0reportsresult: previewand four preview files (checkpoint-preview-*,index-preview-*,progress-preview-*,state-preview-*under.claude/logs/). Exit1is a bad--since/--now; exit2is a summary or shared-state contract violation; exit3is a timestamp collision, a concurrent modification, or a write failure.Add
--label <slug>when the session's commit messages would not name it well; the label becomes the checkpoint's slug in the frontmatter and the index.Review the four previews, then write for real:
python3 .claude/skills/checkpointing/checkpoint.py \ --summary-file .claude/logs/pending-summary.md \ --apply --consume-summary --json--consume-summarydeletes the draft on success, so the next session cannot silently embed this session's summary.--jsonemits the single payload{ok, result, checkpoint_path, prompt_path, index_path, slug, tags, progress_path, progress_entries, state_path, state_updated, summary_validated, summary_consumed, commits, files_changed, cli_consultations, agent_teams, work_logs, collector_errors, skipped_records, warnings, artifacts}; without it the same facts are printed as prose. Quotecollector_errorsandwarningsverbatim when reporting — a failed collector is not an empty session.Confirm the shared-state invariant mechanically rather than by reading:
python3 .claude/skills/checkpointing/refresh_guard.py --mode checkExit
0means exactly one# Agent Stateand one## Progress Trackerheading; exit2means the structure is invalid.- Review whether durable architecture decisions belong in
.claude/docs/DESIGN.md; use/design-trackerwhen warranted. - Run the Compact Phase below.
Finding a Past Checkpoint
Three layers make retrieval cheap, so a past session is found without reading the directory file by file:
.claude/checkpoints/INDEX.md— one table, newest first, with the branch, tags, counts, and headline for every checkpoint. Read this first and scan the tags and summary columns.- YAML frontmatter — each checkpoint opens with
id,timestamp,branch,slug,summary,tags, and the session counts. Reading the first ~14 lines settles relevance without parsing the document. PROGRESS.md— the five most recent summaries in full, for the common case of "what happened lately".
INDEX.md is regenerated from the checkpoints' frontmatter on every --apply,
so a deleted or hand-edited checkpoint is reflected on the next run rather than
advertised forever. Checkpoint filenames stay YYYY-MM-DD-HHMMSS.md: the slug
lives in the metadata, not the path, so PROGRESS.md links and
collect_repo_state.py keep working. Do not hand-edit INDEX.md.
Compact Phase
The compact phase keeps only the newest ## Current Project,
## Current Feature, and ## Current Bug Fix block of each category. Every
other section is preserved verbatim in document order — ## Main Agent,
## Repository Identity, ## Progress Tracker, and any manual notes, which
.claude/rules/agent-state.md explicitly sanctions. A section that would still
be lost is reported in sections_dropped and aborts the run with exit 2.
Inspect the state, the compaction preview, and the suggested archive moves:
python3 .claude/skills/checkpointing/refresh_guard.py --mode planReports
blocks_pruned,sections_preserved,sections_dropped,research_notes, andmove_plan.move_planentries carrysuggested: true: they come from a stem-mention heuristic and are never a decision.Write the candidate state to a draft:
python3 .claude/skills/checkpointing/refresh_guard.py --mode compose- Review
.claude/logs/composed-state.mdand the reported move plan. - Ask for approval before replacing
.claude/STATE.mdor moving research notes. Never delete checkpoint files or regeneratePROGRESS.mdhere. After approval, apply the compaction with the script — never by hand:
python3 .claude/skills/checkpointing/refresh_guard.py --mode apply python3 .claude/skills/checkpointing/refresh_guard.py --mode apply --applyThe first call previews to
.claude/logs/state-compaction-preview-*.mdand reportsstate_hash_before. The second writes atomically, refuses if.claude/STATE.mdchanged since it was read, and validates the composed bytes before replacing. Pass--expect-hash <state_hash_before>to pin the exact revision that was approved.Confirm the compaction landed:
python3 .claude/skills/checkpointing/refresh_guard.py --mode verifyverifycompares the on-disk state against a freshly composed candidate and reportscompaction_applied. Exit2means redundant work blocks remain.
Safety Gates
- Root
AGENTS.mdis never modified. INDEX.mdis generated, never hand-maintained; it is not a checkpoint and is never listed inPROGRESS.md.- State structure must contain exactly one
# Agent Stateheading and one## Progress Trackerheading. - Archive destinations use
.claude/docs/research/archive/; append when a destination already exists. - All destructive moves require an explicit preview and user approval.
- Report the checkpoint path, state blocks pruned, sections preserved, research
notes archived, validation result, and remaining risks, per
.claude/rules/language.md.
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.

