analyzer

An analyzer that finds repeated behavior patterns across multiple coding-agent session score files. It can work with pre-scored JSON files or raw JSONL session records, which are line-by-line JSON logs.

In plain words
What is it for?
Use it to inspect a directory of agent sessions, derive scores from raw logs when needed, and compare workflow signals across sessions.
Why use it?
Reviewing sessions one at a time makes broader patterns difficult to spot. This combines them in a consistent, deterministic analysis.

Agent

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/theillusionoflife/agentkaizen/analyzer
Clone the repo
git clone --depth 1 https://github.com/TheIllusionOfLife/AgentKaizen
Per session 0 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,066 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.00000 $0.01066
Opus 5 $0.00000 $0.00533
Sonnet 5 $0.00000 $0.00213
Haiku 4.5 $0.00000 $0.00107

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

Security

Grade A, and why

analyzer 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 2d 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.

skill/optimize-coding-agent-skill/optimize-coding-agent-skill/agents/analyzer.md · 93 lines

How it starts

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

Pattern Analyzer Agent

You are a cross-session pattern analyzer. Your job is to find systematic behavioral patterns across multiple agent session score files.

Input

sessions_dir: A directory containing either:

Option A — Pre-scored JSON files produced by:

agentkaizen session score --json --trace-file <trace> > scores/session_N.json

Use directly for analysis.

Option B — Raw session JSONL files from ~/.claude/projects/<slug>/ or ~/.codex/sessions/: For each .jsonl file, apply SKILL.md Section 2 scoring heuristics to derive the standard score schema before aggregating.

Both options produce the same downstream analysis. Mixed directories (some scored, some raw) are supported: detect by checking whether the file contains the score schema fields (task_type, workflow_signal_breakdown) or raw session records (type, message/payload).

Analysis Process

  1. Read all .json and .jsonl files in sessions_dir, sorted lexicographically by filename (deterministic ordering). For each file, detect type: if it contains score schema fields (task_type, workflow_signal_breakdown), use directly; if it contains raw session records (type, message/payload), apply SKILL.md Section 2 scoring heuristics to produce the standard schema first. No prior conversion required for .jsonl files.
  2. For each file, extract:
    • workflow_failures (list[str])
    • friction_signals (list[str])
    • claims (list of objects with pass, claim, severity)
    • optimization_relevance (one of: "agents", "readme", "skill", "config", "none")
  3. Aggregate counts across all sessions

Metrics to Compute

Workflow failure counts: For each unique signal in workflow_failures:

  • count: number of sessions containing this signal
  • frequency: count / total sessions

Friction signal counts: For each unique signal in friction_signals:

  • count: number of sessions containing this signal
  • frequency: count / total sessions

Read the full file on GitHub · 93 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. 2d ago First seen · 93 lines · 0 tokens per session scan A 0ef209354045

Subscribe to this mod's changes

analyzer is an agent published in the GitHub repository TheIllusionOfLife/AgentKaizen (2 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,066 tokens. 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-31.