checkpoint

checkpoint is a command for Claude Code from nxtg-ai/forge-plugin. It costs 6 tokens per session (950 once invoked), scanned A, original, MIT.

A project-state snapshot tool that saves git information, uncommitted changes, governance settings, and environment details in a JSON file. It can save, restore, list, and manage these checkpoints.

In plain words
What is it for?
Use it before experiments or risky changes, to list saved states, or to restore a checkpoint and receive the commands needed to return to it without automatically running destructive git operations.
Why use it?
It makes it easier to return to a known project state while keeping project-tracking context alongside the code state.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it before experiments or risky changes, to list saved states, or to restore a checkpoint and receive the commands needed to return to it without automatically running destructive git operations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nxtg-ai/forge-plugin/checkpoint
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 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/nxtg-ai/forge-plugin/checkpoint/github.svg)](https://agentmods.dev/commands/nxtg-ai/forge-plugin/checkpoint)
Your own site
<a href="https://agentmods.dev/commands/nxtg-ai/forge-plugin/checkpoint"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/checkpoint/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for checkpoint

Your own site · 80×15
<a href="https://agentmods.dev/commands/nxtg-ai/forge-plugin/checkpoint"><img src="https://agentmods.dev/badge/commands/nxtg-ai/forge-plugin/checkpoint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00006 $0.00950
Opus 5.5 $0.00002 $0.00380
Sonnet 5.5 $0.00001 $0.00190
Haiku 4.5 $0.00001 $0.00095

Measured 12d ago against content hash e5d8a94e0aa8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d 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.

plugins/nxtg-forge/commands/checkpoint.md · 169 lines

How it starts

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

NXTG-Forge Checkpoint Manager

You are the Checkpoint Manager - save and restore project state for safe experimentation and rollback.

Parse Arguments

Arguments received: $ARGUMENTS

Parse the first word as the operation:

  • save [name] - Save current state (default if no operation specified)
  • restore <name> - Restore from checkpoint
  • list - Show all checkpoints
  • clear <name> - Delete a checkpoint
  • No arguments: defaults to save with auto-generated name

Operations

Save Checkpoint

  1. Create checkpoint directory:
mkdir -p .claude/checkpoints
  1. Generate checkpoint ID from argument or timestamp:

    • If name provided: use it (sanitized)
    • If no name: use format cp-YYYYMMDD-HHMMSS
  2. Gather state and write checkpoint file:

CHECKPOINT_ID="<generated_id>"

# Gather git state
GIT_COMMIT=$(git rev-parse HEAD 2>/dev/null || echo "N/A")
GIT_BRANCH=$(git branch --show-current 2>/dev/null || echo "N/A")
GIT_STATUS=$(git status --porcelain 2>/dev/null || echo "")
  1. Read current governance state from .claude/governance.json if it exists.

  2. Write checkpoint JSON to .claude/checkpoints/{id}.json:

{
  "id": "<checkpoint_id>",
  "timestamp": "<ISO timestamp>",
  "description": "<user description or auto>",
  "git": {
    "commit": "<hash>",
    "branch": "<branch>",
    "status": "<porcelain output>",
    "hasUncommitted": true/false
  },
  "governance": { ... },
  "environment": {
    "nodeVersion": "<version>",
    "cwd": "<working directory>"
  }
}
  1. Display confirmation:
Checkpoint saved: {id}
  Branch: {branch}
  Commit: {hash}
  Uncommitted changes: {yes/no}
  Location: .claude/checkpoints/{id}.json

Restore with: /nxtg-forge:checkpoint restore {id}

Restore Checkpoint

  1. Read checkpoint file from .claude/checkpoints/{name}.json
  2. Display checkpoint contents
  3. Show what would change:
Checkpoint: {id}
  Saved: {timestamp}
  Branch: {branch}
  Commit: {commit}

Current state:
  Branch: {current_branch}
  Commit: {current_commit}

Changes needed:
  - {description of differences}

Note: Git state is NOT automatically restored.
To restore git state:
  git checkout {branch}
  git reset --hard {commit}  (WARNING: discards changes)

Read the full file on GitHub · 169 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. 12d ago Changed e5d8a94e0aa8
  2. 1mo ago Changed · +44 lines · +6 tokens per session a09986afc51f
  3. 1mo ago First seen · 125 lines · 0 tokens per session scan A b00bf5f18aa8

Subscribe to this mod's changes

checkpoint is a command published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 6 tokens to every session and 950 once invoked, about $0.0000 per session on Opus 5.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-31.

Related

Other commands, from other repositories

fix-issues

Diagnose, reproduce, then fix reproducible open GitHub issues in parallel: one clean worktree/issue; symlink build artifacts to avoid rebuilds.

can1357/oh-my-pi · 0 tokens

release

Release all packages at specified version.

can1357/oh-my-pi · 0 tokens

update-pr-body

Bring the pull request's description in line with the final change. It was written when the draft opened; the base merge and correction rounds since then may have falsified claims in it, and a validation may have passed red it has to disclose. Your product is an accurate description, nothing else.

coleam00/Archon · 0 tokens

settle-threads

The previous round read unresolved review threads on the pull request, and this round's implementer judged each one like a review finding: fixed it, declined it with evidence, or found it needs a decision this run cannot make. Decide which threads are settled and write the reply each one gets. You write nothing…

coleam00/Archon · 0 tokens

fix-issue

Fixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to…

yonatangross/orchestkit · 82 tokens

create-pr

Creates GitHub pull requests with pre-flight validation, conventional title formatting, and structured summary generation. Runs parallel checks (tests, lint, type-check, security) before opening. Supports feature, bugfix, refactor, and hotfix PR types with milestone assignment via gh CLI. Invoke only if the operator…

yonatangross/orchestkit · 89 tokens