Agent skill

Checkpointed Agent Loop

by davepoon in davepoon/buildwithclaude

Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint.

MITAuto-check passedAgent Workflows

Install Checkpointed Agent Loop

skills CLI
$ npx skills add davepoon/buildwithclaude --skill checkpointed-agent-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davepoon/buildwithclaude checkpointed-agent-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davepoon/buildwithclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/all-skills/skills/checkpointed-agent-loop .claude/skills/checkpointed-agent-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
checkpointed-agent-loop
GitHub stars
3.6k
Token cost
~1.7k tokens
SKILL.md length
690 words
Files
3 (incl. scripts)
Skills in repo
245
Repo updated
First seen
Licence
MIT

At a glance

Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint.

  • Works in 4 steps: Start one bounded attempt → Enter verification → Finish, retry, or escalate → …
  • Tasks that involve Autonomous loops
  • SKILL.md covers When to Use This Skill, State Model, Setup and Operating Protocol, plus 3 more sections
  • Runs JavaScript scripts from its folder; calls node

What it does

Checkpointed Agent Loop is an agent skill from davepoon/buildwithclaude. Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts.

It sits in Agent Workflows, covering Autonomous loops. The repository describes itself as: A single hub to find Claude Skills, Agents, Commands, Hooks, Plugins, and Marketplace collections to extend Claude Code, Claude Desktop, Agent SDK and OpenClaw. The licence is MIT.

When your agent uses it

  • Tasks that involve Autonomous loops

Example prompts

  • “/checkpointed-agent-loop”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Start one bounded attempt
  2. Enter verification
  3. Finish, retry, or escalate
  4. Resume after interruption

What it can do on your machine

Read from SKILL.md and the folder at commit 10bfc43. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Checkpointed Agent Loop loads about 1.7k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 690 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from davepoon/buildwithclaude at commit 10bfc43, republished under its MIT licence (© davepoon). 690 words, ~1,672 tokens.

Download SKILL.mdSave it as .claude/skills/checkpointed-agent-loop/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
checkpointed-agent-loop
description
Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint.
category
ai-agents
license
MIT

Checkpointed Agent Loop

Use this skill when a task can be interrupted, needs bounded retries, or must prove verification before it is called complete. It adds a small local checkpoint file around ordinary Claude Code work so a new context can resume from explicit state instead of reconstructing progress from chat.

The included Node.js utility stores state and evidence. It does not execute commands, call a model, spawn agents, access secrets, or contact a network service. Claude Code remains responsible for each actual tool call and for deciding whether a human approval is required.

When to Use This Skill

  • A migration, refactor, test repair, or investigation may span multiple sessions.
  • A bounded retry loop is safer than repeatedly improvising from conversation history.
  • A task needs a durable next action and a record of which verification actually ran.
  • You need to stop at an external dependency or a human decision without claiming success.

Do not use it for a one-line edit or a workflow that already has its own durable runner.

State Model

The checkpoint uses these states and only these transitions:

text
planned -> running
running -> verifying | failed | blocked
verifying -> succeeded | running | failed | blocked

succeeded, failed, and blocked are terminal. Entering running consumes one attempt, and the finite maxAttempts value cannot be exceeded. A transition to succeeded is rejected until the checkpoint contains at least one passing evidence record from verifying.

Setup

Choose a project-local path that is not committed with application code, for example .agent/checkpoints/data-migration.json. Keep objectives, reasons, and evidence free of API keys, tokens, passwords, personal data, and raw secret-bearing logs.

Set the helper path for the commands below:

bash
SKILL_DIR="<absolute path to the installed checkpointed-agent-loop skill>"
CHECKPOINT=".agent/checkpoints/task.json"

Initialize with a finite budget:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" init \
  --file "$CHECKPOINT" \
  --task "data-migration" \
  --objective "Migrate the user table without losing records" \
  --max-attempts 3 \
  --next-action "Inspect the current migration and test fixture"

Operating Protocol

1. Start one bounded attempt

Before making the change, persist the next action and enter running:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" transition \
  --file "$CHECKPOINT" \
  --to running

Use Claude Code-native tools for exactly the bounded action described by nextAction. Do not turn one attempt into an unbounded plan.

2. Enter verification

After the action, move to verification before deciding the outcome:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" transition \
  --file "$CHECKPOINT" \
  --to verifying

Run the relevant check yourself. The helper records a check name and outcome; it never runs that check for you:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" evidence \
  --file "$CHECKPOINT" \
  --check "npm test -- workspace migration" \
  --outcome passed \
  --artifact "artifacts/migration-test.txt"

