By ryannle1
Context Lifecycle Protocol — Zone-based context management with budget tracking, structured handoffs, and demand-loaded skills for Claude Code.
Save a structured checkpoint of the current working state. This skill should be used before compacting, before switching tasks, at natural breakpoints, or to preserve decisions and progress. It enriches the handoff manifest with the actual understanding of the session state.
Diagnose and validate the CLP installation. Checks directory structure, configuration files, hook wiring, skill registry, and context optimization. This skill should be used when something seems wrong, after initial setup, or to audit the installation.
Generate or restore a session handoff. This skill should be used when starting a new session, transferring work to another developer, resuming after compaction, or preparing to hand off work. Supports both creating handoffs and loading existing ones.
Plan a task with context budget awareness. Breaks work into context-sized chunks, estimates token cost per phase, and suggests when to checkpoint or use subagents. This skill should be used before starting any non-trivial task, when the user asks to "plan this", "estimate tokens", or "break this into phases".
Reset CLP state for a fresh start. Clears handoffs, session memory, and optionally the skill registry. This skill should be used when starting a completely new task unrelated to previous work, or when handoff state has become stale or corrupted.
Matches all tools
Hooks run on every tool call, not just specific ones
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Zone-based context management for Claude Code.
CLP treats your 200K token context window as a managed resource — partitioned into zones with budget tracking, demand-loaded skills, and structured session handoffs.
| Before CLP | With CLP | |
|---|---|---|
| Baseline tokens | 60-70K at startup | <15K (kernel zone only) |
| After compaction | Vague summary, lost details | Structured JSON manifest, full state |
| New session | Re-explain everything | Auto-restore, continue immediately |
| Token visibility | Guess | Real-time zone budget in StatusLine |
| Doc loading | Everything always | Demand-loaded on trigger match |
As a Claude Code plugin (recommended):
/plugin marketplace add ryannle1/clp
/plugin install clp@clp-marketplace
/clp:setup
| Command | What it does |
|---|---|
/clp:setup | Auto-detect project, initialize CLP config |
/clp:status | Zone budget breakdown + recommendations |
/clp:plan [task] | Plan work in context-sized chunks |
/clp:checkpoint | Save structured state (decisions, tasks, context) |
/clp:handoff | Create or restore session handoff |
/clp:doctor | 21-check installation diagnostic |
/clp:reset | Clean reset (soft / hard / factory) |
Four zones with different eviction policies:
Lifecycle state machine: INIT → ACTIVE → COMPACT → HANDOFF → RESUME → ACTIVE
XML-structured prompts: All skills use XML tags as cognitive containers. 92% compaction fidelity vs 71% for prose.
Skill registry: Trigger-keyword matching loads only the docs your current task needs.
/clp:doctor # Inside Claude Code
bash tests/run-tests.sh # Standalone
Claude Code (any version with hooks), jq, bash 4+
MIT
npx claudepluginhub ryannle1/clp --plugin clpContext management with save and restore capabilities
Governor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.
Claudikins Automatic Context Manager - seamless context handoff for Claude Code
Opus 4.8-aware context optimization: silent-by-default hooks, honest NET token savings, big-file map-then-load, Context Control Center, per-task tracking, prompt coach
Finish What You Start - Sessions that last, AI that learns, Features that ship. Context engineering + Theory of Mind + Knowledge Graph + Loop Mode + Task Mode. Features Project Knowledge Graph (unified search, experiential memory), unified workflow orchestration, auto-update on session start, ToM-based verification checkpoints, bilateral modeling, quality detection, enhanced context markers, and Loop Mode. 92% token reduction with proven strategies. Based on Riedl & Weidmann 2025 Human-AI Synergy research.
Agentic workflow mechanics: CLAUDE.md instruction quality and structured context handoff