claude-code-sessions
它能做什么
这项技能让你的智能体查看你保存的 Claude Code 会话历史。适合想找回过去的工作、查看用量或从上次中断处继续的开发者。
适用场景
- ✓当你想通过搜索讨论内容来找到过去的会话时。
- ✓当你想查看令牌用量或了解你最常使用哪些工具时。
- ✓当你想从早前的会话恢复之前的工作的时候。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/claude-code-sessions/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我找到上周我处理结账 bug 的那次会话,并给我一份摘要,方便接着做。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取 Claude Code 保存在你电脑上的会话文件,并运行搜索、统计、列表或导出命令。删除和清理命令只在你要求时才会运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Claude Code Sessions
Session intelligence plugin for Claude Code. Reads the JSONL session files that Claude Code writes to ~/.claude/projects/ and makes them searchable and analyzable.
What It Does
Claude Code records every session as a JSONL file — messages, tool calls, token counts, diffs, tasks. This plugin reads those files and provides two interfaces. Most operations are read-only; delete and cleanup skills can remove session files when explicitly invoked.
11 skills usable directly in Claude Code:
| Skill | Purpose |
|---|---|
/session-search "query" |
Full-text search across every session |
/session-stats |
Token usage, model distribution, tool breakdown |
/session-list |
List sessions sorted by recency, size, or duration |
/session-detail |
Deep dive into a specific session |
/session-diff |
Compare two sessions — files, tools, topics |
/session-timeline |
Chronological view of sessions on a project |
/session-resume |
Generate a context recovery prompt from any session |
/session-tasks |
Find pending and orphaned tasks across sessions |
/session-export |
Export a session as clean markdown |
/session-cleanup |
Find empty, tiny, or stale sessions |
/session-delete |
Delete sessions and their associated tasks |
Web dashboard at localhost:3000 with four views: Dashboard (summary stats), Sessions (sortable table with bulk operations), Search (full-text with context snippets), Tasks (grouped by status with orphan detection).
Install
/plugin marketplace add apappascs/claude-code-sessions
/plugin install claude-code-sessions@claude-code-sessions
No API keys. No config. No runtime dependencies. It reads what's already on disk.
For the dashboard:
bun run ui
# → http://localhost:3000
Architecture
Same TypeScript modules power skills, dashboard, and CLI:
lib/formatters.ts — pure utilities, no I/O
lib/session-parser.ts — parses one JSONL file into structured data
lib/session-store.ts — scans all sessions, aggregates, searches
ui/server.ts — HTTP endpoints + static file serving
Each lib file doubles as a standalone CLI:
bun run lib/session-store.ts list --sort recency --limit 10
bun run lib/session-store.ts search "database migration" --since 2025-01-01
bun run lib/session-parser.ts stats path/to/session.jsonl
Use Cases
- Find the session where you solved a specific problem weeks ago
- See which projects consume the most tokens
- Track pending tasks across all sessions and projects
- Resume a past session with full context
- Compare how two sessions approached the same problem
- Export session transcripts for documentation
Links
- GitHub: github.com/apappascs/claude-code-sessions
- License: MIT
常见问题
它从哪里读取会话?
从 Claude Code 在你电脑用户项目文件夹中写入的会话文件读取。
它能删除会话吗?
能,但只在你明确要求时。清理和删除命令可能会移除会话文件。
有仪表盘吗?
有。这项技能提到一个网页仪表盘,可以用多种视图展示会话。
详情
作者的原始描述
Search, analyze, and manage Claude Code session history. Use when the user wants to find past sessions, check token usage, review tool breakdowns, resume previous work, or manage tasks across sessions. Provides 11 skills and a web dashboard.
热度
- GitHub 星标
- 33k
- 排名
- #8877
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。