checkpoint

checkpoint is a command for coding agents from sangrokjung/claude-forge. It costs 11 tokens per session (1,491 once invoked), scanned C, original, MIT.

A command for saving, restoring, listing, comparing, and deleting named Git work checkpoints. A checkpoint records the branch, commit, staged and unstaged changes, and copies of untracked files.

In plain words
What is it for?
Use `/checkpoint save` before a refactor, `/checkpoint restore` to recover a saved state, `/checkpoint list` to view checkpoints, `/checkpoint diff` to compare them, and `/checkpoint delete` to remove one.
Why use it?
It lets developers preserve work before a risky change and compare or restore saved states later. This is useful when changes are unfinished or need a recovery point.

Command

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents shipped together

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/sangrokjung/claude-forge/checkpoint
Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for checkpoint

README.md
[![agentmods](https://agentmods.dev/badge/commands/sangrokjung/claude-forge/checkpoint.svg)](https://agentmods.dev/commands/sangrokjung/claude-forge/checkpoint)
Your own site
<a href="https://agentmods.dev/commands/sangrokjung/claude-forge/checkpoint"><img src="https://agentmods.dev/badge/commands/sangrokjung/claude-forge/checkpoint.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 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,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.1 $0.00011 $0.01491
Opus 5 $0.00005 $0.00745
Sonnet 5 $0.00002 $0.00298
Haiku 4.5 $0.00001 $0.00149

Measured 6d ago against content hash ac71c6bec2cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

checkpoint scanned grade C with 1 finding 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 6d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .claude/checkpoints/{name}
commands/checkpoint.md · 238 lines

How it starts

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

/checkpoint - 작업 상태 저장/복원 (v6)


0단계: 파라미터 파싱

서브커맨드 설명 필수 인자
save 현재 상태 저장 "이름"
restore 저장된 상태 복원 "이름"
list 저장된 체크포인트 목록 없음
diff 체크포인트 간 차이 비교 "이름"
delete 체크포인트 삭제 "이름"

옵션:

  • --tag 태그: 체크포인트에 태그 부착 (예: --tag stable, --tag pre-refactor)

1단계: 저장소 경로

체크포인트 저장 위치:

.claude/checkpoints/
  {name}/
    metadata.json
    staged.patch      # staged 변경사항
    unstaged.patch    # unstaged 변경사항
    untracked/        # untracked 파일 복사본

저장소 디렉토리가 없으면 생성한다:

mkdir -p .claude/checkpoints

2단계: save 서브커맨드

2-1. 현재 상태 수집

# 현재 브랜치
git branch --show-current

# 현재 커밋
git rev-parse --short HEAD

# staged 변경사항
git diff --cached > .claude/checkpoints/{name}/staged.patch

# unstaged 변경사항
git diff > .claude/checkpoints/{name}/unstaged.patch

# 변경 통계
git diff --stat HEAD

# untracked 파일 목록
git ls-files --others --exclude-standard

2-2. untracked 파일 복사

untracked 파일이 있으면 복사본을 저장한다:

mkdir -p .claude/checkpoints/{name}/untracked
# 각 untracked 파일을 디렉토리 구조 유지하며 복사

2-3. 메타데이터 생성

{
  "name": "기능완료",
  "timestamp": "2026-02-07T15:30:00Z",
  "branch": "feature/auth",
  "commit": "abc1234",
  "files": [
    "src/auth/login.ts",
    "src/auth/register.ts"
  ],
  "stats": {
    "additions": 45,
    "deletions": 12,
    "files_changed": 3,
    "untracked_count": 1
  },
  "tags": ["stable"],
  "auto": false,
  "v6_metadata": {
    "security_status": "pass"
  }
}

v6_metadata 필드 설명:

  • security_status: 마지막 보안 검사 결과 (pass/fail/unknown)

2-4. 자동 체크포인트

다음 상황에서 자동으로 체크포인트를 생성한다:

  • /commit-push-pr 실행 전
  • /handoff-verify 검증 3회 실패 시

자동 체크포인트의 auto 필드는 true로 설정한다. 이름 형식: auto-{YYYYMMDD-HHmmss}


3단계: restore 서브커맨드

3-1. 체크포인트 존재 확인

ls .claude/checkpoints/{name}/metadata.json

3-2. 현재 상태 백업

복원 전 현재 상태를 pre-restore-{timestamp} 이름으로 자동 저장한다.

3-3. 복원 실행

# staged 변경사항 복원
git apply .claude/checkpoints/{name}/staged.patch
git add -A

# unstaged 변경사항 복원
git apply .claude/checkpoints/{name}/unstaged.patch

# untracked 파일 복원
cp -r .claude/checkpoints/{name}/untracked/* ./ 2>/dev/null

Read the full file on GitHub · 238 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. 6d ago First seen · 238 lines · 11 tokens per session scan C ac71c6bec2cd

Subscribe to this mod's changes

checkpoint is a command published in the GitHub repository sangrokjung/claude-forge (825 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 1,491 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.