Context Guardian

Never lose progress in long AI sessions. Snapshots your task state so a new session picks up exactly where you left off.

Install
cmdop skills install agensi-context-guardian

Context Guardian is a skill that addresses context loss in long AI-assisted development sessions. When a conversation approaches its context limit, agents begin forgetting requirements, repeating mistakes, and losing track of architectural decisions that were established earlier. Context Guardian automates the transition between sessions by creating a structured checkpoint file at the point when it is triggered.

The checkpoint captures the current task and its completion state, architectural decisions that have been made, user preferences discovered during the session, files that have been modified, approaches that have already failed, and a clear statement of what to do next. This means a new session does not need to re-derive any of that information from scratch.

The skill is designed to work across different environments. In Claude Code, starting a new session in the same directory is sufficient. In Cowork, opening a new task and issuing a continue instruction loads the checkpoint. In a standard chat interface, the generated context block can be pasted directly. The checkpoint format is consistent regardless of platform.

Context Guardian is particularly suited to multi-session refactors that stretch across days and to complex debugging investigations that accumulate significant understanding over time. It is not a database, a version control system, or a code analysis tool — it records session-level task state rather than code structure or history. No environment variables or additional configuration are listed in the available facts.

Use cases

  • Preserve architectural decisions and task state when a long refactoring session nears its context limit
  • Resume a multi-day codebase restructuring in a new session without manually re-explaining prior decisions
  • Hand off a complex debugging investigation to a new session with a full record of approaches already tried
  • Continue an AI-assisted task in Claude Code by starting a new session in the same directory
  • Carry session context across platforms by pasting the generated checkpoint block into a regular chat interface

When to use it

  • When a single AI session is too long to complete a task and a clean handoff to a new session is needed
  • When working on multi-day development tasks that span many sessions
  • When repeated context loss is causing an agent to re-discover already-known information
  • When working in Claude Code, Cowork, or a standard chat interface and needing continuity between sessions

When not to use it

  • When the task fits within a single session and no context handoff is needed
  • When looking for version control, code history, or diff-based change tracking
  • When the goal is code analysis or static inspection rather than session state preservation
  • When a fully automated background process is needed — the skill must be explicitly triggered