How Claude Code’s /insights Command Works


The /insights command in Claude Code generates a comprehensive HTML report analyzing your usage patterns across all your Claude Code sessions. It’s designed to help you understand how you interact with Claude, what’s working well, where friction occurs, and how to improve your workflows.

It’s output is really cool and I encourage you to try it and read it through!

Command: /insights

Description: “Generate a report analyzing your Claude Code sessions”

Output: An interactive HTML report saved to ~/.claude/usage-data/report.html

But what’s really happening under the hood? Let’s trace through the entire pipeline.

Continue reading “How Claude Code’s /insights Command Works”