Local-first analysis of Claude Code sessions: where tokens go and what to change in prompts, CLAUDE.md, skills and workflow
Sexy Agent Tuner
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
See where your coding agent burns tokens, and what to change so the next session doesn't.
Local-first analysis of Claude Code sessions: prompts, tools, context growth, and concrete fixes
for your prompts, CLAUDE.md , skills, subagents and scripts.
---
Why
Claude Code writes every session to ~/.claude/projects/**/*.jsonl. These logs say exactly what
happened (every prompt, tool call, result and token count), but nobody reads them: one message is
split across lines, tool results live apart from their calls, and subagents write to separate files.
So the expensive questions go unanswered:
- Why did this session process **236M tokens**?
- Why does the agent re-read the same ten files at the start of **every** task?
- Which instructions do I keep **retyping** that should live in CLAUDE.md or a skill?
Sexy Agent Tuner parses those logs, measures what happened, and turns the patterns into suggestions
you can copy. Metrics and rules are computed, not guessed, and every suggestion links back to the exact
events that triggered it. An optional AI pass reads your prompts for what the rules can't see, such as the
same request worded differently, and is held to the same standard: each finding cites the prompts behind it.
Features
- **Repos → prompts → sessions.** Sessions are grouped by repository. Open a repo to see every prompt
you typed there, with each session's size (processed tokens, peak context) so the heavy ones stand out.
- **Findings, not dashboards.** Each suggestion separates the **fact** (measured) from the
**hypothesis** (what it might mean) and gives a **snippet** to paste into a prompt or CLAUDE.md,
plus the expected benefit, the possible downside and the evidence.
- **Across sessions and repos.** Finds instructions you repeat, files every session re-explores and
tool chains the agent keeps rebuilding, then says whether they belong in CLAUDE.md, a skill or slash
command, a subagent, or a script.
- **Timeline.** Behavior lanes (read, search, edit, test, MCP, subagents) and context growth on one axis.
Click any mark to see the event's full input and output.
- **AI analysis of prompts (optional).** Claude reads your prompts, groups intents you repeat even when worded
differently, and suggests CLAUDE.md rules, skills, slash commands, subagents or scripts, each traced back to the prompts.
- **Apply, then measure.** Most suggestions can be applied in one click: you review and edit the text, and it goes
into CLAUDE.md, a new subagent, skill or slash command, or the default model in ~/.claude/settings.json. Each
applied change is tracked, and later sessions are compared with earlier ones: does the same finding come back,
tokens per prompt, exploration share, failed tool calls.
- **Secrets check.** Flags API keys, tokens and passwords that ended up in your session logs (shown masked), and
redacts them from anything the AI analysis sends.
- **Local first.** Everything is parsed and stored on your machine (~/.awo/awo.db). Only the AI analysis sends
anything off the machine (prompt text and session sizes, to the Anthropic API), and only when you press its button.
Screenshots
**Repos.** Every project you've used the agent in, with its sessions and total tokens.
**Repo.** What recurs across this repo's sessions, the AI analysis of its prompts, and every prompt grouped
by session. Size bars show the big sessions at a glance, and a click opens the session at that prompt.
**All repos.** Patterns that span several projects (candidates for ~/.claude/CLAUDE.md, a personal
skill, a subagent or a reusable script), plus the AI analysis across every repo.
**Timeline.** What the agent did, step by step, and how the context grew.
Quick start
**Requirements:** Go 1.25+, a C compiler (SQLite via cgo), Node 20+, and the