
Pulls session data, events, analytics, and cost reports from Claude Code's Agent Monitor and converts them to JSON, CSV, or Markdown. You can filter by date range or session ID, and it handles the formatting details like proper CSV quoting and readable Markdown tables. Useful when you need to analyze usage patterns outside the monitor itself or when building reports for tracking API costs over time. The JSON export includes metadata headers, and large datasets get written to files instead of dumped to stdout. It's straightforward data plumbing, nothing fancy, but it saves you from manually querying the localhost API and wrestling with format conversion.
$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill data-export --agent claude-codeInstalls into .claude/skills of the current project.
Export Agent Monitor data in various formats.
The user provides: $ARGUMENTS
This may be:
Parse the request to determine:
Fetch data from http://localhost:4820:
GET /api/sessions?limit=1000GET /api/events?limit=5000GET /api/analyticsGET /api/pricing/costGET /api/settings/exportTransform to requested format:
Pretty-printed JSON with metadata header:
{
"export": {
"source": "Claude Code Agent Monitor",
"exported_at": "2025-04-11T12:00:00Z",
"filters": { "type": "sessions", "range": "last 7 days" },
"count": 42
},
"data": [...]
}
Standard CSV with headers, proper quoting, and ISO timestamps:
id,name,status,model,started_at,ended_at,duration_minutes,cost_usd
Human-readable tables with summary statistics:
# Agent Monitor Export — Sessions (Last 7 Days)
| ID | Name | Status | Model | Duration | Cost |
|...
**Total: 42 sessions, $12.34 cost**
Output the data:
Deliver the exported data in the requested format. Always include:
Sponsors