Agent skill

Export Claude Sessions

by tombelieber in tombelieber/claude-view

Exports Claude Code session history from the claude-view server as JSON, filtered by date range or project, for backup or analysis elsewhere.

MITAuto-check passedAgent Workflows

Install Export Claude Sessions

skills CLI
$ npx skills add tombelieber/claude-view --skill export-data -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tombelieber/claude-view export-data --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tombelieber/claude-view.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/plugin/skills/export-data .claude/skills/export-data && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
export-data
GitHub stars
110
Token cost
~2.9k tokens
SKILL.md length
1,045 words
Files
2
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Exports Claude Code session history from the claude-view server as JSON, filtered by date range or project, for backup or analysis elsewhere.

  • Works in 5 steps: Clarify scope. Ask the user what they… → Export sessions. Call… → Present the export summary → …
  • Backing up Claude Code session history
  • SKILL.md covers Steps and Available Tools
  • Calls npx

What it does

When the request is vague, the skill first asks what to export: every session by default, a date range using the from and to parameters, or one project by name. It then calls the claude-view export_sessions tool with those filters and presents a short export summary that includes how many sessions came out.

The tool returns JSON, so a request for CSV gets a note to convert with jq or a spreadsheet import. An empty result prompts a check of the date range or of whether the claude-view server has indexed any sessions. The server must be running on localhost; the plugin hook normally starts it, and an error saying it was not detected tells the user to run npx claude-view. The skill file also lists the wider claude-view toolset for listing sessions, statistics, live sessions and classification.

When your agent uses it

  • Backing up Claude Code session history
  • Exporting sessions from one project or date range for analysis
  • Getting session data into a spreadsheet or script

Example prompts

  • “Export all my sessions from last month so I can analyze them.”
  • “Export only the sessions for the billing-service project.”
  • “Download my session data and tell me how to turn it into CSV.”

Requirements

  • The claude-view MCP server running on localhost
  • npx, for starting the server by hand when needed
  • Pre-approved tools (allowed-tools): mcp__claude-view__export_sessions

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Clarify scope. Ask the user what they want to export if not specified
  2. Export sessions. Call mcpclaude-viewexport_sessions with the appropriate filters.
  3. Present the export summary
  4. If the user wants CSV format, note that the export tool returns JSON and suggest using jq or a spreadsheet import to convert.
  5. If the export is empty, suggest checking the date range or confirming that the claude-view server has indexed sessions.

What it can do on your machine

Read from SKILL.md and the folder at commit ff3cdd1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • mcp__claude-view__export_sessions

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Export Claude Sessions loads about 2.9k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 1,045 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tombelieber/claude-view at commit ff3cdd1, republished under its MIT licence (© tombelieber). 1,045 words, ~2,938 tokens.

Download SKILL.mdSave it as .claude/skills/export-data/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
export-data
description
Use when the user wants to export session data — e.g. 'export my sessions', 'download data', 'export to CSV', 'get my data'
allowed-tools
mcp__claude-view__export_sessions

You have access to the claude-view MCP server which provides tools for monitoring, analyzing, and managing Claude Code sessions. The claude-view server must be running on localhost (it auto-starts via the plugin hook).

Important: All tool names are prefixed with mcp__claude-view__. When calling a tool, always use the full prefixed name.

Error handling: If a tool returns an error about the server not being detected, tell the user to start it with npx claude-view.

Export Session Data

Export the user's Claude Code session data for external analysis or backup.

Steps

  1. Clarify scope. Ask the user what they want to export if not specified:

    • All sessions (default)
    • A specific date range (use from/to parameters)
    • A specific project (filter by project name)
  2. Export sessions. Call mcp__claude-view__export_sessions with the appropriate filters.

  3. Present the export summary:

## Data Export

**Sessions exported:** N
**Date range:** [from] to [to]
**Format:** JSON

### Summary
- Total sessions: N
- Projects covered: [list]
- Date range: [earliest] — [latest]
- Total cost: $X.XX

[Download link or file path if provided by the export tool]
  1. If the user wants CSV format, note that the export tool returns JSON and suggest using jq or a spreadsheet import to convert.

  2. If the export is empty, suggest checking the date range or confirming that the claude-view server has indexed sessions.

Available Tools

