checkpoint

A checkpoint workflow that records project progress so work can be resumed after the conversation context is cleared. It combines verification, a Git commit, progress notes, and saved session information.

In plain words
What is it for?
Use it after completing a task to run checks, review and commit changes, update progress documentation, and preserve the project state.
Why use it?
It prevents the next session from having to rediscover what was completed, what changed, and what should happen next.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/xiaobei930/cc-best/checkpoint
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.01827
Opus 5 $0.00005 $0.00914
Sonnet 5 $0.00002 $0.00365
Haiku 4.5 $0.00001 $0.00183

Measured 2d ago against content hash 0f32cb21f80b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

checkpoint scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/checkpoint.md · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/checkpoint - 检查点管理

任务完成时执行检查点,确保状态持久化到文档。核心原则:文档是上下文的持久化存储。

核心理念

/clear 后 Claude 只能从文档了解项目状态,检查点是跨会话记忆的关键


检查点流程

验证 → 提交 → 更新文档 → 保存会话状态 → 建议 /clear

1. 验证

# 代码验证(根据项目类型选择)
# Python
python -m py_compile <file.py>
pytest <test_file.py> -v

# TypeScript/Node
npm run build
npm test

# 通用
git diff --check  # 检查空白错误

2. 提交

# 检查变更
git status
git diff

# 提交(Conventional Commits)
git add <files>
git commit -m "type(scope): description"

提交类型:

  • feat: 新功能
  • fix: 修复 bug
  • docs: 文档更新
  • refactor: 重构
  • test: 测试相关
  • chore: 构建/工具

3. 更新文档(最重要!)

必须更新 memory-bank/progress.md

# 项目进度

## 当前状态

- **阶段**: [阶段名称]
- **最后更新**: [YYYY-MM-DD HH:MM]
- **last_checkpoint**: [YYYY-MM-DD HH:MM]

## 已完成

- [x] 完成的任务1
- [x] 完成的任务2

## 进行中

- [ ] 当前任务(如有)

## 待办

- [ ] 下一个任务
- [ ] 后续任务

## 下一步

[明确说明下一个要做什么]

## 决策记录

| 日期 | 角色 | 决策 | 依据 | 置信度 |
| ---- | ---- | ---- | ---- | ------ |

## 检查点历史

| 时间 | 完成内容 | Git Commit |
| ---- | -------- | ---------- |

文档更新原则:

  • 写给 /clear 后的下一个 Claude 实例看
  • 包含足够的上下文让它能继续工作
  • 明确说明下一步是什么

4. 保存会话状态(可选)

如果启用了 Memory Persistence hooks,会话状态会自动保存到 ~/.claude/sessions/

手动保存会话笔记:

# 会话笔记 - YYYY-MM-DD

## 本次会话完成

- [完成的内容]

## 遇到的问题

- [问题及解决方案]

## 下次会话注意

- [需要注意的事项]

## 需要加载的上下文

- memory-bank/progress.md
- [其他相关文件]

5. 建议 /clear

任务完成后,告知用户:

检查点完成。文档已更新。

建议执行 /clear 清除上下文,然后 /cc-best:iterate 继续下一个任务。

下一个任务: [具体任务名称]

检查清单

代码检查点

  • 无语法错误
  • 可以正常导入/构建
  • 相关测试通过

前端检查点(如涉及)

  • 页面正常渲染
  • Console 无 Error 级别日志
  • 关键交互功能正常

Git 检查点

  • 变更已提交
  • commit message 符合规范
  • 无敏感信息

文档检查点(最重要!)

  • progress.md 已更新
  • 记录了完成的内容
  • 明确了下一步任务
  • 重要决策已记录

使用方式

/cc-best:checkpoint          # 执行完整检查点流程
/cc-best:checkpoint verify   # 只验证,不提交
/cc-best:checkpoint docs     # 只更新文档
/cc-best:checkpoint restore  # 从上一个检查点恢复状态
/cc-best:checkpoint --archive  # 归档旧记录(当 progress.md 过大时)

Read the full file on GitHub · 311 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 311 lines · 9 tokens per session scan A 0f32cb21f80b

Subscribe to this mod's changes

checkpoint is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 9 tokens to every session and 1,827 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.