Stop Wasting Motion: The Power of Claude Code's /insights
If you use Anthropic's Claude Code and you're not running /insights, you're missing the best feedback loop in the product.
If you use Anthropic's Claude Code and you're not running /insights, you're probably missing the best feedback loop in the product.
/insights looks at your last 30 days of sessions and gives you a local HTML report on how you actually work—a useful one. It functions as a highly observant, personalized developer coach.
What You Get
When you run the command, you receive an immediate breakdown of your technical habits:
- Metrics at a glance: Tokens used, session length, files touched, lines changed, and Git activity.
- Friction identification: Highlighting recurring bottlenecks, like bad edits, buggy code, or instructions Claude keeps misreading.
- Actionable config: Ready-to-paste
CLAUDE.mdrules based precisely on what you repeat over and over. - Workflow upgrades: Suggestions for custom commands, hooks, and automated improvements.
The best part? It runs locally. Your code and session data stay entirely on your machine. I like tools that show me where I'm wasting motion. This is one of them.
How It Works: The Analysis Pipeline
Behind the scenes, Claude executes a sophisticated 7-stage pipeline running entirely locally:
- It gathers metadata from up to 50 recent sessions (filtering out very short or automated agent sessions).
- Using a lightweight LLM (Claude 3 Haiku), it evaluates qualitative aspects of your work—called "facets"—such as your goals, satisfaction levels, and moments of friction.
- These facets are cached locally to speed up future reports.
No code or session data is ever sent to external servers, ensuring complete privacy and security.
Key Sections of the Report
1. Friction Analysis
This section acts as a mirror for your development workflow. It points out when Claude consistently misunderstands instructions, edits the wrong files, or generates buggy code.
Crucially, it also analyzes your behavioral patterns—such as highlighting if you frequently interrupt the AI before it finishes (a "rage-quit" rate). This often indicates that Claude wasn't given the right context or tools to succeed in the first place.
2. Actionable CLAUDE.md Rules
Based on the instructions you find yourself constantly repeating, the report automatically generates custom rules. You can copy and paste these directly into your project's CLAUDE.md file so Claude inherently respects your architectural choices, testing patterns, or design systems in all future sessions.
3. Custom Skills and Hooks
For repetitive tasks, /insights recommends creating custom skills (like /preflight or /review). It also suggests "Hooks" that automatically run shell commands, linters, or tests immediately after code edits.
Taking It Further: Community Automation Tools
While the default HTML report is strictly read-only, developers have built open-source tools like the claude-insights CLI to automate the application of its advice.
This CLI tool parses your HTML report to automatically generate:
- A prioritized to-do list
- Ready-to-use
CLAUDE.mdadditions - Actual
.SKILL.mdfiles
Crucially, it embeds your real failure narratives into these custom skills, forcing Claude to run through a verification checklist of its past mistakes before claiming a task is complete.
The Verdict
Run /insights once a month.
This allows you to track your evolution as a developer, apply new suggestions as your habits change, and continuously refine your AI-assisted workflow. If you want to push it further, use the open-source CLI to turn that report into actual, executable rules and skill files.
More writing from the archive
The Hidden Emotions Shaping AI Behavior
Why AI models develop 'functional emotions' during training—and why understanding their internal 'desperation' is key to building safer products.
Where AI Belongs in a Product and Where It Does Not
A practical framework for deciding where AI creates real product value, where it adds noise, and how to evaluate the right first step.
Projects connected to this thinking
Open Brain: Building a Personal Knowledge Backend with AI
Open Brain: Building a Personal Knowledge Backend with AI What if your notes could think? Not in a sci fi way — but in a practical, "I wrote something three months ago th…
Raiffeisen Bank: End-to-End Online Account Opening
Raiffeisen Bank: End to End Online Account Opening When Raiffeisen Bank decided to let customers open a bank account entirely online — no branch visit required — they kne…