sessionlog:info

Installation
SKILL.md

Session Log Info

Identify the current Claude Code session and report its log file location.

Steps

  1. Determine the project session directory. Run:
project_dir="$HOME/.claude/projects/$(pwd | sed 's|/|-|g')"
echo "Project session directory: $project_dir"
  1. Find the current session (most recently modified JSONL file):
current_session=$(ls -t "$project_dir"/*.jsonl 2>/dev/null | head -1)
session_id=$(basename "$current_session" .jsonl)
echo "Session ID: $session_id"
echo "Session file: $current_session"
  1. Report session metadata. Read the first user message to get basic info:
jq -r 'select(.type == "user") | {sessionId, version, entrypoint, cwd, gitBranch, timestamp} | to_entries[] | "\(.key): \(.value)"' "$current_session" | head -6
  1. Count messages:
echo "Messages: $(jq -c 'select(.type == "user" or .type == "assistant")' "$current_session" | wc -l | tr -d ' ')"
  1. List all sessions for this project:
echo ""
echo "All sessions in this project:"
ls -lt "$project_dir"/*.jsonl 2>/dev/null | awk '{print $NF}' | while read f; do
  sid=$(basename "$f" .jsonl)
  msgs=$(jq -c 'select(.type == "user" or .type == "assistant")' "$f" | wc -l | tr -d ' ')
  echo "  $sid ($msgs messages)"
done

Output

Present results as a clean summary:

  • Session ID — the UUID
  • Session file — full path to the JSONL file
  • Project session directory — the folder containing all sessions for this project
  • Session count — how many sessions exist for this project
  • Current session message count
Related skills
Installs
2
GitHub Stars
9
First Seen
Apr 15, 2026