hoangsonww/Claude-Code-Agent-Monitor / plugins/ccam-devtools/skills/data-export
data-export
VerifiedExport Claude Code session and analytics data in JSON, CSV, or Markdown formats. Supports exporting sessions, events, costs, and analytics for external analysis or reporting. Use for data backup or integration.
Data Export
Export Agent Monitor data in various formats.
Input
The user provides: $ARGUMENTS
This may be:
- A data type: "sessions", "events", "analytics", "costs", "all"
- A format: "json", "csv", "markdown" (default: json)
- A filter: "last 7 days", "session {id}", "completed only"
- Combined: "sessions csv last 30 days"
Procedure
-
Parse the request to determine:
- Data scope: which data to export
- Format: output format
- Filters: time range, status, session ID
-
Fetch data from
http://localhost:4820:- Sessions:
GET /api/sessions?limit=1000 - Events:
GET /api/events?limit=5000 - Analytics:
GET /api/analytics - Costs:
GET /api/pricing/cost - Full export:
GET /api/settings/export
- Sessions:
-
Transform to requested format:
JSON 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": [...] }CSV Format
Standard CSV with headers, proper quoting, and ISO timestamps:
id,name,status,model,started_at,ended_at,duration_minutes,cost_usdMarkdown Format
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:
- For small exports (<100 rows): output directly
- For large exports: save to file and report the path
- Include row count and any filter notes
Output Format
Deliver the exported data in the requested format. Always include:
- Export metadata (when, what, filters applied)
- Row/record count
- Suggested filename for saving
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |