agentleFS
douglasrwdouglasrw/session-export/SKILL.md

session-export

Skill0 starsChanged 10 months agoMITView on GitHub

Export Claude Code session history to readable formats. Use when user says "export session", "save conversation", "export history", "create training data", "backup sessions", or wants to preserve, share, or analyze their Claude Code conversations. Exports to markdown, JSON, or training data formats.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. y-a-v-a/session-export★ 3same name
    2. apappascs/claude-code-sessions★ 2same name
    3. stv-io/claude-skills★ 0same name
    4. Tod8Cruz/claude-session-share★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create training dataset from all sessions:

    line 102

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Session Export

Export Claude Code sessions to readable, shareable, or training-ready formats.

Quick Start

Export current session to markdown:

python scripts/export_session.py --format markdown --output ./exports/

Export all sessions for a project:

python scripts/export_session.py --project /Users/you/dev/myproject --all --format markdown

Export as training data (JSONL):

python scripts/export_session.py --format training --output ./training_data/

Workflow

1. Find Sessions

Sessions are stored in ~/.claude/projects/[project-path-slug]/[session-id].jsonl

List available sessions:

python scripts/export_session.py --list

2. Choose Format

FormatUse Case
markdownReadable conversation log, sharing, documentation
jsonProgrammatic access, analysis, debugging
trainingFine-tuning, creating training datasets

3. Export Options

# Export specific session
python scripts/export_session.py --session abc123-def456 --format markdown

# Export with thinking blocks (default: excluded)
python scripts/export_session.py --include-thinking --format markdown

# Export tool calls (default: summarized)
python scripts/export_session.py --include-tools full --format markdown

# Filter by date
python scripts/export_session.py --after 2026-01-01 --before 2026-01-31

Output Formats

Markdown Format

# Session: kind-sniffing-frog
**Project:** /Users/you/dev/myproject
**Date:** 2026-01-30
**Model:** claude-opus-4-5

---

## User
[User message content]

## Assistant
[Assistant response]

---

Training Data Format (JSONL)

{"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}

JSON Format

Full structured export with metadata, tool calls, and thinking blocks.

Scripts

scripts/export_session.py

Main export script. Run with --help for all options.

Usage Examples

Export this project's sessions:

python scripts/export_session.py --project "$(pwd)" --format markdown --output ./session_exports/

Create training dataset from all sessions:

python scripts/export_session.py --all --format training --output ~/training_data/claude_sessions.jsonl

Notes

  • Sessions contain sensitive data - review before sharing
  • Training format excludes tool calls and system messages
  • Large sessions may be split into multiple files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.