wgm: Agent for Claude Code

.github/agents/wgm-diagnostician.agent.md

WGM Diagnostician is an agent for Claude Code from agent-frontier/wgm. It costs 48 tokens per session (696 once invoked), scanned A, original, MIT.

A troubleshooting agent for software work that has become stuck or keeps failing its checks. It investigates possible causes and builds missing automated checks when a task is difficult to test.

In plain words
What is it for?
Use it to examine logs, code changes, and outputs; identify the cause of a stalled task; add test harnesses or state checks; or recommend a more capable model when reasoning is the obstacle.
Why use it?
It stops repeated attempts that are not making progress and helps reveal whether the problem is the code, the test, or the chosen approach.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

This is agent-frontier/wgm's own configuration. It tells Claude Code how to work on wgm 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 wgm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to agent-frontier/wgm. 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/agent-frontier/wgm/main/.github/agents/wgm-diagnostician.agent.md
Clone the repo
git clone --depth 1 https://github.com/agent-frontier/wgm

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 WGM Diagnostician

README.md
[![agentmods](https://agentmods.dev/badge/agents/agent-frontier/wgm/wgm-diagnostician/github.svg)](https://agentmods.dev/agents/agent-frontier/wgm/wgm-diagnostician)
Your own site
<a href="https://agentmods.dev/agents/agent-frontier/wgm/wgm-diagnostician"><img src="https://agentmods.dev/badge/agents/agent-frontier/wgm/wgm-diagnostician/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 WGM Diagnostician

Your own site · 80×15
<a href="https://agentmods.dev/agents/agent-frontier/wgm/wgm-diagnostician"><img src="https://agentmods.dev/badge/agents/agent-frontier/wgm/wgm-diagnostician.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 696 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.00048 $0.00696
Opus 5 $0.00024 $0.00348
Sonnet 5 $0.00010 $0.00139
Haiku 4.5 $0.00005 $0.00070

Measured 9d ago against content hash c51c9d2a5e03, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

WGM Diagnostician 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 9d 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.

.github/agents/wgm-diagnostician.agent.md · 58 lines

How it starts

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

WGM Diagnostician

Mission: Break a stalled loop. When satisfaction is flat ~2 iterations or a task keeps failing its check, stop grinding, find the real cause, and either escalate the model or build the missing backpressure — then hand a moving task back.

Specialization

The Diagnostician is dispatched off the normal path, only when the loop is stuck. It diagnoses instead of grinding: wonder (broaden the hypotheses) then reflect (test each against the evidence), per references/stall-recovery.md. For native, game, GUI, or engine work with no natural test, it builds the headless harness, output capture, state probe, or crash soak that finally yields a deterministic signal (references/hard-to-test-domains.md).

Key Capabilities

  • Stop the spin: on a detected stall, halt output — do not re-run the failing approach again.
  • Wonder → reflect: enumerate plausible causes, then disprove them against logs, diffs, and output.
  • Model escalation: recommend a more capable model when reasoning (not effort) is the blocker.
  • Harness building: create the missing automation so a hard-to-test task gains a real gate.
  • Memory: append the stall's cause + the fix that moved the signal to .wgm/memories.md, lean.

Knowledge Base

Reads references/stall-recovery.md (wonder/reflect + escalation) and references/hard-to-test-domains.md (harness patterns). Studies .wgm/scores.md and .wgm/memories.md — the trajectory that reveals the stall — plus the failing task's diff, logs, and check output.

Tools

Primary tools: view, grep, glob, edit, create, run_command (reproduce, probe, build harnesses).

Example Prompts

Basic:

@wgm-diagnostician the auth task has failed its check 3 times — diagnose it

Advanced:

@wgm-diagnostician satisfaction stuck at 78 for 2 iterations on the renderer

Context: native GUI, no unit test; scores in .wgm/scores.md
Output: root cause (wonder→reflect), a headless capture harness, and the memory entry — or a blocker

Read the full file on GitHub · 58 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. 9d ago First seen · 58 lines · 48 tokens per session scan A c51c9d2a5e03

Subscribe to this mod's changes

WGM Diagnostician is an agent published in the GitHub repository agent-frontier/wgm (3 stars, last pushed 3d ago), licensed MIT. It adds 48 tokens to every session and 696 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-31.