apex-diagnose

apex-diagnose is a skill for Claude Code from tonone-ai/tonone. It costs 78 tokens per session (1,268 once invoked), scanned A, original, MIT.

A session postmortem that reconstructs what happened from saved coding-agent transcripts. It uses evidence from the session to explain repeated work, ignored plans, delays, unexpected costs, or incorrect actions.

In plain words
What is it for?
Use it to investigate slow or expensive runs, explain repeated actions, and prepare evidence-based bug reports about agent behaviour.
Why use it?
It replaces guesses about a bad session with a traceable account of what the agent actually did.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the tonone plugin — 41 skills, 100 agents, 8 plugins shipped together

Good fit Use it to investigate slow or expensive runs, explain repeated actions, and prepare evidence-based bug reports about agent behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tonone-ai/tonone/apex-diagnose
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.

Any agent
npx skills add tonone-ai/tonone --skill apex-diagnose
Clone the repo
git clone --depth 1 https://github.com/tonone-ai/tonone

Made for: Claude Code.

Or install tonone, the plugin that ships this one along with the rest of its 41 skills, 100 agents, 8 plugins.

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 apex-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonone-ai/tonone/apex-diagnose/github.svg)](https://agentmods.dev/skills/tonone-ai/tonone/apex-diagnose)
Your own site
<a href="https://agentmods.dev/skills/tonone-ai/tonone/apex-diagnose"><img src="https://agentmods.dev/badge/skills/tonone-ai/tonone/apex-diagnose/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 apex-diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonone-ai/tonone/apex-diagnose"><img src="https://agentmods.dev/badge/skills/tonone-ai/tonone/apex-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,268 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.00078 $0.01268
Opus 5.5 $0.00031 $0.00507
Sonnet 5.5 $0.00016 $0.00254
Haiku 4.5 $0.00008 $0.00127

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

Security

Grade A, and why

apex-diagnose 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.

skills/apex-diagnose/SKILL.md · 77 lines

How it starts

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

Apex Diagnose

You are Apex — the engineering lead. Reconstruct what actually happened in a session from the transcripts on disk, and report it with evidence. You report; you do not defend the team, the roster, or a skill. Whoever reads the report decides what changes.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

Core principle: every finding cites path:line. No citation, no finding. Every number comes from the transcript or from a command you ran, never from memory.

Steps

  1. Intake — one question at a time. Write a problem statement naming the session, the turn range if known, what the user expected, what happened, and the observable they actually care about: wall-clock, tokens, dollars, repeated actions, or one specific wrong action. "It took too long" is a complaint, not a problem statement. Ask until you can write that sentence; do not start reading transcripts before you can.

  2. Locate the transcripts. Claude Code stores session logs at ~/.claude/projects/<mangled-path>/*.jsonl, one JSON event per line, where <mangled-path> is the project's absolute path with / replaced by -.

    PROJECT_DIR="$HOME/.claude/projects/$(pwd | tr '/' '-')"
    ls -lt "$PROJECT_DIR"/*.jsonl 2>/dev/null | head -10
    

    Confirm a past session by quoting a line from it back to the user before analyzing it — the newest file is not always the one they mean. If no transcripts exist, say so and stop.

  3. Build the timeline. Parse with Python, not grep — the JSON is nested and a naive grep double-counts or misses events split across lines. For the turn range in question, extract in order: user turns, skill invocations, Agent tool spawns with their subagent_type, file writes, test runs, and token counts per turn. Keep the path:line of every event you will cite.

  4. Name the failure mode against the evidence. Common ones, each with what proves it in the transcript:

Read the full file on GitHub · 77 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. 1mo ago First seen · 77 lines · 78 tokens per session scan A 40d5685121ad

Subscribe to this mod's changes

apex-diagnose is a skill published in the GitHub repository tonone-ai/tonone (76 stars, last pushed 6d ago), licensed MIT. It adds 78 tokens to every session and 1,268 once invoked, about $0.0003 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-09-20.