agent-profiler CLAUDE.md

Repository instructions for agent-profiler, a local viewer for Claude Code conversation records. The viewer turns transcript files into a tree and timeline showing what happened during each session.

In plain words
What is it for?
Use them when changing agent-profiler or interpreting its transcript processing and interface.
Why use it?
They define the project’s source of truth and explain important terms, helping agents avoid confusing model requests with tool actions.

Instructions file

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/devonperoutky/agent-profiler/claude-md
Clone the repo
git clone --depth 1 https://github.com/DevonPeroutky/agent-profiler
Per session 4,101 This file is loaded in full into every session.
When invoked 4,101 The same file — it is already loaded in full.
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.04101 $0.04101
Opus 5 $0.02050 $0.02050
Sonnet 5 $0.00820 $0.00820
Haiku 4.5 $0.00410 $0.00410

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

Security

Grade A, and why

agent-profiler CLAUDE.md 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.md · 178 lines

How it starts

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

agent-profiler

A local trace viewer for Claude Code conversations. Reads session transcripts directly from disk and renders them as a span-tree waterfall. A React + Vite app with a small middleware plugin — no separate server process, no hooks, no OTEL SDK.

Communication style

Speak simply and explain things clearly. Avoid jargon — when a domain term is genuinely necessary (e.g. requestId, tool_use), define it the first time it appears in a response. Prefer plain-English descriptions over acronyms and library-internal naming. If a concept can be explained with a short sentence instead of a technical label, use the sentence.

North Star

Claude Code's own per-session JSONL transcripts (~/.claude/projects/<project-slug>/<sessionId>.jsonl) are the source of truth. The viewer is a pure (transcript → SpanNode tree → JSON) pipeline. If the UI and the raw transcript disagree about what happened, the transcript is right.

Core vocabulary — inference vs. tool call

These two are not the same thing. Confusing them is the largest recurring source of bugs in this transformer.

Inference. A single request to the remote Anthropic API. Something that costs money, takes wall-clock time, and ends with the model returning a response. Has a requestId — one per API round-trip. Whatever content the model returned (thinking, text, tool_use, or any combination) belongs to that one inference and shares its requestId. The state layer mirrors API round-trips 1:1: one inference span per distinct requestId within a slice, regardless of what content kinds the response contained. A response with [thinking, text, tool_use] is one inference, not three. How that inference is rendered (waterfall bar, chat bubble, both, neither) is a UI decision driven by has_* flags and the events list — the state layer is content-kind-agnostic.

The canonical predicate for "an assistant record that counts" is isCanonicalAssistantRecord (type === 'assistant', !isApiErrorMessage, has message.usage, has non-empty requestId). It gates both the inference emitter and token dedupe (dedupeUsagesByRequestId in lib/traces/traces.js) — inferences.length equals agent_trace.turn.request_count by construction. Drift here recreates the count discrepancy on any turn with API errors.

Read the full file on GitHub · 178 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 · 178 lines · 4,101 tokens per session scan A c63f71f30084

Subscribe to this mod's changes

agent-profiler CLAUDE.md is an instructions file published in the GitHub repository DevonPeroutky/agent-profiler (13 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 4,101 tokens to every session, about $0.0205 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.

Related

Other instructions, from other repositories

claude-code-tresor CLAUDE.md

Instructions for alirezarezvani/claude-code-tresor, covering claude.md - development guide, 🎯 repository purpose, 🏗️ architecture, 🛠️ common development commands and building & testing.

alirezarezvani/claude-code-tresor · 5,338 tokens

pi-coding-agent-forge AGENTS.md

Instructions for Firstp1ck/pi-coding-agent-forge, covering repository documentation rules, documentation goal, required documentation layers, readme.md — human guide and technical.md — advanced user reference.

Firstp1ck/pi-coding-agent-forge · 2,075 tokens

kkRepo java-server.instructions.md

Instructions for klboke/kkRepo, a project described as: kkRepo is a Nexus-compatible, self-hosted artifact repository for Maven, npm, PyPI, Go, Helm, NuGet, Cargo/Rust, Dart/Pub, Docker/OCI, RubyGems, and Yum artifacts. It supports one-click migration from Nexus to kkRepo.

klboke/kkRepo · 191 tokens

huly-mcp CLAUDE.md

Instructions for dearlordylord/huly-mcp, covering project instructions, design principle: llm-first api, project harness (copy to new projects), package manager and verification.

dearlordylord/huly-mcp · 3,317 tokens

pitway CLAUDE.md

Instructions for thixpin/pitway: This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. The project's full instructions live in AGENTS.md — this file only points there so the two can never drift apart.

thixpin/pitway · 102 tokens

skills AGENTS.md

Instructions for vanducng/skills, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and documentation sync.

vanducng/skills · 971 tokens