500xEngineer.

All postsSHORT3 min read

Claude Code's /insights: Where Your Sessions Go Wrong

How Claude Code's built-in /insights command reports on recent sessions on this machine, its limits, and my workflow audit idea.

Claude Code misunderstanding your requests again? According to Anthropic's docs, its built-in /insights command writes an HTML report on your recent sessions on this machine. Anthropic's docs describe a report covering your work, friction points and features to try.

Video not loading? Watch the Short on YouTube

What /insights is

Type /insights in Claude Code. It's an existing built-in command for reviewing how you work with Claude Code. The report looks at recent sessions on this machine and includes suggestions for using Claude Code more effectively.

That's the scope to keep in mind when reading it: recent sessions from the machine where you run the command.

What the report covers

The commands docs name these parts:

  • Projects: which projects you work in.
  • Usage: how you use Claude Code.
  • Friction: where things go wrong, including misunderstood requests or buggy code.
  • Features: features to try.

I'd start with the friction section. A repeated misunderstanding is what I'd want to review before deciding whether to change my instructions. That's my reading approach, and the suggestions still need a human review.

Where the report lives

Claude Code writes the latest report to ~/.claude/usage-data/report.html. It also saves a timestamped copy of each run in the same directory, so earlier reports aren't overwritten.

When sessions are left out, the report header shows the analyzed count with the total in parentheses. The docs' example is 200 sessions (412 total). Those are example counts from the docs.

There's also a conditional auto mode estimate. When auto mode is available to the session and your recent sessions mostly ran without it, the report can include an estimate of how many permission prompts auto mode could have handled across those sessions.

The limits to read first

One run analyzes up to 200 sessions it hasn't seen before and skips very short ones. Keep those qualifiers together when you describe what the report covers.

Sessions from other devices and claude.ai aren't included, and /insights isn't available in cloud sessions. It writes a report on recent sessions on this machine.

It works on any plan and with any provider. The analysis runs through the same provider and account as your regular sessions, and its tokens count against your plan or API usage. It uses model calls through that provider, so account for that when deciding to run it.

Reports are deleted after 30 days by default, controlled by cleanupPeriodDays. At startup, Claude Code removes files older than that setting on the same schedule as the rest of your session data.

The suggestions are drafts. Review them before you act on them. The report can name your projects, so read it before you share it and choose what to share.

What I'd do with it: my opinion, no income guaranteed

I'd run /insights about once a month and turn each repeated friction point into a reviewed CLAUDE.md rule or a skill. That follow-up is my idea. The docs describe report suggestions, and turning them into rules or skills is the work I'm proposing.

A CLAUDE.md file contains instructions you write to give Claude persistent context. A skill uses a SKILL.md file with instructions that Claude adds to its toolkit. The skills docs suggest creating one when you keep pasting the same instructions, checklist or multi-step procedure into chat.

I'd offer that review as a workflow audit for client teams. Each developer runs /insights on their own machine and account, using their own plan or API usage. They choose what to share from the report. I'd review the repeated friction with them and write reviewed CLAUDE.md rules and skills for their repos. That's a service idea with no income guaranteed.

Daily email

Get each breakdown in your inbox.

One email each evening, right after the Short goes live: the AI tool it covers, the full write-up with sources, and how to get paid for it. Free, and you can unsubscribe anytime.

Read past emails on Substack

Sources

All postsWatch on YouTube