Only cite an artifact that exists and is safe to share. A failed check can be recorded with --outcome failed; do not convert it to a passing record by rewriting the expected value.

3. Finish, retry, or escalate

If verification is genuinely passing:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" transition \
  --file "$CHECKPOINT" \
  --to succeeded

If the change needs another bounded attempt, provide a concrete next action and reason:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" transition \
  --file "$CHECKPOINT" \
  --to running \
  --next-action "Fix the null-row fixture and rerun the focused test" \
  --reason "Verification found a reproducible null-row failure"

Use failed for a terminal technical failure. Use blocked only when progress needs an external dependency or human decision:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" transition \
  --file "$CHECKPOINT" \
  --to blocked \
  --reason "Waiting for the database owner to approve the production window"
Show full SKILL.md (279 more words)Show less
4. Resume after interruption

Read the checkpoint before doing any work in a new session:

bash
node "$SKILL_DIR/scripts/checkpoint-loop.mjs" status \
  --file "$CHECKPOINT" \
  --format summary

For machine-readable recovery, omit --format summary. Continue from nextAction, inspect the history and evidence, and never repeat a completed attempt merely because the old conversation is unavailable.

Safety Rules

  • Use a positive, finite attempt budget. A loop without a ceiling is not a recoverable loop.
  • Never mark succeeded without passing verification evidence in the checkpoint.
  • Do not place secrets or full sensitive logs in the checkpoint; store only a safe check name and sanitized artifact path.
  • The helper does not run evidence commands. Execute checks with normal approval and tool policy, then record their observed result.
  • Destructive actions, external writes, payments, deployments, and permission changes still require the normal human approval boundary.
  • Treat a malformed or manually edited checkpoint as invalid and stop for review; do not guess its missing state.

Examples

Interrupted migration

An agent initializes data-migration with three attempts, enters running, updates the migration, and is interrupted before verification. The next session runs status, sees running and the saved nextAction, performs only that action, then records the actual test result before moving to succeeded or a bounded retry.

Attempt ceiling reached

An agent records a failed verification, transitions back to running with maxAttempts: 2, and fails the same focused check on the second attempt. A third transition into running is rejected with attempt budget exhausted; the agent must report the failure or escalate rather than silently looping forever.

Verification

The script has a local Node test suite covering legal transitions, terminal immutability, attempt limits, evidence rules, malformed input, atomic persistence, and rejected-operation preservation:

bash
node --test "$SKILL_DIR/scripts/checkpoint-loop.test.mjs"

The repository validator checks the frontmatter and directory/name contract:

bash
node scripts/validate-skills.js

© davepoon, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in plugins/all-skills/skills/checkpointed-agent-loop of davepoon/buildwithclaude.

  • SKILL.md
  • scripts/checkpoint-loop.mjs
  • scripts/checkpoint-loop.test.mjs

Open the folder on GitHubat commit 10bfc43

Compare with similar skills

Checkpointed Agent Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Checkpointed Agent Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Checkpointed Agent Loop this skilldavepoon/buildwithclaude3.6k—~1.7kAutomated safety check: PassMIT
Show Me Your Work Decision Logcursor/plugins10k9 repos~1.6kAutomated safety check: PassNone
Autoresearch Iteration Loopuditgoenka/autoresearch6.5k1 repos~2kAutomated safety check: PassMIT
PUA Looptanweai/pua20k1 repos~1.1kAutomated safety check: PassMIT
AutopilotYeachan-Heo/oh-my-claudecode40k1 repos~4.4kAutomated safety check: PassMIT
Install Loop Engineeringcobusgreyling/loop-engineering11k1 repos~648Automated safety check: PassMIT

Similar skills

  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    10k GitHub starsUsed in 9 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Autoresearch Iteration Loop

    uditgoenka/autoresearch

    Runs an autonomous modify, verify, keep-or-discard loop against any metric, with subcommands for planning, debugging, fixing, security audits, shipping and more.

    6.5k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed
  • PUA Loop

    tanweai/pua

    Runs an unattended iterate-until-verified loop in which a user-set verify command, not the agent's own claim, decides when the task is finished.

    20k GitHub starsUsed in 1 repo~1.1k tokens
    Agent WorkflowsAuto-check passed
  • Autopilot

    Yeachan-Heo/oh-my-claudecode

    Takes a short product idea through requirements, design, planning, parallel implementation, QA cycles and multi-reviewer validation to produce working code.

    40k GitHub starsUsed in 1 repo~4.4k tokens
    Agent WorkflowsAuto-check passed
  • Install Loop Engineering

    cobusgreyling/loop-engineering

    Installs Loop Engineering into a project through the single @cobusgreyling/loop CLI, scaffolding a report-only loop and a readiness score.

    11k GitHub starsUsed in 1 repo~648 tokens
    Agent WorkflowsAuto-check passed
  • Loopy

    Forward-Future/loopy

    Discover, find, compare, audit, repair, adapt, craft, run, debrief, save, and prepare repeatable AI-agent loops for publication.

    3.2k GitHub stars~3.9k tokensUpdated 27 days ago
    Agent WorkflowsAuto-check passed

