Beginner
Install AgentSight, run your first diagnose, and build a weekly habit that keeps your Claude Code sessions efficient.
See where your tokens go. Optimize your Claude Code workflow.
AgentSight is an open-source Rust CLI that parses your Claude Code session logs and surfaces usage analytics, cache efficiency metrics, and cost estimation — so you can work smarter, not more expensively.
Install with Homebrew:
brew tap RealNerd/agentsight && brew install agentsight
Or with Cargo: cargo install agentsight
After installing, run agentsight diagnose in any project to get an instant efficiency report:
$ agentsight diagnose
── Diagnose: my-project ──────────────────────────────────
Project: work/my-project
Tokens: 318,293 across 17 turns (35m)
Cache: 70.6% hit ratio
Cost: $4.31
── Cache Stability ───────────────────────────────────────
Classification: STABLE
Cache front-loading looks healthy.
── Context Growth ────────────────────────────────────────
Context size remained stable across the session.
── Tool Patterns ─────────────────────────────────────────
No concerning tool patterns detected.
── Recommendations ───────────────────────────────────────
Your session looks efficient. No changes needed.
Or let Claude Code do it for you. Install the slash command skill (not included automatically — you run this once after installing the CLI):
$ agentsight install-skill agentsight-diagnose
Then type /agentsight-diagnose inside Claude Code. It will run the analysis, read your CLAUDE.md, and suggest specific improvements.
Install AgentSight, run your first diagnose, and build a weekly habit that keeps your Claude Code sessions efficient.
Understand every metric, optimize cache efficiency, compare sessions before and after CLAUDE.md changes.
Cross-project benchmarking, model distribution analysis, the web dashboard, JSON scripting, and contributing.
AgentSight reads Claude Code's JSONL session logs from ~/.claude/projects/. It is read-only — it never modifies your sessions or configuration. It tracks:
AgentSight is dual-licensed under MIT and Apache-2.0. Contributions welcome.