get-history

Retrieve raw Claude Code session history from JSONL files for auditing.

4|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/cowwoc/styler --skill get-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: get-history
Source: https://github.com/cowwoc/styler/tree/main/.claude/skills/get-history
Command: npx skills add https://github.com/cowwoc/styler --skill get-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

For auditing, compliance, or deep analysis, access to the raw, unfiltered conversation history is essential. Main agent summaries can be insufficient or biased. This Skill provides direct access to the complete session logs, ensuring transparency and accuracy.

Core Features & Use Cases

  • Direct Log Access: Retrieves the raw JSON Lines conversation file for the current session (.jsonl).
  • Session ID Integration: Leverages the automatically injected session ID from the get-session-id hook for reliable access.
  • Conversation Structure Parsing: Guides on using jq to extract specific event types (user messages, tool uses, tool results) and their content.
  • Audit & Analysis Support: Enables verification of user approvals, extraction of tool call context (like working directories), and analysis of agent invocations.
  • Use Case: During a compliance audit, use this Skill to retrieve the complete, raw conversation history. This allows an independent audit agent to verify protocol adherence, tool usage, and user approval checkpoints without relying on the main agent's potentially filtered view.

Quick Start

The session ID is automatically provided at SessionStart. Look for: ✅ Session ID: {uuid} Then, use it to access the conversation file: SESSION_ID="<your-session-id>" cat /home/node/.config/projects/-workspace/${SESSION_ID}.jsonl

Frequently Asked Questions about get-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access raw conversation history for audit and compliance verification?

Raw conversation history is stored in session files at `/home/node/.config/projects/-workspace/{session-id}.jsonl`. Retrieve your session ID from the startup message, then use `cat` or `jq` to extract the complete, unfiltered log of messages, tool calls, and results for independent audit analysis.

What information can I extract from session logs for compliance checking?

Session logs contain timestamped entries for user messages, tool invocations, tool results, and summaries. You can verify user approval checkpoints, trace tool call sequences with working-directory context, validate protocol adherence, and confirm agent behavior without relying on filtered summaries.

Can I use session history to investigate specific tool calls and their context?

Yes. The session file records each tool use with its parameters and results. Parse the `.jsonl` file with `jq` to filter by type, extract tool names and arguments, and correlate them with working-directory changes and user approvals to reconstruct the exact sequence of operations.

How do I parse and filter conversation history by event type?

Session files are JSON Lines format. Use `jq` to filter entries by type field—`message`, `tool_use`, `tool_result`, or `summary`—to isolate specific events. This enables targeted analysis of user input, agent tool decisions, and results without scanning the entire log.

What are the limitations of relying on agent summaries instead of raw logs?

Agent summaries may omit details, reflect bias, or fail to capture edge cases. Raw session logs provide the complete, unfiltered record of every interaction, making them essential when main-agent summaries are insufficient for compliance, audit, or post-hoc investigation.