Export a Claude Code session to Markdown with semantic filtering for relevant content
Exports Claude Code sessions to Markdown with semantic filtering and format options
/plugin marketplace add victor-software-house/history-search/plugin install victor-software-house-history-search@victor-software-house/history-search<session-id|latest|N>Export a Claude Code session to Markdown, with options for processing and filtering.
When the user invokes /export-session:
Determine which session to export:
latest: export most recent sessionAsk user about export options using AskUserQuestion:
Question 1: Export destination
session-YYYY-MM-DD-HHMMSS.md/tmp/ for one-time viewingQuestion 2: Content filtering
Execute export based on selections:
# Full export
claude-extract --session SESSION_ID --output OUTPUT_PATH
# With semantic filtering (search within exported content)
claude-search "FILTER_TOPIC" --session SESSION_ID
For large exports, use chunked reading:
Post-processing options:
/export-session latest
/export-session 3
/export-session abc123def456
The exported Markdown includes:
# Session Export: abc123...
**Date**: 2024-01-08
**Project**: /path/to/project
## Conversation
### Human (10:30 AM)
[content...]
### Assistant (10:31 AM)
[content...]
---
*Exported by history-search plugin*
If session not found:
Session not found. Use /list-sessions to see available sessions.
If export fails:
Export failed: [error message]
Try exporting to /tmp/ if there are permission issues.