Claude CodePartly tested🌏 World

Export a Claude Code session with /export for the next agent or a custom skill

Claude Code's built-in /export saves the current conversation as readable plain text (optional filename). @dani_avila7 highlights two uses: hand the transcript to another agent, or mine it to author better custom skills.

Visit site Claude Code ↗
Pricing
Paid
Region
Global
Where it's from
Overseas
Added
Oct 16, 2026
Tested on
Oct 16, 2026
Version we used
Claude Code /export (docs checked 2026-10-16)
Categories
CodingProductivity
Original author
Daniel San @dani_avila7 ↗
Our test
Partly tested
Cost / time
The command is free; you already pay for Claude Code. Exports can contain secrets — scrub before sharing.
Source
X @dani_avila7 ↗Claude Code Docs ↗Claude Code Commands ↗

The task

When a long session is ending, you're switching models/machines, or you want to turn today's mistakes into a reusable skill — keep a human-readable transcript instead of parsing version-fragile JSONL.

Steps

  1. In the active Claude Code session, run /export (no args opens a menu to copy or save).
  2. To write straight to disk: /export ./docs/sessions/feature-x.txt (adjust the path).
  3. When handing off to another agent, say this is the prior full transcript and to continue from decisions and open items, then state your new goal.
  4. To mint a skill: ask an agent to extract triggers, steps, and pitfalls from the export into a SKILL.md, then invoke that skill next time.
  5. Docs warn raw JSONL under ~/.claude/projects/… can change between releases; prefer /export or scripted interfaces like claude -p --output-format json / --resume.

Prompt

/export ./docs/sessions/session-handoff.txt

What the author says

@dani_avila7 (2026-10-15) says /export file_name writes a plain-text session history for another agent or for mining custom skills. Anthropic's sessions docs and command reference confirm the same behavior.

Our test

We cross-checked Anthropic's Sessions/Commands docs against the X tip; /export behavior matches. This environment has no Claude Code CLI, so we did not click export ourselves.

What we found when we tried it:Docs: /export copies to clipboard or saves plain text; with a filename it writes directly. They explicitly advise against relying on the changing JSONL on-disk format.

How to get in

Needs Claude Code (typically a paid plan). Type /export the same way in any UI language.

Who it suits

Anyone using Claude Code for handoffs, multi-agent pipelines, or turning a long debug into a skill.

Pitfalls

  • Export is a rendered transcript for humans, not a stable machine API; use the documented JSON/resume interfaces for automation.
  • Large sessions make huge files — summarize or clip before the next agent.
  • Never commit exports that contain secrets.

More in this category