diagnose

diagnose is a skill for Claude Code from griffinwork40/agent-afk. It costs 46 tokens per session (347 once invoked), scanned A, original, Apache-2.0.

A structured method for finding the cause of a bug or failing test. It compares possible explanations against the code, recent changes, and trial fixes.

In plain words
What is it for?
Use it to investigate broken behavior, failing tests, regressions, and unexplained errors, then report the validated cause and fix evidence.
Why use it?
It avoids guessing by requiring a concrete reproduction or verification check and testing likely causes before choosing one.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter. Also seen: mentions subagents.

Part of the awa-bundled plugin — 17 skills shipped together

Good fit Use it to investigate broken behavior, failing tests, regressions, and unexplained errors…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/griffinwork40/agent-afk/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 griffinwork40/agent-afk --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/griffinwork40/agent-afk

Made for: Claude Code.

Or install awa-bundled, the plugin that ships this one along with the rest of its 17 skills.

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/griffinwork40/agent-afk/diagnose.svg)](https://agentmods.dev/skills/griffinwork40/agent-afk/diagnose)
Your own site
<a href="https://agentmods.dev/skills/griffinwork40/agent-afk/diagnose"><img src="https://agentmods.dev/badge/skills/griffinwork40/agent-afk/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 347 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.00046 $0.00347
Opus 5 $0.00023 $0.00173
Sonnet 5 $0.00009 $0.00069
Haiku 4.5 $0.00005 $0.00035

Measured 3d ago against content hash 9d9751315bba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • diagnose — 100% identical, 1 lines differ
src/bundled-plugins/awa-bundled/skills/diagnose/SKILL.md · 13 lines

What it actually says

Gather context: read the failing test or bug description, relevant error output, and recent git changes. If no failing test exists yet, write a minimal reproducer test (or identify a concrete verification command) before proceeding — hypotheses need a pass/fail signal to validate against. Dispatch two sub-agents in parallel — one to search the codebase for code paths involved in the failure (subagent_type: research-agent, read-only), and one to check recent commits and diffs that could have introduced the regression (subagent_type: general-purpose — requires Bash for git log/git diff/git show). When both return, synthesize findings into 2–4 ranked hypotheses, each with a specific code location and proposed cause.

For each hypothesis, dispatch a sub-agent with isolation: "worktree" to apply a minimal speculative fix, run the test or verification command, and then run the broader related test suite to check for regressions. Run all hypothesis-testing agents in parallel. Collect results: which fixes passed, which didn't, and any regressions surfaced by the broader suite.

Report the validated root cause (the hypothesis whose fix passed), the speculative fix diff, and regression status from the broader test run. If no hypothesis passes, synthesize what was learned and form a second round of hypotheses. If the user approves the fix, apply it to the main worktree.

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 Changed · +1 lines 9d9751315bba
  2. 7d ago First seen · 12 lines · 46 tokens per session scan A 9a54f97470dc

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository griffinwork40/agent-afk (53 stars, last pushed yesterday), licensed Apache-2.0. It adds 46 tokens to every session and 347 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

hunk-extensions

Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…

modem-dev/hunk · 105 tokens

md-audit

Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…

chaitanyagiri/munder-difflin · 85 tokens

hatch3r-incident-response

Handles production incidents with structured triage, mitigation, and post-mortem. Use when responding to production issues, outages, or security incidents.

hatch3r/hatch3r · 37 tokens

hatch3r-bug-fix

Step-by-step bug fix workflow. Diagnose root cause, implement minimal fix, write regression test. Use when fixing bugs, working on bug report issues, or when the user mentions a bug.

hatch3r/hatch3r · 47 tokens

hatch3r-perf-audit

Profiles and optimizes application performance against defined budgets. Use when investigating performance issues, auditing performance budgets, or optimizing hot paths.

hatch3r/hatch3r · 34 tokens

hatch3r-logical-refactor

Workflow for changing behavior or logic flow without adding new features or overhauling UI. Use when modifying business logic, data flows, behavioral rules, or working on logical refactor issues.

hatch3r/hatch3r · 46 tokens