LaunchKit · 2026
Back to Skills

context-management

Manage AI agent context window consumption, prevent compaction death spirals, and enforce sub-agent spawn policies.

0
558 downloads
by @marcus-daemon

Setup & Installation

openclaw skills install @marcus-daemon/context-management

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install context-management

What This Skill Does

Monitors AI agent context window consumption and enforces policies for sub-agent spawning, compaction preparation, and post-compaction recovery. Tracks usage thresholds, estimates remaining runway, and profiles session patterns to recommend config adjustments.

Unlike general memory tools, this skill targets context window mechanics specifically — spawn thresholds, compaction checkpoints, and config tuning — preventing the silent quality degradation that happens before hard limits are hit.

When to use it

  • Checking how much context runway remains mid-session
  • Deciding whether to spawn a sub-agent for a tool-heavy task
  • Writing a structured checkpoint before triggering compaction
  • Recovering working state after compaction or starting a new session
  • Tuning context compression and pruning settings based on work style

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: What's eating my context and how much runway do I have?

AGENT
  1. 1Run session_status to get current window size and usage percentage
  2. 2Estimate breakdown across baseline, messages, tool call results, and compaction summaries
  3. 3Classify session pattern as tool-heavy, conversational, mixed, or bursty
  4. 4Report usage as a range with threshold-based recommendations
OUTPUT

Context usage breakdown with runway estimate and a recommendation to spawn sub-agents or compact based on current percentage