summarize-sessions

summarize-sessions is a skill for Claude Code from daisyyang1109-super/mirror-viewer. It costs 85 tokens per session (772 once invoked), scanned A, original, MIT.

A session-summary tool that uses DeepSeek, an AI model, to create a one-sentence summary and three to five tags for Claude Code sessions. It saves the results for a mirror viewer to display.

In plain words
What is it for?
Use it to summarize all sessions, rerun summaries, process one session by ID, and regenerate the mirror viewer output.
Why use it?
It removes the need to reread complete sessions to find what was discussed and decided. By default, it processes only sessions without existing summaries.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to summarize all sessions, rerun summaries, process one session by ID, and regenerate the mirror viewer output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/daisyyang1109-super/mirror-viewer/summarize-sessions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add daisyyang1109-super/mirror-viewer --skill summarize-sessions
Clone the repo
git clone --depth 1 https://github.com/daisyyang1109-super/mirror-viewer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for summarize-sessions

README.md
[![agentmods](https://agentmods.dev/badge/skills/daisyyang1109-super/mirror-viewer/summarize-sessions/github.svg)](https://agentmods.dev/skills/daisyyang1109-super/mirror-viewer/summarize-sessions)
Your own site
<a href="https://agentmods.dev/skills/daisyyang1109-super/mirror-viewer/summarize-sessions"><img src="https://agentmods.dev/badge/skills/daisyyang1109-super/mirror-viewer/summarize-sessions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for summarize-sessions

Your own site · 80×15
<a href="https://agentmods.dev/skills/daisyyang1109-super/mirror-viewer/summarize-sessions"><img src="https://agentmods.dev/badge/skills/daisyyang1109-super/mirror-viewer/summarize-sessions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 772 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.00772
Opus 5.5 $0.00034 $0.00309
Sonnet 5.5 $0.00017 $0.00154
Haiku 4.5 $0.00009 $0.00077

Measured 1mo ago against content hash 0a5230e8a0ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

summarize-sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (detail-summary.py, summarize.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/summarize-sessions/SKILL.md · 67 lines

What it actually says

Summarize-Sessions — 给所有 session 加摘要 + 标签

跑 DeepSeek 读完整 session,输出:

  • summary: 一句话(<= 50 字)说明 session 讨论了什么、落到什么结论
  • tags: 3-5 个关键词标签(短词)

结果累积到 /tmp/mirror/summaries.json,mirror viewer index 表自动读取展示。

触发后的动作

1. 解析参数

  • $ARGUMENTS = --all → 全量重跑(包括已有摘要的)
  • $ARGUMENTS 空 → 增量(只跑还没摘要的)
  • $ARGUMENTS = --sid <session-id> → 只跑指定 session

2. 跑主脚本

直接执行:

python3 ~/.claude/skills/summarize-sessions/summarize.py $ARGUMENTS

主脚本自给自足:

  • 自动找 DeepSeek key(env DEEPSEEK_API_KEY → ~/.deepseek)
  • 读 ~/.claude/mirror/search-index.json 拿每个 session 的 msgs
  • 读 ~/.claude/mirror/summaries.json 看已有(增量模式跳过)
  • 对每个待处理 session 调 DeepSeek API,提取 summary + tags
  • 累积写回 /tmp/mirror/summaries.json
  • 跑完触发 python3 /tmp/jsonl2html.py --all /tmp/mirror 重新渲染

3. 报告进度

跑完后给 Daisy 报:

  • 处理了 N 个 session
  • 跳过 M 个(已有摘要)
  • 失败 K 个(列 sid)
  • 总耗时 / 估计花费

4. 一致性约束

  • 绝不在新文件里写 key(memory feedback_warn_before_pasting_secrets.md)
  • 失败的 session 不阻塞已成功的(每条独立写盘)
  • LLM 输出必须是合法 JSON,不合法重试 1 次后放弃
  • 增量是默认,Daisy 不主动说 --all 就别全量重跑(浪费 token)

成本预算

  • 一次 backfill 28 个 session ≈ ¥0.4
  • 单 session 增量 ≈ ¥0.015
  • 一年 1000 session ≈ ¥15

失败 fallback

  • DeepSeek API 挂了:报错,不污染已有 summaries
  • key 找不到:报错让 Daisy 手动 export DEEPSEEK_API_KEY=xxx 再跑
  • search-index.json 不存在:让 Daisy 先跑 python3 /tmp/jsonl2html.py --all /tmp/mirror 生成
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 67 lines · 85 tokens per session scan A 0a5230e8a0ff

Subscribe to this mod's changes

summarize-sessions is a skill published in the GitHub repository daisyyang1109-super/mirror-viewer (5 stars, last pushed 4mo ago), licensed MIT. It adds 85 tokens to every session and 772 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

guard

Protect Claude Code sessions from context overflow by running a background daemon that monitors session size and auto-prunes before compaction hits. Use when the user says "guard", "protect session", "context getting long", "prevent compaction", "session management", or is running agent teams that need continuous…

Ruya-AI/cozempic · 64 tokens

wiki-lint

Audit wiki health: broken links, orphans, contradictions, stale content, lifecycle and tag issues. Use for maintenance or health checks. Default is report-only; use wiki-dedup for page-identity merges.

Ar9av/obsidian-wiki · 47 tokens

wiki-status

Report wiki ingestion/completeness state, pending source delta, structural insights, or maintenance equilibrium. Use for remaining-work/status questions, hubs and bridges, or whether maintenance skills still have pending changes. wiki-digest summarizes learned knowledge instead.

Ar9av/obsidian-wiki · 50 tokens

llm-as-judge-evaluation

Evaluate LLM outputs using frontier models as judges. Use for pairwise model comparison, quality scoring with custom rubrics, and automated evaluation pipelines. Covers position bias mitigation, statistical significance, and generating preference data for DPO/RLHF.

synthetic-sciences/openscience · 56 tokens

wiki-dashboard

Create dynamic, queryable Obsidian dashboard views using Bases or Dataview. Use for auto-updating tables, indexes, or structured views of vault content; not for ordinary question answering.

Ar9av/obsidian-wiki · 42 tokens

hermes-history-ingest

Ingest Hermes agent history into Obsidian as distilled knowledge. Use for importing or mining /.hermes sessions, memories, or logs; use wiki-agent for targeted topic-only cross-agent recall.

Ar9av/obsidian-wiki · 45 tokens