/kernel:context-mgmtfrom kernel
Manages context window via compaction, progressive disclosure, and structured notes. Useful when approaching ~60% context capacity or during handoffs.
Ships in kernel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reasoning fidelity is the real metric, not token count. Quality degrades at ~60-70% fill, not at the limit.
Monitor context usage. Compact or hand off proactively at ~60% capacity — not 80%, not at limit. Use native /context command to check usage. This skill is for methodology. Skill-specific: skills/context-mgmt/reference/context-mgmt-research.md Architecture: _meta/research/context-graph-architecture.md Graph telemetry (shadow): JSON receipts → `agentdb graph-project` / `graph-suggest` (see orchestration/agentdb/graph-project.py). Canonical JSON manifests remain authoritative.<core_principles>
context-management-2025-06-27 beta over hand-rolled truncation: clear_tool_uses_20250919 clears old tool results past a token trigger (client keeps full history, no sync needed), clear_thinking_20251015 clears old thinking blocks while preserving cache hits. Client-side SDK compaction (compaction_control, TypeScript/Ruby) is deprecated; use server-side compact_20260112 for summarization, which takes its own beta header compact-2026-01-12, not context-management-2025-06-27: trigger is input_tokens only (default 150000, minimum 50000), and custom instructions replace the default summarization prompt entirely, so restate the full framing (what to keep: goal, decisions, paths, errors) rather than appending. pause_after_compaction: true returns stop_reason: "compaction" with only the compaction block, so you can re-append recent messages or key instructions, then resend without the flag to continue. Ordering: clear_thinking_20251015 must precede clear_tool_uses_20250919 in edits. Set exclude_tools for results that must survive; clearing tool results invalidates the cached prefix, so set clear_at_least so each clear pays for itself. Pair with the memory_20250818 tool: Claude is warned as the threshold nears and saves state to memory files before results clear. clear_tool_inputs (default false) also drops call parameters. clear_thinking_20251015 with no keep defaults to thinking_turns: 1 on every model, even ones whose omitted-strategy default keeps all thinking (so including the edit silently drops older thinking and invalidates the cache there); set keep explicitly ({type:"thinking_turns",value:N} or "all"). clear_tool_uses_20250919 defaults: trigger 100,000 input_tokens, keep 3 tool uses; if clear_at_least cannot be met the edit is not applied. On Fable 5.1/Opus 5.5/Sonnet 5.5/Haiku 5.5, server-side edits never invalidate thinking blocks, but hand-editing earlier turns client-side can; for accounts created on/after 2026-08-31 a replayed invalidated block is rejected unless you opt into dropping it. Verify clearing fired from context_management.applied_edits in the response (cleared_tool_uses / cleared_thinking_turns and cleared_input_tokens; in streaming, the final message_delta). Preview savings by passing context_management to count_tokens: it returns original_input_tokens beside the post-clearing input_tokens.
</core_principles><token_budget>
<compaction_protocol>
agentdb write-end '{"did":"X","next":"Y","blocked":"Z"}'/kernel:handoffagentdb read-start for failures, patterns, contracts.
c. Check for pending checkpoints to review.
</compaction_protocol><fidelity_signals> Watch for reasoning degradation BEFORE the token meter shows a problem:
Any one of these → compact or hand off NOW, even if /context shows <60% fill. </fidelity_signals>
<what_to_preserve> Never compact away:
<what_to_compact> Aggressively compress:
<failure_modes>
What SKILL.md sets; muted values are Claude Code's defaults
28 skills in this plugin
/app-devMobile/web build pipeline: fastlane-first local builds, store submission, pre-submission checklists. Triggers: app, mobile, store submission, deploy app, fastlane, expo, react native, flutter./architectureModular design, interface stability, dependency management, AI-code health. Triggers: architecture, design, structure, modules, dependencies, coupling, system design./buildPlan and implement a requested code feature when the solution requires choosing among implementation approaches./checkpointSave bounded progress as kernel.checkpoint/v1 for exact resume after reset. Triggers: checkpoint, save progress, context reset, compact soon, long task.npx claudepluginhub ariaxhan/kernel-claude --plugin kernelOther plugins' skills for the same job