diagnose

diagnose is a skill for Claude Code, Codex from ariaxhan/kernel-claude. It costs 45 tokens per session (1,192 once invoked), scanned A, original, MIT.

A structured method for finding the cause of software bugs and planning safer refactors. It examines what happened before suggesting a change.

In plain words
What is it for?
Use it to reproduce and trace failures, identify the root cause, list affected files, assess the scope of a change, and recommend a fix before implementation.
Why use it?
It reduces guesswork when a bug is hard to reproduce or when changing one part of a codebase might affect others.

Skill for Claude CodeCodex

Part of the kernel plugin — 28 skills, 13 agents, 4 hooks shipped together

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 skills/ariaxhan/kernel-claude/diagnose
Any agent
npx skills add ariaxhan/kernel-claude --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/ariaxhan/kernel-claude

Made for: Claude Code, Codex.

Or install kernel, the plugin that ships this one along with the rest of its 28 skills, 13 agents, 4 hooks.

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 diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/ariaxhan/kernel-claude/diagnose.svg)](https://agentmods.dev/skills/ariaxhan/kernel-claude/diagnose)
Your own site
<a href="https://agentmods.dev/skills/ariaxhan/kernel-claude/diagnose"><img src="https://agentmods.dev/badge/skills/ariaxhan/kernel-claude/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,192 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.00045 $0.01192
Opus 5 $0.00023 $0.00596
Sonnet 5 $0.00009 $0.00238
Haiku 4.5 $0.00005 $0.00119

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

Security

Grade A, and why

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

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/diagnose/SKILL.md · 151 lines

How it starts

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

<on_start> agentdb recall " <files/symbols>" --global

Recall again after isolation reveals better symbols, when the hypothesis changes,

or when a different failure appears.

</on_start>

<skill_load> Load: skills/debug/SKILL.md, skills/build/reference/testing.md, skills/architecture/SKILL.md </skill_load>

    <ask_user>
      Use AskUserQuestion when: hypotheses formed and user may have domain knowledge
      Ask: "Top hypothesis: {hypothesis}. Does this match what you're seeing, or is there context I'm missing?"
      Options: investigate that, I have more context, try a different hypothesis
    </ask_user>
  </step>
  <step id="diagnose">
    Identify confirmed root cause.
    List affected files and blast radius.
    Recommend fix approach (don't implement yet).
    Determine tier based on blast radius.
  </step>
  <step id="handoff">
    Output structured diagnosis.
    Hand off to /kernel:ingest or /kernel:forge for implementation.
    If the user wants to fix immediately, transition to execute mode.
  </step>
</steps>

Read the full file on GitHub · 151 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 · 151 lines · 45 tokens per session scan A 338c14fc664a

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository ariaxhan/kernel-claude (12 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 1,192 once invoked, about $0.0002 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 skills, from other repositories

prolong

Recover and use durable coding-session history from PRO-LONG's local append-only log. Use on long-running coding tasks, after context compaction or session resume, when reconstructing prior decisions or tool results, or before repeating work that may already have been attempted.

alexisfox7/PRO-LONG · 55 tokens

lemmalog

Externalize working memory and logical state into the lemmalog Datalog engine (MCP). Use for ANY multi-step task where state should outlive one context window or span agents: long investigations, debugging sessions, audits, multi-agent searches, systematic explorations, planning with many interdependent constraints…

JordyZomer/lemmalog · 105 tokens

causal-memory

Causal memory for agents — install/setup the causal-memory MCP server, then record decisions/outcomes and recall them before acting. Trigger when the user asks to install or set up causal-memory/agent memory, when causal-memory MCP tools are available and the agent faces a non-trivial decision (architecture, debugging…

JingxuanC/causal-memory · 88 tokens

a0-create-plugin

Create, extend, or modify Agent Zero plugins. Follows strict full-stack conventions (usr/plugins, plugin.yaml, Store Gating, AgentContext, plugin settings). Use for UI hooks, API handlers, lifecycle extensions, or plugin settings UI.

Gen-Verse/PAST-Bench · 54 tokens

a0-review-plugin

Full audit of Agent Zero plugins in usr/plugins/. Reviews manifest validity, directory structure, code patterns (Store Gating, notifications, imports), security, and duplicate detection against the community index. Use when asked to review, audit, validate, or check an existing plugin before using or contributing it.

Gen-Verse/PAST-Bench · 64 tokens

create-skill

Wizard for creating new Agent Zero skills. Guides users through creating well-structured SKILL.md files. Use when users want to create custom skills.

Gen-Verse/PAST-Bench · 33 tokens