Token导航 LogoToken导航

Agent Skill · 研究检索

observability-analyze-session-logs(可观察性分析会话日志)

observability-analyze-session-logs 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

observability-analyze-session-logs 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,089。

总安装 196周安装 8GitHub Stars 1下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:observability-analyze-session-logs(可观察性分析会话日志)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/observability-analyze-session-logs
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill observability-analyze-session-logs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill observability-analyze-session-logs

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

针对会话级日志进行分析与关键事件提取。适用于用户行为追踪与交互问题排查。使用 npx skills add 命令从 dawiddutoit/custom-claude 安装。需核实会话数据存储位置与访问控制机制。

observability-analyze-session-logs 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/observability-analyze-session-logs

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dawiddutoit/custom-claude --skill observabilit…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

observability-analyze-session-logs 怎么安装?

在终端执行 npx skills add https://github.com/dawiddutoit/custom-claude --skill observability-analyze-…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

observability-analyze-session-logs 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

observability-analyze-session-logs 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

observability-analyze-session-logs 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

observability-analyze-session-logs 用的人多吗?

公开数据是累计安装 196 次,近一周安装 8 次,下载 63 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

observability-analyze-session-logs 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
observability-analyze-session-logs

可观察性分析会话日志 · 本页

1961只读未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Analyze Session Logs

IMPORTANT DISTINCTION: This skill analyzes Claude Code session transcripts (what Claude saw and thought), NOT application/production logs (what code executed). For application logs, use the analyze-logs skill instead.

Quick Start

Most common usage (list all messages):

python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --list

View context at specific point (by message index):

python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --message-index 10

View context at specific message (by UUID from logs/errors):

python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --uuid "3c8467d6-..."

When to Use This Skill

Invoke this skill when users mention:

  • "why did Claude do X?"
  • "what was in the context window?"
  • "analyze session" / "check session logs"
  • "debug Claude behavior"
  • "token usage investigation"
  • "context window exhaustion"
  • "track agent delegation"
  • Any mention of .jsonl session files

Use cases:

  1. Debugging decisions - "Why did Claude choose approach X?" → View context at decision point
  2. Token analysis - "Where are tokens being used?" → Track cache creation vs cache read
  3. Agent tracking - "How are agents being delegated?" → Follow sidechain messages
  4. Context exhaustion - "Why did Claude lose context?" → See context window growth
  5. Performance issues - "Why is Claude slow?" → Identify cache thrashing

What This Skill Does

Analyzes Claude Code session transcripts to provide forensic visibility into Claude's internal state, decision-making process, context window content, and token usage patterns.

