Claude Session ID
Find the most recent Claude Code session(s) with their last message.
Commands
# Show the latest session (default)
python3 .claude/skills/claude-session-id/scripts/latest_session.py
# Show the N latest sessions
python3 .claude/skills/claude-session-id/scripts/latest_session.py -n 5
# Filter sessions by project path
python3 .claude/skills/claude-session-id/scripts/latest_session.py -p /Users/thada/gits/myproject
# Combine project filter with count
python3 .claude/skills/claude-session-id/scripts/latest_session.py -p /Users/thada/gits/myproject -n 3
# Use custom projects directory
python3 .claude/skills/claude-session-id/scripts/latest_session.py --dir /path/to/projects
Output
Single session (default):
Session ID: 82c946c8-1eb8-4c70-9414-813fc0a278e4
Date: 2026-03-16 10:32
Last message (assistant): Here's the updated README with setup instructions...
Multiple sessions (-n 3):
1. Session ID: 82c946c8-1eb8-4c70-9414-813fc0a278e4
Date: 2026-03-16 10:32
Last message (assistant): Here's the updated README with setup instructions...
2. Session ID: a1b2c3d4-5678-9012-3456-789012345678
Date: 2026-03-15 18:00
Last message (user): Can you fix the login bug?
3. Session ID: f0e1d2c3-b4a5-9687-0123-456789abcdef
Date: 2026-03-14 09:15
Last message (assistant): Done. The test suite passes now.