本文へ移動
cccskills
無料GitHub で公開

session-debug

Debug a specific session by inspecting its full event chain (PreToolUse, PostToolUse, Stop, SubagentStop, Compaction, APIError, TurnDuration, Notification events), agent hierarchy (recursive parent/child tree with subagent_type and depth), token usage with compaction baselines, workflow intelligence data (orchestration DAG, error propagation by depth), and session metadata (thinking_blocks, turn_count, total_turn_duration_ms).

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.8 KB
  • agents/openai.yaml266 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Session Debug

Debug and inspect a Claude Code session from Agent Monitor data.

Input

The user provides: $ARGUMENTS

This may be:

  • A session ID to debug
  • "latest" or "last" for the most recent session
  • "errors" to find and debug the most recent errored session

Procedure

  1. Identify the target session:

    • If session ID given: GET /api/sessions/{id} from http://localhost:4820
    • If "latest": GET /api/sessions?limit=1 (default sort: most recently updated first)
    • If "errors": GET /api/sessions?limit=10&status=error
  2. Collect full session data:

    • Session metadata: status, model, cwd, timestamps, duration
    • Events: GET /api/events?session_id={session_id} — full event timeline
    • Agents: GET /api/agents?session_id={session_id} — all agents in session
    • Cost: GET /api/pricing/cost/{session_id}
  3. Analyze the session:

    Session Lifecycle

    • Start time → first event → last event → end time
    • Status transitions (active → working → completed/error)
    • Total duration and active-vs-idle time

    Event Chain Analysis

    • Chronological event list with timestamps and durations
    • Identify the critical path (longest chain of dependent events)
    • Flag events that took unusually long
    • Highlight error events with full error context

    Agent Inspection

    • List all agents: type, task, status, duration
    • Subagent tree visualization (parent → children)
    • Agents that failed and their last known state
    • Agent switching patterns (when and why new agents spawned)

    Tool Execution Trace

    • Every tool invocation in order with: tool name, duration, success/failure
    • Failed tool calls with error messages
    • Tool retry patterns (same tool called multiple times)

    Anomaly Detection

    • Events out of expected order
    • Gaps in event timeline (>30s with no events)
    • Duplicate events or agent states
    • Token usage spikes (compaction indicators)
  4. Diagnosis:

    • Root cause hypothesis (if errors present)
    • Contributing factors
    • Remediation suggestions

Output Format

Present as a debug report with:

  • Session summary header (ID, status, model, duration, cost)
  • Color-coded timeline (✅ success, ❌ error, ⚠️ warning, ℹ️ info)
  • Agent tree diagram
  • Diagnosis section with numbered findings

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Inspect fired CCAM alerts and manage alert rules for token thresholds, event patterns, inactivity, and status duration. Use when acknowledging alerts, creating or editing a rule, checking cooldowns, or connecting alert rules to webhook targets.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

Identify anomalous sessions using Agent Monitor data — cost outliers from the pricing engine, token anomalies (cache miss spikes, compaction baseline surges), unusual event type ratios (PreToolUse/PostToolUse gaps, APIError clusters), behavioral deviations from workflow intelligence (complexity score outliers, error propagation anomalies), and sessions with abnormal metadata (extreme turn_count, high thinking_blocks, zero turn_duration).

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

Produce a detailed report on APIError events from Agent Monitor data — counts over time, which sessions and models are affected, and the likely root cause (rate limits, overload/529, or context-window pressure) inferred from each event's summary and data payload. Use when API errors spike or when you need to explain why requests are failing.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

benchmark

無料

Benchmark one session (or a small recent set) against the rolling average using Agent Monitor data — cost, total tokens, tool count, and workflow complexity score — and report where each metric lands as a percentile of the population. Tells you whether a session was normal, cheap, or an outlier. Use when judging whether a session was typical or out of band.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

Define a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.

日本語の概要は準備中です。原文の説明を表示しています。

hoangsonww/Claude-Code-Agent-Monitor1,0672026年10月12日 更新

hoangsonww のスキルをすべて見る

このスキルの問題を報告する