6 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
The article explains the /insights command in Claude Code, which generates an HTML report analyzing user interaction patterns. It details the multi-stage analysis process, including session filtering, metadata extraction, and qualitative assessments to improve user workflows.
If you do, here's more
The /insights command in Claude Code generates an HTML report that analyzes user session data. It helps you see how you interact with the system, highlighting what's working well and where improvements are needed. The report is saved as an interactive HTML file in your home directory, specifically at ~/.claude/usage-data/report.html.
Generating these insights involves several steps. First, it collects session logs and filters out irrelevant data, like internal operations and short sessions. It extracts key metadata, including session IDs, start times, duration, and user messages. If a session transcript is too lengthy, it's chunked and summarized to capture essential details before qualitative analysis begins. Each session is assessed to extract structured "facets," which provide insights into user goals, satisfaction levels, and any friction encountered.
The analysis process then aggregates data from multiple sessions, using various prompts to analyze statistics like total messages, duration, and tool usage. This comprehensive approach allows for a detailed overview of how users interact with Claude Code, identifying patterns in session behavior and satisfaction. By caching facets, subsequent runs are more efficient, further enhancing the utility of the insights generated.
Questions about this article
No questions yet.