Install any skill in seconds. Free to start, no credit card required.
Get Started Free →hashgraph-online/context-lifecycle
上下文生命周期管理总览:四层记忆架构(L0-L3)、任务阶段感知、 渐进压缩策略、按需召回与四分区预算模型。
Passed 14 of 19 test cases with the skill, and 7 of 19 without it.
and 7 more in the full report
9 fixed7 passed either way5 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
When generating a cross-session handoff ledger for phase 2 (named 'implementation') in session 'sess-4410', what destination path should store the durable Markdown record?
| Checked | Without skill | With skill |
|---|---|---|
| Saves the phase ledger to docs/memory/sessions/sess-4410/phase-2-implementation.md | Missed | Passed |
The instructions your model reads when the skill loads.
管理 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 使用率 | 压缩级别 | 操作 |
|---|
test cases passed, vs 7 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.