compress-session
保留决策和下一步,便于会话跨次续接。
会写入会话日志,可能记录敏感信息,注意隐私。
把当前对话蒸馏成结构化笔记并保存为会话日志。
把当前对话蒸馏成结构化会话笔记:记录已定的决定、未解的问题、相关文件与行号,以及接下来的 1–3 个可执行动作,并存为会话日志。适合在上下文接近自动压缩(auto-compaction)或需要交接时使用,确保重要决策不会被截断丢失。区别于简单截断,它保留语义而不是仅保留最近几条消息。
▸ 展开 SKILL.md 英文原文
Distill the current conversation into a structured note (decisions made, open questions, file pointers with line numbers, next 1–3 actions) and save to `quality_reports/session_logs/` before auto-compression. Differs from `/checkpoint` (explicit stop-point snapshot) and from auto-compaction (which truncates rather than distills). Use when context is approaching auto-compact threshold, when a long pipeline has accumulated many decisions, or when the user says "compress", "distil this session", "before we hit auto-compact", "structured handoff before context resets".
帮我安装这个 skill:https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/compress-session/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/compress-session/SKILL.md"# `/compress-session` — distil, don't truncate Auto-compaction is **lossy**: it keeps recent turns and drops earlier ones, with no preservation of *what was decided* mid-session. `/compress-session` is the **distil-not-truncate** alternative — produce a structured note that the next session can resume from in under a minute. ## Why this skill exists Drew Breunig's ["How Long Contexts Fail"](https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html) identifies four failure modes for long-context sessions: 1. **Poisoning** — early hallucinated content gets quoted by later turns, compounding the error. 2. **Distraction** — irrelevant earlier context dilutes the model's