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.
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
- In the active Claude Code session, run /export (no args opens a menu to copy or save).
- To write straight to disk: /export ./docs/sessions/feature-x.txt (adjust the path).
- 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.
- 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.
- 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
- A demo video per docs page that flags itself when the UI changesVideoScreenplayClaude CodeTool free; uses your agent's quota◐ Partly testedOverseas
- AI backend code that guards against races, leaks and bad migrationsCodingbackendskillsClaude CodePostgreSQLFree; about 2× tokens per task◐ Partly testedOverseas
- An afternoon of AI work, a 3D action game you play in the browserCodingClaude CodeTripoJimengSkill free; Claude quota plus asset tools◐ Partly testedChina
- Keep a long-running AI-built project from turning into a messCodingClaudeCodexoil-delegateNeeds Claude and Codex plans◐ Partly testedChina
- Use a web app once and get an AI write-up of how it worksResearchREAClaude CodeChromeFree tools; needs Claude or Codex◐ Partly testedOverseas