checkpoint

checkpoint is a command for Claude Code from rjmurillo/ai-agents. It costs 31 tokens per session (1,725 once invoked), scanned B, original, MIT.

A command that saves a timestamped snapshot of the current session’s decisions, progress, and next actions. It stores the snapshot in .agents/checkpoints/ and links it from the session log.

In plain words
What is it for?
Use it to create an unlabeled or labelled checkpoint, redact sensitive data before saving, and record the checkpoint in the active session log.
Why use it?
It preserves a recoverable record before risky work or at the end of a work period, so important context is not lost.

Command for Claude Code

Part of the project-toolkit plugin — 22 commands, 33 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/rjmurillo/ai-agents/checkpoint
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 22 commands, 33 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/rjmurillo/ai-agents/checkpoint.svg)](https://agentmods.dev/commands/rjmurillo/ai-agents/checkpoint)
Your own site
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/checkpoint"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/checkpoint.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 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,725 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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 $0.00031 $0.01725
Opus 5 $0.00015 $0.00863
Sonnet 5 $0.00006 $0.00345
Haiku 4.5 $0.00003 $0.00172

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

Security

Grade B, and why

checkpoint scanned grade B 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 4d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

allowed-tools: Bash(date:*), Bash(git branch:*), Bash(python3 -m json.tool:*), Bash(python3 scripts/redact_secrets.py:*), Glob, Read, Edit, Write
.claude/commands/checkpoint.md · 176 lines

How it starts

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

Checkpoint Command

Capture the current state of work as a durable, timestamped snapshot. Use this mid-session when you want a recoverable save point before a risky change, at the end of a working block, or whenever the user asks to "checkpoint" progress. The file is the human-readable record; the session log keeps a reference to it.

Optional label for this checkpoint: $ARGUMENTS

Triggers

Trigger Effect
/checkpoint Write a timestamped checkpoint and link it from the active session log.
/checkpoint label Write a labeled checkpoint and link it from the active session log.

Process

Phase 1: Build checkpoint path

Resolve the timestamp, active session log, label, slug, and collision-safe checkpoint path.

Phase 2: Build and redact checkpoint

Render the checkpoint body and run it through the secret redactor before any Write call.

Phase 3: Persist and link

Write the redacted checkpoint to a path that does not already exist. Append checkpoint metadata to the active JSON session log when one exists, then validate the JSON.

Steps

  1. Get the current UTC timestamp for the filename and the file body:

    date -u +%Y%m%d-%H%M%S
    

    Use the output as YYYYMMDD-HHMMSS. Also record the full ISO 8601 UTC time (date -u +%Y-%m-%dT%H:%M:%SZ) for the body.

  2. Identify the active session log and default label:

    • Get the current branch with git branch --show-current.
    • Find .agents/sessions/*.json files and sort by filename descending. The filename order is the canonical "newest" order because session logs are named with YYYY-MM-DD-session-NN.
    • Read candidates in that order until you find the first log whose normalized session.branch equals the current branch. Normalize session.branch by trimming whitespace and removing one matching pair of surrounding backticks. That file is the active session log.
    • If $ARGUMENTS is empty after trimming, derive the label from the active session log's session.objective. If no active session log exists, derive it from the current branch. If that is empty, use checkpoint.

Read the full file on GitHub · 176 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. 4d ago First seen · 176 lines · 31 tokens per session scan B 69bd04f6a728

Subscribe to this mod's changes

checkpoint is a command published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 1,725 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.