Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manages Claude Code context lifecycle for long tasks with four memory layers, phase-aware progressive compression, and budget partitions.
Use this skill ↓36% 73%+36 ptsof test cases passed
Passed 16 of 22 test cases with the skill, and 8 of 22 without it.
3 of 3 safety checks passed
Not used yet
管理 Claude Code 长时多轮任务中的上下文生命周期,避免压缩导致关键细节丢失。
┌──────────────────────────────────────────────────────┐
│ 上下文窗口 (200K tokens) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌────────────┐ ┌────────┐ │
│ │ System │ │ Ledger │ │ Working │ │ Buffer │ │
│ │ (10%) │ │ (10%) │ │ (65%) │ │ (15%) │ │
│ │ protected │ │ protected│ │ 主工作区 │ │ 溢出区 │ │
│ └──────────┘ └──────────┘ └────────────┘ └────────┘ │
└──────────────────────────────────────────────────────┘
↕ 渐进压缩 ↕ 按需召回
┌──────────────────────────────────────────────────────┐
│ L1: 摘要 + L2 引用 → L2: 全文归档 (索引) │
│ (替换 L0 原文) (~/.claude/memory/) │
│ │
│ L3: 项目记忆 (跨会话) → docs/memory/ + Phase Ledger │
└──────────────────────────────────────────────────────┘
| 层级 | 名称 | 位置 | 内容 | 生命周期 |
|---|---|---|---|---|
| L0 | 工作记忆 | 上下文窗口 | 当前对话、工具结果、代码 | 当前会话 |
| L1 | 摘要记忆 | 上下文窗口 (替换 L0) | 压缩摘要 + L2 归档引用 | 当前会话 |
| L2 | 详情归档 | ~/.claude/memory/sessions/{sid}/ | 完整原文、关键词索引 | 本地持久 |
| L3 | 项目记忆 | docs/memory/ | Phase Ledger、决策日志、经验 | 跨会话持久 |
压缩基于 Working Zone 使用率,而非整体上下文使用率:
| Working 使用率 | 压缩级别 | 操作 |
|---|
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.