Export Claude conversation logs to markdown
Export conversations using claude-conversation-extractor.
Session ID: ${CLAUDE_SESSION_ID}
$ARGUMENTS
Parse the arguments and determine the export method:
claude-extract --list 2>/dev/null | grep -B5 "${CLAUDE_SESSION_ID:0:8}" to find the session numberclaude-extract --extract <number> --detailedIf arguments are comma-separated numbers like , :
11,3,5claude-extract --extract <numbers> --detailedIf arguments look like hex strings (e.g., 97b86784, 14b9611d-cd1a):
claude-extract --list 2>/dev/null | grep -B5 "<prefix>" to find the session numberclaude-extract --extract <numbers> --detailedIf arguments are freeform text:
claude-extract --search "<text>"Report the exported file path(s) and message count to the user.
If unsure about available options, run claude-extract --help.