ToolDescription
Session Tools
list_sessionsList sessions with filters
get_sessionGet session details
search_sessionsGrep search across sessions
Stats Tools
get_statsDashboard statistics
get_fluency_scoreAI Fluency Score (0-100)
get_token_statsToken usage statistics
Live Tools
list_live_sessionsCurrently running sessions
get_live_summaryAggregate live session summary
Auth Tools
auth_post_sessionauth session
auth_delete_sessionauth session
auth_get_statusauth status
Classify Tools
classify_start_classificationTrigger a classification job.
classify_cancel_classificationCancel a running classification job.
classify_single_sessionClassify a single session synchronously.
classify_get_classification_statusGet classification status.
Claude Home Tools
claude_home_list_claude_homehome
Cli Tools
cli_create_session- Create a new tmux-backed CLI session.
Coaching Tools
coaching_list_rules- List all coaching rules from the rules directory.
coaching_apply_rule- Create a new coaching rule file.
coaching_remove_rule- Remove a coaching rule file.
Contributions Tools
contributions_get_contributionsMain contributions page data.
contributions_get_branch_sessionsSessions for a branch.
contributions_get_session_contributionSession contribution detail.
Devices Tools
devices_list_devices_handlerdevices
devices_terminate_others_handlerothers
devices_delete_device_handlerdevices {device_id}
Export Tools
export_sessionsExport all sessions.
Facets Tools
facets_facet_badgesQuality badges (outcome + satisfaction) for the requested session IDs
facets_trigger_facet_ingestStart facet ingest from the Claude Code insights cache
facets_pattern_alertCheck the most recent sessions for a negative satisfaction pattern
facets_facet_statsAggregate statistics across all session facets.
Health Tools
health_configconfig
health_checkHealth check endpoint.
health_get_statusGet index metadata and data freshness info.
Ide Tools
ide_get_detectGET /api/ide/detect — return cached list of installed IDEs.
ide_post_openPOST /api/ide/open — open a file in the requested IDE.
Insights Tools
insights_get_insightsCompute and return behavioral insights.
insights_get_benchmarksCompute personal progress benchmarks.
insights_get_categoriesReturns hierarchical category data.
insights_get_insights_modelsper-model usage aggregated from rollup tables.
insights_get_insights_projectsper-project usage aggregated from rollup tables.
insights_get_insights_trendsGet time-series trend data for charts.
insights_list_invocablesList all invocables with their usage counts.
Jobs Tools
jobs_list_jobsList all active jobs.
Live Tools
live_get_pricing- Return the model pricing table.
live_dismiss_all_closed- Dismiss all recently closed (in-memory only).
live_get_live_session- Get a single live session by ID.
live_dismiss_session- Dismiss from recently closed (in-memory only).
live_get_live_session_messages- Get the most recent messages for a live session.
Mcp Tools
mcp_get_mcp_serversreturns all deduplicated MCP server configurations.
Memory Tools
memory_get_all_memoriesreturns all memory entries grouped by scope.
memory_get_memory_fileread a single memory file.
memory_get_project_memoriesreturns memories for a specific project.
Monitor Tools
monitor_snapshot- One-shot JSON snapshot of current resources.
Oauth Tools
oauth_get_auth_identityGET /api/oauth/identity
oauth_get_oauth_usageGET /api/oauth/usage
oauth_post_oauth_usage_refreshPOST /api/oauth/usage/refresh
Pairing Tools
pairing_generate_qrGenerate a QR payload via Supabase pair-offer.
Plans Tools
plans_get_session_plans- returns plan documents for the session's slug.
Plugins Tools
plugins_list_plugins- Unified view of installed + available plugins.
plugins_list_marketplacesplugins marketplaces
plugins_marketplace_actionplugins marketplaces action
plugins_refresh_allall
plugins_refresh_statusstatus
plugins_list_ops_handlerList all queued/running/completed ops.
plugins_enqueue_opEnqueue a plugin mutation, return immediately.
Processes Tools
processes_cleanup_processesprocesses cleanup
processes_kill_processprocesses {pid} kill
Projects Tools
projects_list_projectslist all projects backed by the in-memory catalog.
projects_list_project_branchesList distinct branches with session counts.
projects_list_project_sessionspaginated sessions for one project.
Prompts Tools
prompts_list_promptsList prompt history with optional search/filter.
prompts_get_prompt_statsAggregate prompt statistics.
prompts_get_prompt_templatesDetected prompt templates.
Providers Tools
providers_list_providersproviders with session counts (count > 0 only, Claude Code always first).
providers_usagetoken/cost aggregates per foreign provider within a trailing window
Reports Tools
reports_list_reportsList all saved reports.
reports_get_previewAggregate preview stats for a date range.
reports_get_reportGet a single report.
reports_delete_reportDelete a report.
Sessions Tools
sessions_get_active_sessionsreturns all active session files from ~/.claude/sessions/.
sessions_list_branchesGet distinct list of branch names across all sessions.
sessions_estimate_costcost estimation (Rust-only, no sidecar).
sessions_session_activityActivity histogram for sparkline chart.
sessions_session_activity_richFull server-side activity aggregation.
sessions_bulk_archive_handlersessions archive
sessions_bulk_unarchive_handlersessions unarchive
sessions_archive_session_handlersessions {id} archive
sessions_get_file_historyList all file changes for a session.
sessions_get_file_diffhistory/:file_hash/diff?from=N&to=M
sessions_get_session_hook_eventsFetch hook events for a session.
sessions_get_session_messages_by_idGet paginated messages by session ID.
sessions_get_subagent_messagesPaginated blocks for a sub-agent.
sessions_unarchive_session_handlersessions {id} unarchive
sessions_interact_handlerResolve a pending interaction (permission, question, plan, elicitation).
sessions_get_interaction_handlerFetch the full interaction data for a session's pending interaction.
Settings Tools
settings_get_claude_code_settingsreturns merged, redacted Claude Code settings.
settings_get_settingsRead current app settings.
settings_update_settingsUpdate app settings (partial).
settings_update_git_sync_intervalUpdate the git sync interval.
Share Tools
share_create_sharesessions {session_id} share
share_revoke_sharesessions {session_id} share
share_list_sharesshares
Stats Tools
stats_ai_generation_statsAI generation statistics with time range filtering.
stats_overviewAggregate usage statistics.
stats_storage_statsStorage statistics for the settings page.
stats_get_trendsGet week-over-week trend metrics.
Sync Tools
sync_indexing_status- lightweight JSON snapshot of indexing progress.
sync_trigger_deep_indexTrigger a full deep index rebuild.
sync_trigger_git_syncTrigger git commit scanning (A8.5).
System Tools
system_check_pathCheck whether a filesystem path still exists.
system_get_system_statusGet comprehensive system status.
system_clear_cacheClear obsolete search cache.
system_trigger_git_resyncTrigger full git re-sync.
system_trigger_reindexTrigger a full re-index.
system_reset_allFactory reset all data.
Teams Tools
teams_list_teamsList all teams.
teams_get_teamGet team detail.
teams_get_team_costGet team cost breakdown.
teams_get_team_inboxGet team inbox messages.
teams_get_team_sidechainsGet team member sidechains.
Telemetry Tools
telemetry_set_consentSet telemetry consent preference.
telemetry_ingest_eventingress for web journey events.
Turns Tools
turns_get_session_turns- Per-turn breakdown for a historical session.
Webhooks Tools
webhooks_list_webhookslist all webhooks (secrets excluded).
webhooks_create_webhookcreate a new webhook (returns signing secret once).
webhooks_get_webhookget a single webhook by ID.
webhooks_update_webhookupdate an existing webhook (partial update).
webhooks_delete_webhookremove a webhook from config and secrets.
webhooks_test_sendsend a synthetic test payload.
Workflows Tools
workflows_list_workflowsworkflows
workflows_create_workflowworkflows
workflows_control_runworkflows run {run_id} control
workflows_list_workflow_runsworkflows runs
workflows_get_workflow_run_detailworkflows runs {session_id} {run_id}
workflows_get_workflow_agent_detailworkflows runs {session_id} {run_id} agents {agent_id}
workflows_get_workflowworkflows {id}
workflows_delete_workflowworkflows {id}