What it reveals:

  • Context window content at any point in conversation
  • Token usage breakdown (input, cache creation, cache read, output)
  • Message chains (parent-child relationships)
  • Agent delegation patterns (sidechain vs main thread)
  • Context window growth over time
  • Thinking blocks (Claude's internal reasoning)
  • Tool calls with parameters and results

Key Distinction:

  • This skill: Analyzes Claude's session transcripts → Shows "what Claude saw and thought"
  • analyze-logs skill: Analyzes OpenTelemetry application logs → Shows "what code executed"
  • Use both together for complete debugging

Session File Locations

User-level session files (Claude Code transcripts):

~/.claude/projects/-Users-{username}-{project-path}/{session-uuid}.jsonl

Find recent sessions:

ls -lt ~/.claude/projects/-Users-$(whoami)-*/*.jsonl | head -5

Instructions

Follow this workflow to analyze Claude Code session logs:

  1. Locate session file - Find.jsonl file in ~/.claude/projects/
  2. Choose analysis mode - List messages, view context at index, or view at UUID
  3. Execute analysis - Run view_session_context.py with appropriate flags
  4. Interpret results - Examine context window, token usage, and decision points
  5. Report findings - Explain Claude's behavior with evidence from context

Analysis Workflow

Step 1: Locate Session File

# Find most recent session file
ls -lt ~/.claude/projects/-Users-$(whoami)-*/*.jsonl | head -5

# Or search by UUID from error messages
grep -r "uuid" ~/.claude/projects/*/

Step 2: Choose Analysis Mode

Mode 1: List All Messages (Overview)

python3 .claude/tools/utils/view_session_context.py <session.jsonl> --list

Use when: Initial investigation, finding specific messages, tracking token usage

Mode 2: Context Window at Specific Point

python3 .claude/tools/utils/view_session_context.py <session.jsonl> --message-index 10

Use when: Debugging specific decision, understanding available context, seeing thinking blocks

Mode 3: View Specific Message by UUID

python3 .claude/tools/utils/view_session_context.py <session.jsonl> --uuid "3c8467d6-..."

Use when: Error logs reference specific message UUID

Mode 4: View Raw JSON

python3 .claude/tools/utils/view_session_context.py <session.jsonl> --message-index 10 --raw

Use when: Need exact JSON structure, programmatic analysis

Step 3: Execute Analysis

Run the appropriate command using the Bash tool:

python3 .claude/tools/utils/view_session_context.py ~/.claude/projects/-Users-*/abc123.jsonl --list

Step 4: Interpret Results

For List Output:

  1. Check message count - How long was the session?
  2. Identify MAIN vs SIDE - SIDE indicates agent delegation
  3. Spot token patterns:

- High Cache Create = New context being cached - High Cache Read = Good cache utilization - High Cache Create repeatedly = Cache thrashing

  1. Find interesting points - Large output tokens, sudden cache creation, sidechains
  2. Note message indices for deeper investigation

For Context Window Output:

  1. Review message chain - Understand conversation flow
  2. Read THINKING blocks - See Claude's internal reasoning
  3. Check TOOL calls - What tools were invoked and why
  4. Examine token breakdown (input, cache creation, cache read, output)
  5. Check total context size - Is it approaching 200k limit?

For Token Usage:

  • Cache creation spike = Context changed significantly
  • High cache read = Good utilization (cost effective)
  • Low cache read = Cache misses (investigate why)
  • Growing total context = Approaching 200k limit

Step 5: Report Findings

Always provide:

  1. Summary - Session length, main vs sidechain messages, total tokens
  2. Key insights - What explains the behavior?
  3. Specific examples - Quote relevant thinking blocks, tool calls
  4. Context evidence - Show what Claude had access to
  5. Suggested next steps - Additional investigation or fixes

Example response format:

Analyzed session abc123.jsonl (42 messages):

Key Findings:
1. Agent delegation at message 15 (→ unit-tester)
   - Context window at that point: 24,059 tokens
   - Thinking: "Need comprehensive test coverage for new service"
   - Agent had access to service implementation but not architectural context

2. Cache thrashing at messages 28-35
   - Cache creation spiked to 18k tokens each message
   - Context kept changing due to repeated file edits
   - Suggestion: Batch edits to reduce cache invalidation

3. Context exhaustion at message 40
   - Total context: 189,234 tokens (approaching 200k limit)
   - Claude started summarizing instead of quoting full code

To investigate further:
- View agent delegation context: --message-index 15
- Examine cache thrashing: --message-index 30

Best Practices

  1. Start with List Mode - Always get the overview first to identify interesting points
  2. Identify Patterns - Look for high cache creation (10k+ tokens), SIDE messages, large outputs
  3. Use Message Index for Deep Dives - From list output, drill down to specific points
  4. Follow Agent Delegation Chains - When you see [SIDE], trace back to parent in main thread
  5. Track Token Usage - Good: high cache read (80%+), Bad: repeated cache creation (thrashing)
  6. Compare Before/After - When debugging changes, analyze sessions before and after fix
  7. Correlate with Code Execution Logs - Session logs show "what Claude thought", OpenTelemetry logs show "what code executed"
  8. Save Important Sessions - Archive critical sessions to .claude/artifacts/ for future reference

Common Scenarios

"Why did Claude do X?"

  1. Find session file → List messages (--list)
  2. Identify message where decision was made
  3. View context at that point (--message-index N)
  4. Read THINKING blocks to see reasoning
  5. Explain: "Claude did X because context included Y but not Z"

Token Usage Investigation

  1. List messages to see token breakdown
  2. Identify spikes in cache_creation_input_tokens
  3. View context at spike points
  4. Determine what caused cache invalidation
  5. Suggest optimizations (batch edits, cache earlier)

Agent Delegation Analysis

  1. List messages to find sidechains ([SIDE])
  2. View sidechain message context
  3. Trace back to parent in main thread
  4. Compare context available in main vs sidechain
  5. Explain what agent could/couldn't see

Context Window Exhaustion

  1. List messages to track context growth
  2. Identify where total context approaches 200k
  3. View context at exhaustion point
  4. Analyze what's consuming space
  5. Suggest context optimization (new session, prune messages)

Integration with Other Skills

  • analyze-logs - Combine session logs (what Claude thought) with execution logs (what code did)
  • debug-test-failures - See what context was available when tests were written
  • orchestrate-agents - Track actual delegation patterns vs expected
  • check-progress-status - Understand how tasks were completed (decision points, delegations)

Supporting Files

- Session file format specification (JSONL structure) - Data models and content block types - Parent-child chain reconstruction algorithm - Cache token types and pricing details - Performance characteristics and limits - Tool implementation details - Understanding output format (session structure, token breakdown, message chains) - Advanced usage patterns (session comparison, pattern detection, metrics) - Troubleshooting guide (common errors, solutions) - Complete command reference

- 6 response templates for different contexts - List mode summary template - Context window analysis template - Agent delegation investigation template - Token usage spike template - Context exhaustion template

Requirements

Tools:

  • Python 3.12+ (already in project)
  • Session viewer: .claude/tools/utils/view_session_context.py (bundled)
  • jq (optional, for advanced analysis): brew install jq

Session files:

  • User-level: ~/.claude/projects/-Users-{username}-{project-path}/{session-uuid}.jsonl
  • Generated automatically by Claude Code

Verification:

# Verify tool exists
ls .claude/tools/utils/view_session_context.py

# Verify session files exist
ls -l ~/.claude/projects/-Users-$(whoami)-*/

# Test the tool
python3 .claude/tools/utils/view_session_context.py \
  $(ls -t ~/.claude/projects/-Users-$(whoami)-*/*.jsonl | head -1) --list

Quick Reference

GoalCommand
List all messagespython3.claude/tools/utils/view_session_context.py <session.jsonl> --list
View context at pointpython3.claude/tools/utils/view_session_context.py <session.jsonl> --message-index 10
View by UUIDpython3.claude/tools/utils/view_session_context.py <session.jsonl> --uuid "abc123..."
View raw JSONpython3.claude/tools/utils/view_session_context.py <session.jsonl> --message-index 10 --raw
Find recent sessions`ls -lt ~/.claude/projects/-Users-$(whoami)-*/*.jsonl \head -5`

Key Messages:

  • This skill provides X-ray vision into Claude's decision-making
  • Use when behavior is unexpected or token usage is unclear
  • Complements OpenTelemetry logs (code execution) with context window visibility (what Claude thought)
  • Essential for debugging complex agent orchestration
  • Start with --list, then drill down with --message-index

Remember: Session logs show what Claude had access to and how it reasoned. This is your forensic tool for understanding "why Claude did X."

平台分布

Codex

33.87%
按下载量换算21

Claude

31.41%
按下载量换算20

Cursor

18.84%
按下载量换算12

Gemini CLI

9.02%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills