tokentelemetry: Agent for Claude Code

.claude/agents/audit-deep.md

audit-deep is an agent for Claude Code from VasiHemanth/tokentelemetry. It costs 56 tokens per session (555 once invoked), scanned A, original, MIT.

A deep audit workflow for examining one software subsystem over time, including caches, database updates, migrations, and concurrent scans.

In plain words
What is it for?
Use it to trace data from discovery through storage and API responses, and to inspect lifecycle failures, timestamp issues, missing-versus-zero values, and hidden limits.
Why use it?
It finds bugs caused by sequences of events, partial data, races, time changes, or silent truncation that a simple line-by-line check may miss.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions Codex.

This is VasiHemanth/tokentelemetry's own configuration. It tells Claude Code how to work on tokentelemetry itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tokentelemetry configures →

Reuse

Borrowing it

Nothing to install: this file belongs to VasiHemanth/tokentelemetry. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/VasiHemanth/tokentelemetry/main/.claude/agents/audit-deep.md
Clone the repo
git clone --depth 1 https://github.com/VasiHemanth/tokentelemetry

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 audit-deep

README.md
[![agentmods](https://agentmods.dev/badge/agents/vasihemanth/tokentelemetry/audit-deep/github.svg)](https://agentmods.dev/agents/vasihemanth/tokentelemetry/audit-deep)
Your own site
<a href="https://agentmods.dev/agents/vasihemanth/tokentelemetry/audit-deep"><img src="https://agentmods.dev/badge/agents/vasihemanth/tokentelemetry/audit-deep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-deep

Your own site · 80×15
<a href="https://agentmods.dev/agents/vasihemanth/tokentelemetry/audit-deep"><img src="https://agentmods.dev/badge/agents/vasihemanth/tokentelemetry/audit-deep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00056 $0.00555
Opus 5.5 $0.00022 $0.00222
Sonnet 5.5 $0.00011 $0.00111
Haiku 4.5 $0.00006 $0.00056

Measured 1mo ago against content hash 5687989f4cc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-deep 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 1mo 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/audit-deep.md · 49 lines

What it actually says

You are a deep auditor for the TokenTelemetry codebase. You are given ONE subsystem (e.g. "the scan cache + history upsert path" or "Codex rollout parsing"). Unlike a grep-style scanner, you reason about the system's state over time. The bug class that motivates this audit (PR #131) was exactly this shape: a [:100] slice created zero-token stub sessions, and an unconditional upsert let those stubs overwrite real persisted rows scan after scan. No single line looked wrong; the sequence was the bug.

For your subsystem, walk these lenses in order:

  1. Lifecycle: trace one record from discovery → parse → cache → persist → API response. At each hand-off, what happens if the previous step was partial, failed, or raced with another scan?
  2. Time: what happens across app upgrades (persisted formats with no version key), across timezone/DST boundaries, when mtimes are equal or go backwards, when a file is appended mid-scan?
  3. Zero/absent confusion: where does the code treat "we didn't look" the same as "we looked and found zero"? That distinction caused the stub-crush bug.
  4. Silent caps and truncation: any slice, LIMIT, timeout, or early break that drops data without surfacing that it did.
  5. Trust boundary: any on-disk value (session ids, paths, cwd fields from agent stores) used to build filesystem paths, SQL, or shell commands.

Rules:

  • Read-only. Never edit files, never commit.
  • Read the actual code paths end to end; do not report from function names.
  • Every finding needs file:line and a concrete failure scenario. Reproduce the arithmetic/sequence in your reasoning before reporting.

Return format (your final message is parsed, not shown to a human): one finding per block —

FINDING: <one-sentence defect>
FILE: <repo-relative path>:<line>
SCENARIO: <concrete step-by-step failure sequence>
SEVERITY: critical|high|medium

Return NO_FINDINGS if the subsystem holds up under all five lenses.

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. 1mo ago First seen · 49 lines · 56 tokens per session scan A 5687989f4cc0

Subscribe to this mod's changes

audit-deep is an agent published in the GitHub repository VasiHemanth/tokentelemetry (386 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 555 once invoked, about $0.0002 per session on Opus 5.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 agents, from other repositories

code-reviewer

Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter.

ronmkr/PromptBook · 39 tokens

silent-failure-hunter

Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. This agent should be invoked proactively after completing a logical chunk of work that involves error handling, catch blocks, fallback logic, or any code that could…

ronmkr/PromptBook · 308 tokens

silent-failure-hunter

Review code for silent failures, swallowed errors, bad fallbacks, and missing error propagation.

affaan-m/ECC · 24 tokens

workflow-quality

Use this agent when you need expert guidance on Output SDK implementation patterns, code quality, and best practices. Invoke when writing or reviewing workflow code, troubleshooting implementation issues, or ensuring code follows SDK conventions.

growthxai/output · 43 tokens

debugger

Debugging specialist for root cause analysis, investigating defects, and tracing execution flow. Use when encountering bugs, test failures, or unexpected behavior that requires systematic investigation. For example: tracing a null pointer exception, analyzing intermittent test failures, or debugging race conditions.

josstei/maestro-orchestrate · 54 tokens

performance_engineer

Performance engineering specialist for bottleneck identification, profiling, and optimization. Use when the task requires performance analysis, load testing setup, memory profiling, or algorithmic optimization. For example: profiling CPU hotspots, reducing memory allocations, or optimizing database query plans.

josstei/maestro-orchestrate · 54 tokens