AgentKaizen CLAUDE.md

AgentKaizen CLAUDE.md is an instructions file for Claude Code, Codex from TheIllusionOfLife/AgentKaizen. It costs 2,119 tokens per session, scanned B, original, Apache-2.0.

A project guide for AgentKaizen, a tool that measures and improves how command-line AI coding agents behave. It supports Codex and Claude Code through tracing, scoring, and tests run without an internet service.

In plain words
What is it for?
It helps run agents, compare instruction variants, score their results, run selected tests, and check code formatting and lint rules.
Why use it?
It provides the commands and project context needed to install, test, check, and evaluate changes to coding-agent instructions.

Instructions file for Claude CodeCodex

Written for Codex and Claude Code: runs codex exec, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions 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 instructions/theillusionoflife/agentkaizen/claude-md
Clone the repo
git clone --depth 1 https://github.com/TheIllusionOfLife/AgentKaizen

Made for: Claude Code, Codex.

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 AgentKaizen CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/theillusionoflife/agentkaizen/claude-md.svg)](https://agentmods.dev/instructions/theillusionoflife/agentkaizen/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/theillusionoflife/agentkaizen/claude-md"><img src="https://agentmods.dev/badge/instructions/theillusionoflife/agentkaizen/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,119 This file is loaded in full into every session.
When invoked 2,119 The same file — it is already loaded in full.
Security scan B 1 finding. 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.1 $0.02119 $0.02119
Opus 5 $0.01059 $0.01059
Sonnet 5 $0.00424 $0.00424
Haiku 4.5 $0.00212 $0.00212

Measured 5d ago against content hash a87dbcb1ea90, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

AgentKaizen CLAUDE.md scanned grade B with 1 finding 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- `ClaudeCodeRunner.run()` strips `CLAUDECODE` and all `CLAUDE_CODE_*` env vars so that `claude -p` works from within an active Claude Code session. Stripping `CLAUDECODE` alone is insufficient: `CLAUDE_CODE_ENTRYPOINT`
CLAUDE.md · 120 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Project Does

AgentKaizen measures and improves CLI-based AI coding agent behavior. It connects steering inputs (AGENTS.md, README.md, skills, Codex config) to measurable outcomes through tracing, scoring, and offline evaluation. Works locally out of the box; optionally integrates with W&B Weave for remote tracing and dashboards. Supports both Codex and Claude Code agents.

Commands

# Install
uv sync --group dev

# Tests
uv run --group dev pytest
uv run --group dev pytest tests/test_codex_scoring.py          # single file
uv run --group dev pytest tests/test_codex_scoring.py::test_fn  # single test

# Lint & format
uv run --group dev ruff check .
uv run --group dev ruff format --check .

# Primary CLI (unified entry point)
uv run agentkaizen --help
uv run agentkaizen run --prompt "Say only: ok"
uv run agentkaizen run --agent claude-code --prompt "Say only: ok"
uv run agentkaizen eval --cases evals/cases --variant-file evals/variants/example.json
uv run agentkaizen eval --runs 3 --cases evals/cases --variant-file evals/variants/example.json  # multi-run with dispersion
uv run agentkaizen eval --compare --cases evals/cases --variant-file evals/variants/example.json  # blind A/B comparison
uv run agentkaizen eval casegen --limit 20 --output evals/cases.generated.jsonl
uv run agentkaizen session sync --once                       # Codex sessions
uv run agentkaizen session sync --agent claude-code --once   # Claude Code sessions
uv run agentkaizen session score --trace-file path/to/trace.json

# Build package
uv build

CI runs pytest, ruff check ., and ruff format --check . via uv run --group dev (see .github/workflows/ci.yml).

Architecture

src/agentkaizen/ is the canonical package.

Package modules

Module Responsibility
core.py Shared infra: JSONL parser, PII redaction, W&B env resolution, prompt building
oneshot.py One-shot traced agent run CLI (agentkaizen run)
evals.py Offline variant comparison: workspaces, CodexVariantModel, scoring/ranking
casegen.py Generate draft eval cases from recent traces (local or Weave)
session_sync.py Ingest local Codex sessions into traces; delegates to claude_code_session for --agent claude-code
claude_code_session.py Parse Claude Code JSONL sessions (~/.claude/projects/): discovery, trace building, sync flow
session_scoring.py Score interactive session traces (heuristics + optional external judge); evidence-based claim extraction
scoring.py Deterministic scorer functions (substring, length, JSON, schema, sections)
cli.py Unified agentkaizen entry point with subcommand dispatch
config.py Load [tool.agentkaizen] from pyproject.toml; merge with CLI args
_weave_compat.py HAS_WEAVE flag, weave_init(), weave_op() shims for optional Weave
_local_eval.py Local evaluation framework: LocalEvaluation, LocalModel, LocalScorer; evaluate_n() for multi-run
_comparator.py Blind A/B comparator: ComparatorScorer, ComparatorResult, position-bias-free comparison
_trace_log.py Local JSONL trace persistence and querying (~/.agentkaizen/traces.jsonl)
_pii.py Local regex-based PII redaction (fallback when Weave is absent)
runners/ AgentRunner protocol + CodexRunner, ClaudeCodeRunner, registry

Read the full file on GitHub · 120 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. 5d ago First seen · 120 lines · 2,119 tokens per session scan B a87dbcb1ea90

Subscribe to this mod's changes

AgentKaizen CLAUDE.md is an instructions file published in the GitHub repository TheIllusionOfLife/AgentKaizen (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 2,119 tokens to every session, about $0.0106 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens