List recent Claude Code sessions in the current project with option to export
Lists recent Claude Code sessions in the current project with export and search options.
/plugin marketplace add victor-software-house/history-search/plugin install victor-software-house-history-search@victor-software-house/history-search[--count N]Browse recent Claude Code sessions and optionally export them.
When the user invokes /list-sessions:
Get session list for current project:
claude-extract --list 2>/dev/null | head -20
Parse and display as a numbered table:
## Recent Sessions (Current Project)
| # | Date | Session ID | Summary |
|---|------------|------------|---------|
| 1 | 2024-01-08 | abc123... | Working on auth feature |
| 2 | 2024-01-07 | def456... | TypeScript migration |
| 3 | 2024-01-05 | ghi789... | Bug fixes in API |
Prompt user for action using AskUserQuestion:
If user selects export:
/export-session)If user selects view:
--count N or -n N: Number of sessions to list (default: 10)/list-sessions
/list-sessions --count 5
/list-sessions -n 20
If no sessions found:
No sessions found for this project.
This could mean:
- You haven't used Claude Code in this project yet
- Sessions are stored under a different project path