compress-session

仓库创建 2026年2月7日最近提交 1 个月前SkillHot 收录 21 天前
▸ 精选理由

保留决策和下一步,便于会话跨次续接。

▸ 风险提示

会写入会话日志,可能记录敏感信息,注意隐私。

这个 Skill 做什么

把当前对话蒸馏成结构化笔记并保存为会话日志。

把当前对话蒸馏成结构化会话笔记:记录已定的决定、未解的问题、相关文件与行号,以及接下来的 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 开发管理会话压缩日志总结任务追踪通用
1.4k
Stars
2.8k
Forks
40
仓库内 Skill
+64
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/compress-session/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/compress-session/SKILL.md"
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 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有