Tooluck logoTooluck
SKILL.md

data-export

Agent skill fromhoangsonww/Claude-Code-Agent-Monitor

Export 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.

How to install data-export

install data-export
# install the Claude-Code-Agent-Monitor pack with the skills CLI
npx skills add hoangsonww/Claude-Code-Agent-Monitor

# or add only this skill to Claude Code: copy the folder

plugins/ccam-devtools/skills/data-export/

# into

~/.claude/skills/data-export/ (all projects)

.claude/skills/data-export/ (one project)

plugins/ccam-devtools/skills/data-export/SKILL.md

MITFull file
1# Data Export
2
3Export Agent Monitor data in various formats.
4
5## Input
6
7The user provides: **$ARGUMENTS**
8
9This may be:
10- A data type: "sessions", "events", "analytics", "costs", "all"
11- A format: "json", "csv", "markdown" (default: json)
12- A filter: "last 7 days", "session {id}", "completed only"
13- Combined: "sessions csv last 30 days"
14
15## Procedure
16
171. **Parse the request** to determine:
18 - Data scope: which data to export
19 - Format: output format
20 - Filters: time range, status, session ID
21
222. **Fetch data** from `http://localhost:4820`:
23 - Sessions: `GET /api/sessions?limit=1000`
24 - Events: `GET /api/events?limit=5000`
25 - Analytics: `GET /api/analytics`
26 - Costs: `GET /api/pricing/cost`
27 - Full export: `GET /api/settings/export`
28
293. **Transform to requested format**:
30
31 ### JSON Format
32 Pretty-printed JSON with metadata header:
33 ```json
34 {
35 "export": {
36 "source": "Claude Code Agent Monitor",
37 "exported_at": "2025-04-11T12:00:00Z",
38 "filters": { "type": "sessions", "range": "last 7 days" },
39 "count": 42
40 },
41 "data": [...]
42 }
43 ```
44
45 ### CSV Format
46 Standard CSV with headers, proper quoting, and ISO timestamps:
47 ```
48 id,name,status,model,started_at,ended_at,duration_minutes,cost_usd
49 ```
50
51 ### Markdown Format
52 Human-readable tables with summary statistics:
53 ```markdown
54 # Agent Monitor Export — Sessions (Last 7 Days)
55 | ID | Name | Status | Model | Duration | Cost |
56 |...
57…

Excerpt shown under the repository's MIT license.

More skills in Claude-Code-Agent-Monitor

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates