brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: /insights writes an HTML report on how you use Claude Code

Claude
~/tips/tip-claude-code-insights-report

/insights

Analyses your recent sessions on this machine and writes an HTML report with suggestions.

Token counters tell you what Claude Code cost. They don’t tell you how you work with it. That’s a different question, and Claude Code has a command for it.

/insights

It analyses your recent sessions on this machine and writes an HTML report: which projects you work in, how you use Claude Code, where things go wrong (misunderstood requests, buggy code) and features to try. One run analyses up to 200 sessions it hasn’t seen before and skips very short ones. If sessions were left out, the header shows the count with the total in parentheses, for example 200 sessions (412 total).

The latest report goes to ~/.claude/usage-data/report.html. Each run also saves a timestamped copy in the same folder, so older reports stay put. Like other session data, they are removed at startup once they’re older than cleanupPeriodDays, which is 30 days by default.

Caveats:

  • The analysis runs through your own provider and account, and the tokens count against your plan or API usage.
  • Sessions from other devices and from claude.ai are not included.
  • It’s not available in cloud sessions.

It works on any plan and with any provider. When auto mode is available and your recent sessions mostly ran without it, the report can also estimate how many permission prompts auto mode could have handled.

It’s built from your own sessions, so I’d read it before sharing it with anyone.

Further reading: Claude Code docs: analyze your usage patterns

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link