session-summary

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Session Summary

Session Summary

每次 session 结束时自动生成结构化中文总结,持久化保存到项目目录。
Automatically generate a structured Chinese summary at the end of each session, and persist it to the project directory.

触发方式

Trigger Method

通过
SessionEnd
hook 自动触发,无需手动调用。
安装后需要将 hooks 配置合并到
~/.claude/settings.json
,详见
references/setup.md
实现说明: 由于
SessionEnd
agent
类型 hook 存在静默失败 bug(anthropics/claude-code#40010), 改用
command
hook 调用
scripts/summarize.sh
,脚本内部通过
claude -p
异步完成总结。
Automatically triggered via the
SessionEnd
hook, no manual call required.
After installation, you need to merge the hooks configuration into
~/.claude/settings.json
, see
references/setup.md
for details.
Implementation Note: Since the
agent
type hook of
SessionEnd
has a silent failure bug (anthropics/claude-code#40010), switch to the
command
hook to call
scripts/summarize.sh
, and the script asynchronously completes the summary via
claude -p
internally.

去重机制

Deduplication Mechanism

  • 同一 session 只生成一次(
    once: true
  • 文件名包含 session_id 前 8 位,重复触发时覆写而非新建
  • 对话轮数少于 3 轮自动跳过
  • Only generated once for the same session (
    once: true
    )
  • The file name contains the first 8 characters of session_id, and it will be overwritten instead of creating a new one when triggered repeatedly
  • Automatically skipped if the number of conversation rounds is less than 3

总结格式

Summary Format

参考
templates/summary.md.template
,输出 5 个字段:
  1. 核心目标 — 本次 session 想解决什么
  2. 完成内容 — 实际做了什么,产物在哪里
  3. 关键决策 — 做了哪些值得记录的判断
  4. 待续事项 — 下次需要接着做的事
  5. 使用的 skill — 调用了哪些 skill
Refer to
templates/summary.md.template
, output 5 fields:
  1. Core Goal — What problem this session intends to solve
  2. Completed Content — What was actually done, where the outputs are located
  3. Key Decisions — What judgments worth recording have been made
  4. Pending Items — Tasks that need to be continued next time
  5. Skills Used — Which skills were called

手动触发

Manual Trigger

在对话中说"生成本次会话总结"即可手动触发,输出路径同自动触发。
Say "Generate a summary of this session" in the conversation to trigger manually, the output path is the same as that of automatic trigger.

Position in ark-skills

Position in ark-skills

  • 公开角色:会话记录与上下文持久化
  • 工作目录:
    <project_root>/.claude/summaries/
  • 推荐搭配:
    • 配合
      wechat-pipeline
      使用,记录每条产线的执行状态
    • 配合
      ai-workflow-brand
      使用,记录每次定位决策
  • Public role: Conversation recording and context persistence
  • Working directory:
    <project_root>/.claude/summaries/
  • Recommended collocations:
    • Use with
      wechat-pipeline
      to record the execution status of each production line
    • Use with
      ai-workflow-brand
      to record each positioning decision