© tombelieber, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in packages/plugin/skills/export-data of tombelieber/claude-view.

  • SKILL.md
  • SKILL.md.tmpl

Open the folder on GitHubat commit ff3cdd1

Compare with similar skills

Export Claude Sessions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Export Claude Sessions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Export Claude Sessions this skilltombelieber/claude-view110—~2.9kAutomated safety check: PassMIT
Skill Seekers Builderyusufkaraaslan/Skill_Seekers15k—~760Automated safety check: PassMIT
Verified Researchsweetcornna/free-search-mcp116—~1.8kAutomated safety check: PassMIT
Geo MCP Serverssparkgeo/geo-mcp-servers119—~809Automated safety check: PassMIT
MCP Google Map Projectcablate/mcp-google-map468—~774Automated safety check: PassMIT
Cesium Quickstartgaopengbin/cesium-mcp140—~354Automated safety check: PassMIT

Similar skills

  • Skill Seekers Builder

    yusufkaraaslan/Skill_Seekers

    Detects the type of a knowledge source and uses the Skill Seekers MCP tools to turn docs, repos, PDFs or videos into packaged AI skills.

    15k GitHub stars~760 tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Verified Research

    sweetcornna/free-search-mcp

    Use with the free-search MCP tools whenever a web lookup must yield facts someone will rely on: dates, deadlines, prices, prizes, fees, rules, eligibility, schedules, versions, statistics, news, or…

    116 GitHub stars~1.8k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Geo MCP Servers

    sparkgeo/geo-mcp-servers

    Browse, search, and recommend geospatial / GIS / mapping / earth-observation MCP servers, and add newly discovered ones to the tracked list.

    119 GitHub stars~809 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • MCP Google Map Project

    cablate/mcp-google-map

    Project knowledge for developing and maintaining @cablate/mcp-google-map.

    468 GitHub stars~774 tokensUpdated 11 days ago
    Agent WorkflowsAuto-check passed
  • Cesium Quickstart

    gaopengbin/cesium-mcp

    Guide users through their first interaction with the Cesium 3D globe via MCP tools

    140 GitHub stars~354 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Rezolus MCP

    iopsystems/rezolus

    Investigate a Rezolus performance recording (.parquet, .rez, .dendro) through the rezolus MCP server.

    275 GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from tombelieber/claude-view

