Preserve the thread where your agent finally got it.
A portable agent skill that captures what your AI assistant understood — goals, decisions, constraints, and next steps — into a single AGENT_CONTEXT.md file, so a fresh session can pick up exactly where you left off.
Install · How it works · Usage · What gets written · Security
Ever had a thread where your agent simply got it? You felt it finally understood what you really wanted to achieve — and then you started to dread the moment compaction inevitably kicks in and destroys it for good.
context-checkpoint is a skill that preserves the agent's reusable working state: what it understood, what decisions were made, what constraints matter, and how a fresh session should continue.
When you ask for a checkpoint, the skill writes or updates AGENT_CONTEXT.md with all the durable context a fresh agent needs to continue the work. Each checkpoint includes:
- goals, constraints, decisions, and rationale
- evidence, command results, files touched, and implementation state
- risks, rejected approaches, next steps, and a resume prompt
The resume prompt lives at the bottom of AGENT_CONTEXT.md under ## Resume Prompt. Use it when starting a new thread: paste that prompt into the fresh session, or ask the agent to read AGENT_CONTEXT.md directly. The prompt is intentionally short because the detailed handoff already lives in the file.
If an agent instruction file already exists, the skill also updates it with a short reminder to read AGENT_CONTEXT.md before starting work. Common files include AGENTS.md, AGENT.md, CLAUDE.md, CODEX.md, .cursorrules, and .cursor/rules/*. It does not create those instruction files unless you explicitly ask.
Note
The skill does not preserve hidden chain-of-thought or private reasoning, secrets or sensitive data, irrelevant chat history, or guarantee that future agents behave identically.
Install with the Skills CLI:
npx --yes skills add jdmnk/context-checkpoint-skillBy default, the Skills CLI installs project-local skills and prompts for any agent choices it cannot infer.
To make the skill available across all projects, install it globally:
npx --yes skills add jdmnk/context-checkpoint-skill --globalFor a non-interactive install, add the target agent and --yes:
npx --yes skills add jdmnk/context-checkpoint-skill --global --agent <agent> --yesExamples of supported agent names include claude-code, codex, cursor, and
opencode.
Tip
This skill is on-demand only — it won't fire automatically just because a session is long.
Ask the agent when you want a checkpoint:
Use the context-checkpoint skill.
Or call it directly with $context-checkpoint or /context-checkpoint (or whatever your preferred agent supports).
The skill reads the session, pulls out what matters, and writes the file. When you checkpoint before compaction or handoff, a fresh agent can read and act on that context immediately.
Each checkpoint starts with a UTC timestamp so you know how fresh it is, then covers:
| Section | What it holds |
|---|---|
| Current Objective | What's being worked on right now |
| User Preferences & Constraints | Explicit instructions, style preferences, non-goals |
| Project / Environment Facts | Repo, runtime, relevant commands, verified assumptions |
| Implementation State | Files, functions, APIs, and configs already touched |
| Key Decisions | Decisions made, with rationale |
| Evidence & Results | Commands run, outputs that matter |
| Known Issues / Risks | Bugs, blockers, open questions |
| Rejected Approaches | What was tried and why it was dropped |
| Next Steps | Ordered, actionable steps for a fresh session |
| Resume Prompt | A short prompt at the bottom for starting a new session |
See examples/AGENT_CONTEXT.example.md for a full sample.
The skill includes instructions not to persist secrets, credentials, API keys, private tokens, customer data, or sensitive personal data. Still, you should review generated checkpoints yourself.
Before committing or sharing AGENT_CONTEXT.md, review it for sensitive data:
+ API client expects OPENAI_API_KEY in the environment.
- OPENAI_API_KEY=sk-...Store descriptions instead of values. See SECURITY.md for the full guidance.