diagnose

diagnose is a skill for Claude Code from microsoft/AutoSaddler. It costs 25 tokens per session (948 once invoked), scanned A, original, MIT.

A method for finding the root cause of a failed software-agent scenario by examining its evaluation, execution trace, and code. An execution trace is the record of the agent's actions, tool calls, responses, and reasoning.

In plain words
What is it for?
Use it to investigate failing scenarios, compare expected and actual behavior, trace incorrect tool use, and identify which prompts, tools, hooks, or code need changing.
Why use it?
It prevents fixes based only on guesses about the visible failure. Understanding why the agent behaved incorrectly makes later patches more likely to address the real problem.

Skill for Claude Code ✓ vendor

Written for Claude Code: PreToolUse hook event. Also seen: mentions CLAUDE.md.

Good fit Use it to investigate failing scenarios, compare expected and actual behavior, trace incorrect tool use, and identify which prompts, tools, hooks, or code need changing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/autosaddler/diagnose
About the project

AutoSaddler is a system that improves LLM-agent harnesses by diagnosing execution traces and applying structured changes to prompts, tools, middleware, and agent-loop logic. It evaluates candidate updates for their ability to generalize beyond the traces that motivated them. The catalogue add-ons represent workflows for using AutoSaddler.

microsoft/AutoSaddler · 243 stars · on GitHub

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 microsoft/AutoSaddler --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/microsoft/AutoSaddler

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 diagnose

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/autosaddler/diagnose"><img src="https://agentmods.dev/badge/skills/microsoft/autosaddler/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 948 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00025 $0.00948
Opus 5.5 $0.00010 $0.00379
Sonnet 5.5 $0.00005 $0.00190
Haiku 4.5 $0.00003 $0.00095

Measured 1mo ago against content hash d9fdee3af2ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

src/autosaddler/v1/proposer/autosaddler/skills/diagnose/SKILL.md · 97 lines

How it starts

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

Diagnosis Methodology

Overview

Diagnosis identifies the root cause of scenario failures by tracing the agent's execution step-by-step and reading the agent codebase to understand why the code produces the observed behavior. A correct diagnosis is the foundation for an effective patch — without understanding WHY the agent fails, patches are shots in the dark.

When to Use

Before applying any patch. Every patch should be preceded by diagnosis of at least the target failing scenarios.

Diagnosis Workflow

1. Read Evaluation Output

Start with the evaluation output for the scenario to get the score and rationale. The rationale provides a high-level summary of why the scenario failed. Refer to the session prompt or CLAUDE.md for the exact file paths.

2. Read Agent Execution Trace

Read the full agent trace file for the scenario to see:

  • Every tool call the agent made
  • Every tool response
  • The agent's reasoning at each step
  • Where the agent deviated from expected behavior

3. Read the Agent Codebase

Read the relevant source files to understand why the code caused the observed behavior:

  • System prompt: What instructions did the agent receive?
  • Tool docstrings: What did the agent see about the tool's API?
  • Tool implementation: What does the tool actually do? Is there a mismatch between the docstring and the implementation?
  • Hook configurations: Are there PreToolUse hooks that should have guided the agent but didn't?
  • Agent loop logic: Are there infrastructure constraints (budget, timeouts) that prevented completion?

Trace the code path: what the agent saw (docstring/prompt) → what it decided (trace reasoning) → what happened (tool implementation).

4. Identify the Failure Point

Pinpoint the exact step where the agent's behavior diverged from what was needed. Compare what the agent did (from the trace) against what it should have done (from the evaluation rationale and oracle expectations).

Key questions:

  • At which step did the agent first make a wrong decision?
  • What information was available to the agent at that point?
  • What did the agent see (prompt, docstring, tool response) that led to the wrong decision?
  • Was the root cause in the code (what the tool does), in the text (what the agent reads about the tool), or in the agent's reasoning?

Read the full file on GitHub · 97 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 · 97 lines · 25 tokens per session scan A d9fdee3af2ba

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository microsoft/AutoSaddler (243 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 948 once invoked, about $0.0001 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 skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens

incident-response-incident-response

Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.

rmyndharis/antigravity-skills · 36 tokens

ci-fixer

CI failures - read error, minimal fix, verify.

sipyourdrink-ltd/bernstein · 15 tokens