All 13 skills in this repo
  • Claude View Coaching

    tombelieber/claude-view

    Reviews your Claude Code habits through the claude-view server, showing an AI Fluency Score and insights and letting you add or remove personal coaching rules.

    110 GitHub stars~3.1k tokensUpdated 7 days ago
    Auto-check passed
  • Claude Code Daily Cost Report

    tombelieber/claude-view

    Shows today's Claude Code spending through the claude-view MCP server, with total cost, running sessions and a per-session breakdown, and other date ranges on request.

    110 GitHub stars~3k tokensUpdated 7 days ago
    Auto-check passed
  • Claude Code Behavioral Insights

    tombelieber/claude-view

    Pulls pattern, trend and benchmark data from the claude-view MCP server to present a behavioral analysis of your Claude Code usage, grouped by category.

    110 GitHub stars~3.1k tokensUpdated 7 days ago
    Auto-check passed
  • claude-view Project Overview

    tombelieber/claude-view

    Shows a dashboard for one project, or a table of all projects, from the claude-view MCP server: sessions, branches and contribution data.

    110 GitHub stars~3.1k tokensUpdated 7 days ago
    Auto-check passed
  • Claude Session Search

    tombelieber/claude-view

    Search your Claude Code session history through the claude-view MCP server, matching summaries, commit messages and project or branch names, and present the most relevant sessions.

    110 GitHub stars~3k tokensUpdated 7 days ago
    Auto-check passed
  • Session Recap

    tombelieber/claude-view

    A skill your agent uses when the user asks to recap, summarize, or review a Claude Code session — e.g.

    110 GitHub stars~3k tokensUpdated 7 days ago
    Auto-check passed

Questions about Export Claude Sessions

What does Export Claude Sessions do?

Exports Claude Code session history from the claude-view server as JSON, filtered by date range or project, for backup or analysis elsewhere. When the request is vague, the skill first asks what to export: every session by default, a date range using the from and to parameters, or one project by name. It then calls the claude-view export_sessions tool with those filters and presents a short export summary that includes how many sessions came out.

When should I use Export Claude Sessions?

Export Claude Sessions fits situations like: backing up Claude Code session history; exporting sessions from one project or date range for analysis; getting session data into a spreadsheet or script.

How do I install Export Claude Sessions in Claude Code?

Run `npx skills add tombelieber/claude-view --skill export-data -a claude-code`. Or copy the skill folder (packages/plugin/skills/export-data in tombelieber/claude-view) into .claude/skills/export-data in your project. Claude Code loads it when a task matches its description.

How do I install Export Claude Sessions in Codex?

Run `npx skills add tombelieber/claude-view --skill export-data -a codex`. Or copy the skill folder (packages/plugin/skills/export-data in tombelieber/claude-view) into .agents/skills/export-data in your project. Codex loads it when a task matches its description.

Can I use Export Claude Sessions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tombelieber/claude-view --skill export-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/export-data, .gemini/skills/export-data, .github/skills/export-data and .opencode/skills/export-data in your project.

What does Export Claude Sessions need to run?

Going by SKILL.md and its folder, Export Claude Sessions needs the command-line tools its instructions call (npx). Our summary lists: The claude-view MCP server running on localhost; npx, for starting the server by hand when needed. Its frontmatter pre-approves these tools: mcp__claude-view__export_sessions.

Does Export Claude Sessions access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Export Claude Sessions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Export Claude Sessions use?

Export Claude Sessions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Export Claude Sessions use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Export Claude Sessions?

Skills that share tags, products or a category with Export Claude Sessions: Skill Seekers Builder (yusufkaraaslan/Skill_Seekers, 15k stars), Verified Research (sweetcornna/free-search-mcp, 116 stars), Geo MCP Servers (sparkgeo/geo-mcp-servers, 119 stars) and MCP Google Map Project (cablate/mcp-google-map, 468 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Export Claude Sessions?

tombelieber (a GitHub user) maintains it in tombelieber/claude-view, which has 110 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 30, 2026.

Source: tombelieber/claude-view on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.