analyze-chat

analyze-chat is a command for Claude Code from lebek/modmixer. It costs 24 tokens per session (438 once invoked), scanned A, original, MIT.

A command that audits a ModMixer chat session, which is a conversation between a user and an AI agent. It examines the agent's decisions, token use, tool choices, and supporting setup.

In plain words
What is it for?
Use it to review a selected or most recently updated session and decide what, if anything, should change in the agent harness, meaning the system around the model.
Why use it?
It helps identify wasted conversation context, repeated tool calls, weak decisions, or problems in the instructions and available tools.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lebek/modmixer/analyze-chat
Clone the repo
git clone --depth 1 https://github.com/lebek/modmixer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze-chat

README.md
[![agentmods](https://agentmods.dev/badge/commands/lebek/modmixer/analyze-chat.svg)](https://agentmods.dev/commands/lebek/modmixer/analyze-chat)
Your own site
<a href="https://agentmods.dev/commands/lebek/modmixer/analyze-chat"><img src="https://agentmods.dev/badge/commands/lebek/modmixer/analyze-chat.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.00438
Opus 5 $0.00012 $0.00219
Sonnet 5 $0.00005 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 3d ago against content hash d53a425c4241, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze-chat scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/analyze-chat.md · 31 lines

What it actually says

/analyze-chat

Audit a ModMixer chat session. Goal: understand how the session went and what (if anything) the harness should change. You decide how to analyze and what to surface — pick the lens that fits what you actually see.

Lenses worth considering (non-exhaustive — use what fits):

  • Agent intelligence — did the model understand the request, make good judgment calls, recover from mistakes?
  • Token efficiency — where is context going, what's wasted, what could be smaller?
  • Tool usage — right tool for the job, parallelism where possible, avoidable repeats or errors?
  • Harness quality — system prompt, available tools, skills, hooks — anything missing or misfiring?

$ARGUMENTS — case-insensitive substring match against the conversation title or scope.modFolder. If empty, pick the conversation with the largest updatedAt.

Locate the session

The modmixer-artifacts skill describes the on-disk layout — invoke it if you need paths. Read $env:APPDATA\ModMixer\conversations.json (Windows). Schema: { conversations: [{ id, sessionFile, scope: {type, modFolder?}, title, updatedAt }], activeByMod }.

  • No argument → largest updatedAt.
  • With argument → substring match. If >1 match, list candidates with updatedAt and stop. If 0, say so and stop.

The session file is JSONL and can be large — stream it with Node/Bash rather than Reading the whole thing into context.

Analyze and report

Up to you. Be concrete — cite tool-call indices, byte counts, turn numbers when they support a point. Skip sections that wouldn't add signal. Keep the report tight; if you're padding, stop.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 31 lines · 24 tokens per session scan A d53a425c4241

Subscribe to this mod's changes

analyze-chat is a command published in the GitHub repository lebek/modmixer (19 stars, last pushed 22d ago), licensed MIT. It adds 24 tokens to every session and 438 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.