# Pod Checkpoint

Write a structured recovery snapshot to lifecycle/checkpoint.md before context reset, ...

- Repository: https://github.com/Snowflake-Labs/cocoplus (727 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-10-04
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Snowflake-Labs/cocoplus --skill pod-checkpoint -g -a claude-code -y`
Codex: `npx skills add Snowflake-Labs/cocoplus --skill pod-checkpoint -g -a codex -y`
Cursor: `npx skills add Snowflake-Labs/cocoplus --skill pod-checkpoint -g -a cursor -y`
Gemini CLI: `npx skills add Snowflake-Labs/cocoplus --skill pod-checkpoint -g -a gemini-cli -y`

## Description

Write a structured recovery snapshot to lifecycle/checkpoint.md before context reset, captures phase, stage, decisions, and pending items so $pod resume can restore precise context

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# $pod checkpoint

Write a structured recovery snapshot to `.cocoplus/lifecycle/checkpoint.md`. Use this before `$clear` to ensure `$pod resume` can restore your exact position.

## Preconditions

- `.cocoplus/` directory must exist (run `$pod init` first)
- No arguments accepted

## Step-by-Step Behavior

1. **Verify initialization:** Check `.cocoplus/` exists. If not, output: "CocoPlus not initialized. Run `$pod init` first." and exit.

2. **Read current lifecycle phase:** Read `.cocoplus/lifecycle/meta.json`. Extract: current phase, phase ID, completion timestamps.

3. **Read in-progress flow stage:** Read `.cocoplus/flow.json`. Find the stage with `status: "running"` or the next `status: "pending"` stage. Extract: stage ID, stage name, checkpoint validation status.

4. **Read last 5 decisions:** Read `.cocoplus/memory/decisions.md`. Extract the 5 most recent entries (newest first), capture ID, brief description, date.

5. **Read open must-fix items:** Read `.cocoplus/lifecycle/review.md` if it exists. Extract any must-fix findings that have not been resolved.

6. **Read active HITL stages:** Read `.cocoplus/flow.json`. Find all stages with `"hitl": true` and `status: "pending"` awaiting developer approval.

7. **Read triggered seeds:** Scan `.cocoplus/seeds/*.yaml` for entries with `status: triggered`.

8. **Read CocoHarvest status:** Read `.cocoplus/harvest/` directory for any `*-tasks.json` files with in-progress stages. Extract harvest ID and agent summary.

9. **Assess context utilization:** Read `.cocoplus/meter/current-session.json` if it exists. Approximate utilization from token accumulation. If context utilization data is unavailable, omit this field gracefully.

10. **Write checkpoint file:** Write all gathered state to `.cocoplus/lifecycle/checkpoint.md` (overwrite if it exists):

```markdown
---
checkpoint_date: [ISO8601]
lifecycle_phase: [phase name]
phase_id: [phase-id or null]
context_utilization: [percentage or "unavailable"]
---

The rest: https://github.com/Snowflake-Labs/cocoplus/blob/HEAD/.cortex/skills/cocopod/pod-checkpoint/SKILL.md
