跳到正文
Skillpedia
智能体33k · #8877

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/claude-code-sessions/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

常见问题

它从哪里读取会话?

从 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.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8877
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能