view-team-session
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseView Team Session
查看团队会话
Generate a self-contained HTML viewer from Claude Code session JSONL logs.
Works for both solo sessions and agent team sessions, showing the full
conversation timeline with filtering, search, and collapsible tool calls.
从Claude Code会话JSONL日志生成独立HTML查看器。适用于单人会话和Agent团队会话,可展示完整对话时间线,支持筛选、搜索和可折叠工具调用功能。
How It Works
工作原理
Claude Code stores conversation logs as JSONL files at
. When agent teams are used,
each agent gets its own JSONL file in the same project directory, linked by a
shared field.
~/.claude/projects/<project>/<session-id>.jsonlteamNameBrowsers can't read local JSONL files directly, so the skill uses a Python
script to extract the data and embed it into a self-contained HTML playground.
Claude Code将对话日志以JSONL文件格式存储在
。使用Agent团队时,每个Agent都会在同一项目目录下生成独立的JSONL文件,通过共享的字段关联。
~/.claude/projects/<project>/<session-id>.jsonlteamName浏览器无法直接读取本地JSONL文件,因此该skill使用Python脚本提取数据,并将其嵌入到独立的HTML playground中。
Usage
使用方法
Run the generate script with a session ID using :
uv runbash
uv run {SKILL_DIR}/scripts/generate.py SESSION_ID [--output path] [--no-open]- — the UUID from the JSONL filename (e.g.,
SESSION_ID)605eef0e-40be-4e0f-8a34-0a977c60399d - — custom output path (default:
--output path).claude/output/<session-id>.html - — skip auto-opening in browser
--no-open
The script will:
- Scan to find the session's JSONL file
~/.claude/projects/*/ - If it's a team session, discover all teammate JSONL files via the shared field
teamName - Parse all files into structured events (speech, DMs, tool calls, thinking, etc.)
- Deduplicate inter-agent DMs (each DM exists in both sender and receiver logs — only the sender's copy is kept since it has richer metadata)
- Embed the data into the HTML template and write the output file
Replace with the actual path to this skill directory when constructing the command.
{SKILL_DIR}使用执行生成脚本并传入会话ID:
uv runbash
uv run {SKILL_DIR}/scripts/generate.py SESSION_ID [--output path] [--no-open]- — JSONL文件名中的UUID(例如
SESSION_ID)605eef0e-40be-4e0f-8a34-0a977c60399d - — 自定义输出路径(默认值:
--output path).claude/output/<session-id>.html - — 跳过自动在浏览器中打开的步骤
--no-open
脚本将执行以下操作:
- 扫描目录找到对应会话的JSONL文件
~/.claude/projects/*/ - 如果是团队会话,通过共享的字段查找所有团队成员的JSONL文件
teamName - 将所有文件解析为结构化事件(发言、私信、工具调用、思考过程等)
- 对Agent间的私信进行去重(每条私信在发送者和接收者的日志中均存在,仅保留发送者的副本,因为其包含更丰富的元数据)
- 将数据嵌入HTML模板并写入输出文件
构造命令时,请将替换为该skill目录的实际路径。
{SKILL_DIR}Finding Session IDs
查找会话ID
If the user doesn't provide a session ID, help them find one:
bash
undefined如果用户未提供会话ID,可协助用户通过以下命令查找:
bash
undefinedList recent sessions for the current project
列出当前项目的最近10条会话
ls -lt ~/.claude/projects/<project>/*.jsonl | head -10
ls -lt ~/.claude/projects/<project>/*.jsonl | head -10
Search for sessions containing specific content
搜索包含特定内容的会话
grep -l "search term" ~/.claude/projects/<project>/*.jsonl
The session ID is the filename without the `.jsonl` extension.grep -l "search term" ~/.claude/projects/<project>/*.jsonl
会话ID是去掉`.jsonl`后缀的文件名。Output
输出
The generated HTML is a single self-contained file with:
- Header showing team name, session ID, duration, event count
- Sidebar with agent toggles, event type filters, and content search
- Timeline of event cards with agent-colored borders
- Default view shows speech and DMs only; tool calls, thinking, and system events are togglable
- Dark theme (GitHub-dark style)
Output files go to by default.
.claude/output/生成的HTML是单个独立文件,包含以下功能:
- 页眉:展示团队名称、会话ID、时长、事件总数
- 侧边栏:提供Agent切换、事件类型筛选和内容搜索功能
- 时间线:带Agent专属颜色边框的事件卡片
- 默认视图:仅展示发言和私信内容;工具调用、思考过程和系统事件可手动切换显示
- 深色主题(GitHub深色风格)
输出文件默认存储在目录下。
.claude/output/