/subagent-system:checkpoint-writerfrom subagent-system
Saves pipeline phase state to disk and creates a recovery commit. Useful for checkpointing progress and enabling resume after interruption.
Ships in subagent-system. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
After a phase completes, execute these steps in order:
Step 0 — Locate project root and record chain start commit (first phase only).
Bash("git rev-parse --show-toplevel 2>/dev/null || pwd") # → PROJECT_ROOT
If result is NOT a git repo (git rev-parse fails, falls back to pwd): note "No git repo detected — skipping chain-start-commit and git commit steps. Checkpoint file will be written to .claude/checkpoints/ but not committed."
If git repo found:
Bash("mkdir -p $(git rev-parse --show-toplevel)/.claude/checkpoints")
If Phase 1, record start commit — only if file does not already exist (guard against overwrite on restart):
Bash("ROOT=$(git rev-parse --show-toplevel); CSC=\"$ROOT/.claude/checkpoints/chain-start-commit\"; [ -f \"$CSC\" ] || git rev-parse HEAD > \"$CSC\"")
This file is the anchor for chain-verifier. Skip for phases 2+.
Why guard with [ -f ]: If the pipeline is interrupted and restarted from Phase 1 after new commits exist, overwriting chain-start-commit would lose the original revert anchor. The guard ensures the anchor always points to the true pipeline start.
Step 1 — Write the checkpoint file.
Use the Write tool directly — do NOT use Bash heredoc (heredoc newline escaping is unreliable on Windows Git Bash and can produce a single-line or malformed file):
# Get timestamp and path first:
Bash("date -u +%Y%m%dT%H%M%S") # → TIMESTAMP
Bash("git rev-parse --show-toplevel") # → ROOT
# Then use Write tool:
Write("[ROOT]/.claude/checkpoints/phase-[N]-[TIMESTAMP].md", [content below])
Write .claude/checkpoints/phase-[N]-[timestamp].md with the following content:
# Checkpoint: Phase [N]
## Phase description
[One-sentence summary of what this phase accomplished]
## Status
COMPLETE
## Files modified
- [file path]: [one-line description of change]
- [file path]: [one-line description of change]
## Key decisions
- [Decision]: [one-sentence rationale]
## Prerequisites for next phase
- [What Phase N+1 needs to know or have available]
## Checkpoint commit
Checkpoint commit: [git commit hash written by Step 2, or SKIPPED if non-git]
## Timestamp
[ISO 8601 timestamp]
Step 2 — Create a git commit.
Add only the specific files listed in "Files modified" above — never use git add -A or git add .:
Bash("git add [file1] [file2] ...") # list each file explicitly from the Files modified section
Bash("git status --short") # preview what will be committed — verify no unexpected files
Bash("git commit -m 'checkpoint: phase N complete — [description]'")
Bash("git rev-parse HEAD") # → COMMIT_HASH
Keep the commit message under 72 characters. If git status shows unexpected files, do NOT proceed — report them and let the main agent decide.
Step 2.5 — Backfill commit hash into checkpoint file. Replace the placeholder with the real hash using Edit:
Edit("[ROOT]/.claude/checkpoints/phase-[N]-[TIMESTAMP].md",
old: "Checkpoint commit: [git commit hash written by Step 2, or SKIPPED if non-git]",
new: "Checkpoint commit: [COMMIT_HASH]")
Step 3 — Report.
CHECKPOINT_WRITTEN:
File: .claude/checkpoints/phase-N-[timestamp].md
Git commit: [hash from commit output]
Next phase can resume from: [one sentence describing the current state]
If the git commit fails (e.g., nothing to commit), report the checkpoint file path and note "No changes to commit — working tree clean."
If not in a git repo: skip Step 2 entirely. Report:
CHECKPOINT_WRITTEN:
File: [path]
Git commit: SKIPPED (not a git repository)
Next phase can resume from: [description]
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
21 skills in this plugin
/apply-improvementsThis skill should be used when the user asks to apply improvement proposals ('apply improvements', 'ap dung improvement proposals') from .claude/improvement-proposals.md (written by pipeline-retrospective) to the plugin files./audit-outputThis skill should be used after a pipeline run completes, when the user asks to audit the pipeline output ('audit output', 'audit the run', '4-level audit'). Requires the project's test command as argument - without it Level 4 regression tests are skipped and the report is marked incomplete./chain-verifierThis skill should be used at the final step of any multi-phase pipeline to verify the complete working-tree state satisfies the original requirements. Trigger after all fix agents and pipeline-reviewer have completed. Also invoke when user asks to "run chain-verifier", "verify the pipeline output", or "confirm requirements are met"./completion-checkerThis skill should be used after receiving output from a subagent that was assigned an explicit numbered task list and is expected to have produced a COMPLETION_CHECKLIST block. Do not invoke if the subagent was not given a task list — there will be no checklist to parse. Uses grep counts, not LLM estimation, to detect premature termination. Also trigger when user asks to "verify completion checklist", "check if agent finished all tasks", or "detect premature termination"./consolidate-findingsThis skill should be used when the user asks to "merge findings", "consolidate audit results", "combine security findings", or after all parallel audit agents complete and before running finding-validator or severity-gate. Produces FINDINGS_REPORT.md sorted CRITICAL→HIGH→MEDIUM→LOW with duplicates removed./context-packagerThis skill should be used before spawning a dependent agent when the previous phase produced interface changes, breaking changes, new constraints, or key file modifications the next agent must not violate. Extracts only the minimum necessary context — not the full prior output. Uses character count to decide INJECT (≤4,000 chars) vs USE_FORK (>4,000 chars). Also trigger when user asks to "package context for next phase", "prepare agent handoff", or "extract phase context".npx claudepluginhub minhthang1009/dotclaude --plugin subagent-systemOther plugins' skills for the same job