When you need to understand what actually happened in a Claude Code session, this pulls everything from the Agent Monitor API and formats it into a readable report. You get per-model token breakdowns including cache read/write stats, exact costs via matched pricing rules, the full agent hierarchy with subagent types, tool invocation counts, compaction events, and a timeline of errors and turn durations. It's built for the localhost:4820 monitor setup, so you can review a specific session ID, grab the latest one, or summarize a date range. The cache hit rate calculation and baseline token tracking are especially useful for spotting context management issues before your bill gets weird.

GitHub stars
455
last updated
Jun 11, 2026

Install

$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill session-report --agent claude-code

Installs into .claude/skills of the current project.

Files

Session Report

Generate a detailed session report from the Claude Code Agent Monitor.

Input

The user provides: $ARGUMENTS

This may be a session ID, "latest", or a date range like "last 24 hours".

Data Sources

All data comes from the Agent Monitor API at http://localhost:4820:

EndpointWhat it returns
GET /api/sessions/{id}Session with nested .agents[] and .events[]
GET /api/sessions?limit=50Session 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

Key data points available per session

Sponsors

Details

Repository
github.com/hoangsonww/claude-code-agent-monitor
Categories
DevOps & CI/CD, AI & Agent Building
License
MIT
First seen
Jun 11, 2026

More from hoangsonww/claude-code-agent-monitor

All 24
1hoangsonww avatarship-featurehoangsonww/claude-code-agent-monitorImplement a feature safely end-to-end in this repository. Use when adding or changing functionality across backend, frontend, or MCP with required verification 0skills.sh installs
2hoangsonww avatarusage-trendshoangsonww/claude-code-agent-monitor>0skills.sh installs
3hoangsonww avatarweekly-reporthoangsonww/claude-code-agent-monitor>0skills.sh installs
4hoangsonww avatarworkflow-optimizerhoangsonww/claude-code-agent-monitor>0skills.sh installs
5microsoft avatarazure-cloud-migratemicrosoft/azure-skillsAssess and migrate cross-cloud workloads to Azure with reports and code conversion. Supports Lambda→Functions, Beanstalk/Heroku/App Engine→App Service, Fargate/606.9Kskills.sh installs
6google avatargoogle-agents-cli-evalgoogle/agents-cliThis skill should be used when the user wants to "run an evaluation", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval r558.9Kskills.sh installs