brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: /export saves a Claude Code conversation as plain text

Claude
~/tips/tip-claude-export-conversation

/export session-notes.txt

Writes the current Claude Code conversation to a text file or your clipboard.

A Claude Code session often holds the reasoning behind a change: what was tried, what failed and why the final fix looks the way it does. That’s worth keeping next to the pull request, and there’s a built-in command for it.

/export session-notes.txt

According to the Claude Code commands reference, /export exports the current conversation as plain text. With a filename it writes straight to that file. Without one, it opens a dialog where you choose between copying to the clipboard and saving to a file.

Where I think it helps most: paste the relevant part into a PR description or an issue, so a reviewer sees why a change was made right next to the diff. Or save it before you run /clear and start fresh, so the old context isn’t lost for good.

Caveat: it’s the whole conversation, including anything you pasted in. Check the file for tokens, internal hostnames and other things that shouldn’t land in a repository before you share it. And on version 2.1.327 or later, /export with a filename refuses to overwrite a file that already exists, so pick a new name each time.

Further reading: Claude Code docs: Commands

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link