> Generate a comprehensive session report with per-model token usage (input, output, cache_read, cache_write including compaction baselines), cost breakdown via the pricing engine, tool invocations, agent hierarchy, compaction events, API errors, turn durations, and thinking block counts. Use when reviewing a specific session or summarizing activity over a date range.
npx skills add https://github.com/hoangsonww/Claude-Code-Agent-Monitor --skill session-report
Generate a detailed session report from the Claude Code Agent Monitor.
The user provides: $ARGUMENTS
This may be a session ID, "latest", or a date range like "last 24 hours".
All data comes from the Agent Monitor API at http://localhost:4820:
| Endpoint | What it returns |
|----------|----------------|
| GET /api/sessions/{id} | Session with nested .agents[] and .events[] |
| GET /api/sessions?limit=50 | Session list with agent_count, last_activity, and inline cost per session (bulk pricing applied server-side) |
| GET /api/pricing/cost/{sessionId} | { total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] } |
| GET /api/events?session_id={id} | Event stream: each has event_type, tool_name, summary, data (JSON), created_at |
active / completed / error / abandonedclaude-sonnet-4-20250514)thinking_blocks count, turn_count, total_turn_duration_ms, usage_extras (service_tier, speed, inference_geo)input_tokens, output_tokens, cache_read_tokens, cache_write_tokens per model (baselines are pre-summed into these totals at the DB level)(tokens / 1,000,000) × rate_per_mtok for each of 4 token types, using longest-match pricing rulePreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, Notification, Compaction, APIError, TurnDuration| Model | Input | Output | Cache Read | Cache Write | Total |
Show effective totals (current + baseline) since baselines preserve tokens lost during compaction. Calculate cache hit rate: cache_read / (cache_read + input) × 100.
From /api/pricing/cost/{id} — show each model's cost with the matched pricing rule. Note rates are per million tokens.
Render the agent tree (main → subagents, with nested children). For each agent: name, type, subagent_type, status, task (first 60 chars), duration.
Count PreToolUse events by tool_name. Flag tools that appear in error events. Note subagent spawns (tool_name = "Agent").
Compaction events (each = context was compressed)List any APIError events with type (quota, rate_limit, overloaded) and message.
Key lifecycle events: SessionStart → first tool → compactions → errors → Stop → SessionEnd. Include TurnDuration events.
Clean Markdown: executive summary line, structured tables, agent tree, numbered timeline. Bold key metrics.
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take hoangsonww/session-report from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.