More from davepoon/buildwithclaude

All 245 skills in this repo
  • Qwen Vision

    davepoon/buildwithclaude

    A skill your agent uses when the user asks to "analyze video", "watch this video", "what happens in this video", "describe this clip", "review this footage", "classify these videos", "compare…

    3.6k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Hard Predict Future

    davepoon/buildwithclaude

    Activate this agent for any future-oriented question that requires deep quantitative analysis, historical precedents, and structured scenario planning.

    3.6k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • iOS Hig Design Guide

    davepoon/buildwithclaude

    Build, update, and apply iOS design specifications using Apple Human Interface Guidelines (HIG) source data.

    3.6k GitHub stars~735 tokensUpdated 2 days ago
    Auto-check passed
  • Video Downloader

    davepoon/buildwithclaude

    Download YouTube videos with customizable quality and format options.

    3.6k GitHub starsUsed in 1 repo~871 tokens
    Auto-check passed
  • Atlas Cloud Media

    davepoon/buildwithclaude

    Discover Atlas Cloud image and video models, inspect their live schemas, and submit one confirmed media generation request with bounded GET polling.

    3.6k GitHub stars~852 tokensUpdated 2 days ago
    Auto-check passed
  • Slack Gif Creator

    davepoon/buildwithclaude

    Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives.

    3.6k GitHub starsUsed in 12 repos~4.3k tokens
    Auto-check passed

Categories

Questions about Checkpointed Agent Loop

What does Checkpointed Agent Loop do?

Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint. Checkpointed Agent Loop is an agent skill from davepoon/buildwithclaude. Run long or failure-prone Claude Code tasks as bounded, resumable loops with a durable state machine, attempt budget, and verification evidence checkpoint.

When should I use Checkpointed Agent Loop?

Checkpointed Agent Loop fits situations like: tasks that involve Autonomous loops.

How do I install Checkpointed Agent Loop in Claude Code?

Run `npx skills add davepoon/buildwithclaude --skill checkpointed-agent-loop -a claude-code`. Or copy the skill folder (plugins/all-skills/skills/checkpointed-agent-loop in davepoon/buildwithclaude) into .claude/skills/checkpointed-agent-loop in your project. Claude Code loads it when a task matches its description.

How do I install Checkpointed Agent Loop in Codex?

Run `npx skills add davepoon/buildwithclaude --skill checkpointed-agent-loop -a codex`. Or copy the skill folder (plugins/all-skills/skills/checkpointed-agent-loop in davepoon/buildwithclaude) into .agents/skills/checkpointed-agent-loop in your project. Codex loads it when a task matches its description.

Can I use Checkpointed Agent Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davepoon/buildwithclaude --skill checkpointed-agent-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/checkpointed-agent-loop, .gemini/skills/checkpointed-agent-loop, .github/skills/checkpointed-agent-loop and .opencode/skills/checkpointed-agent-loop in your project.

What does Checkpointed Agent Loop need to run?

Going by SKILL.md and its folder, Checkpointed Agent Loop needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.

Does Checkpointed Agent Loop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Checkpointed Agent Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Checkpointed Agent Loop use?

Checkpointed Agent Loop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Checkpointed Agent Loop use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Checkpointed Agent Loop?

Skills that share tags, products or a category with Checkpointed Agent Loop: Show Me Your Work Decision Log (cursor/plugins, 10k stars), Autoresearch Iteration Loop (uditgoenka/autoresearch, 6.5k stars), PUA Loop (tanweai/pua, 20k stars) and Autopilot (Yeachan-Heo/oh-my-claudecode, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Checkpointed Agent Loop?

davepoon (a GitHub user) maintains it in davepoon/buildwithclaude, which has 3,604 GitHub stars. The repository holds 245 skills in this directory. The repository was last updated on October 6, 2026.

Source: davepoon/buildwithclaude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.