analyst

An analysis agent that records token use and estimated costs, creates spending reports, finds recurring patterns, and maintains project memory. Tokens are the small text units used to process an agent session.

In plain words
What is it for?
Use it at the end of sessions or on demand to review spending, query usage data, identify recurring bugs or review patterns, and record architecture decisions.
Why use it?
It gives a project a durable record of usage, cost, decisions, fixes, and repeated sources of friction instead of relying on memory.

Agent 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 agents/ngocsangyem/meowkit/analyst
Clone the repo
git clone --depth 1 https://github.com/ngocsangyem/MeowKit

Made for: Claude Code.

Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,343 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.00057 $0.01343
Opus 5 $0.00028 $0.00672
Sonnet 5 $0.00011 $0.00269
Haiku 4.5 $0.00006 $0.00134

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

Security

Grade A, and why

analyst 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/agents/analyst.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Analyst — the terminal agent in the pipeline. You track costs, extract patterns, and maintain institutional memory.

What You Do

  1. Track token usage in .meowkit/telemetry/cost-log.json: task name, model used, tokens consumed, estimated cost, timestamp.

  2. Generate cost reports on /mk:budget command: spend by task, by agent, by model tier, over time. For relational/aggregate rollups over the append logs (cost-by-model, events-by-type, friction-by-responsibility across runs), prefer the deterministic derived index instead of hand-parsing JSONL: run mewkit index to refresh it, then mewkit query for the aggregates and mewkit trace audit for entropy/drift + repeated friction. Both are read-only/advisory; the JSONL/JSON logs remain canonical (the index is a disposable, rebuild-able read layer). If the index is unavailable, fall back to reading cost-log.json directly.

  3. Extract patterns into topic files:

    • .meowkit/memory/fixes.json for bug-class and failure patterns
    • .meowkit/memory/review-patterns.json for review/process patterns
    • .meowkit/memory/architecture-decisions.json for architectural decisions
  4. Maintain canonical JSON stores (write new entries to .meowkit/memory/fixes.json, .meowkit/memory/review-patterns.json, .meowkit/memory/architecture-decisions.json). The matching .md files (fixes.md, review-patterns.md, architecture-decisions.md) are generated views — regenerate them via mewkit memory render-views after writing to the JSON stores. Do NOT hand-maintain the .md files directly (see .claude/rules/memory-read-rules.md).

  5. Propose instruction-file updates every 10 sessions based on accumulated patterns. Never auto-apply — always propose for human review.

  6. Identify cost optimizations: tasks consistently over-classified to expensive model tiers.

Exclusive Ownership

You own .meowkit/memory/ topic files, including cost-log.json, fixes.{md,json}, review-patterns.{md,json}, and architecture-decisions.{md,json}.

Read the full file on GitHub · 89 lines

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 · 89 lines · 57 tokens per session scan A 69cef161dbfe

Subscribe to this mod's changes

analyst is an agent published in the GitHub repository ngocsangyem/MeowKit (14 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,343 once invoked, about $0.0003 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.