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.

GitHub stars
455
last updated
Jun 11, 2026

Install

$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill data-export --agent claude-code

Installs into .claude/skills of the current project.

Files

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

  1. Parse the request to determine:

    • Data scope: which data to export
    • Format: output format
    • Filters: time range, status, session ID
  2. 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
  3. 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": [...]
    }
    

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 avatarhealth-checkhoangsonww/claude-code-agent-monitor>0skills.sh installs
2hoangsonww avatarhook-diagnosticshoangsonww/claude-code-agent-monitor>0skills.sh installs
3hoangsonww avataroptimization-suggesthoangsonww/claude-code-agent-monitor>0skills.sh installs
4hoangsonww avatarpattern-detecthoangsonww/claude-code-agent-monitor>0skills.sh installs
5hoangsonww avatarproductivity-scorehoangsonww/claude-code-agent-monitor>0skills.sh installs
6hoangsonww avatarquick-statshoangsonww/claude-code-agent-monitor>0skills.sh installs