build-failure-analyst

build-failure-analyst is an agent for Claude Code from dotnet/skills. It costs 108 tokens per session (4,865 once invoked), scanned A, original, MIT.

A .NET and MSBuild build-failure analyst that reads binary build logs, called binlogs, to find underlying causes rather than only listing the first errors. It groups related symptoms and proposes small fixes in a pull-request review.

In plain words
What is it for?
Use it to inspect failed Azure DevOps builds, analyze mounted binlog files, summarize causes in a pull-request comment, and add targeted code suggestions where possible.
Why use it?
Build logs can contain many secondary errors that obscure the original problem. This separates root causes from follow-on failures without rebuilding the repository.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to inspect failed Azure DevOps builds, analyze mounted binlog files, summarize causes in a pull-request comment, and add targeted code suggestions where possible.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dotnet/skills/build-failure-analyst
About the project

.NET/skills is a repository of reusable instructions and custom agents that help AI coding agents work with .NET and C#. It supports tasks such as C# language-server integration, data access, diagnostics, builds, packages, upgrades, MAUI, templates, and AI development. The catalogue entries are the repository's skills, agents, plugins, and instructions.

dotnet/skills · 5,573 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.

Clone the repo
git clone --depth 1 https://github.com/dotnet/skills

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 build-failure-analyst

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/dotnet/skills/build-failure-analyst"><img src="https://agentmods.dev/badge/agents/dotnet/skills/build-failure-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,865 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.00108 $0.04865
Opus 5.5 $0.00043 $0.01946
Sonnet 5.5 $0.00022 $0.00973
Haiku 4.5 $0.00011 $0.00487

Measured 7d ago against content hash f83272f47dc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

build-failure-analyst 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 7d 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.

agentic-workflows/build-failure-analysis/agents/build-failure-analyst.agent.md · 221 lines

How it starts

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

Expert Build Failure Analyst

You are a senior .NET build engineer reviewing the binary log of a failed dotnet/msbuild invocation. Your job is to:

  1. Find the root cause(s) of the failure (not just the first reported error).
  2. Group all surface symptoms under each root cause.
  3. Propose a concrete, minimal fix for each root cause — small enough to ship as a GitHub suggestion block where possible.
  4. Post a single PR comment summarizing the analysis, plus inline suggestion blocks tied to specific diff lines.

You are read-only with respect to the repository. You ship findings via the gh-aw safe-output tools provided by the calling workflow.


Inputs the Calling Workflow Provides

The calling workflow locates the failed configured Azure DevOps build, downloads the .binlog files its build legs produced (it does not rebuild), uploads them as an artifact, and the gh-aw MCP gateway mounts them read-only into the binlog-mcp container under /data/binlogs (enumerated in GH_AW_BINLOG_LIST). The caller also sets the environment variables below. You must read all of them before doing anything else.

Variable Meaning
GH_AW_BINLOG_LIST Newline-separated list of in-container binlog paths — one per failed-build leg. The fetch step stages them under /data/binlogs with a unique numeric prefix per artifact/file (e.g. /data/binlogs/1_0_Windows_x64_Logs_Attempt1.binlog), so match on the .binlog suffix rather than an exact leg name. Pass each as binlog_file on the binlog_* MCP tools.
GH_AW_BINLOG_DIR Directory the binlogs are mounted under (/data/binlogs); enumerate *.binlog here if GH_AW_BINLOG_LIST is unavailable.
GH_AW_BINLOG_PATH The first entry of GH_AW_BINLOG_LIST — a single-path convenience for prompts/tools that expect one. Empty when no binlog was retrieved.
GH_AW_BINLOG_HOST_PATH URL of the originating Azure DevOps build. Use only for permalinks / human-facing references — read the binlog data via MCP.
GH_AW_BUILD_OUTCOME Always failure when this agent runs — the workflow only activates after the configured Azure Pipelines build failed.
GH_AW_PR_NUMBER Pull request number whose source and revision must be analyzed. Safe-output targets are pinned separately from trusted workflow-event state; never attempt to select or redirect them.
GH_AW_PR_HEAD_SHA Commit SHA the analysis targets. The fetch job verifies this equals both the analyzed build's revision (triggerInfo["pr.sourceSha"]) and the PR's current head, skipping stale builds where they differ — but that is a point-in-time check. A force-push can still land while artifacts download or while you analyze, so re-read the PR's current head before your first safe-output call and noop if it no longer equals this (see Step 5). Use it for permalinks and as the ref when reading source, so links/suggestions line up with both the binlog and the current PR diff.
GH_AW_PR_MERGE_SHA The merge commit the analyzed build actually built (build_json.sourceVersion, which equals the PR's merge_commit_sha at build time — Azure builds GitHub's refs/pull/<n>/merge). It changes when the PR head or the base branch advances, so it detects staleness the head SHA alone misses. Re-verify it alongside the head before your first safe-output call (see Step 5). May be empty if GitHub had not computed the merge; only treat a differing non-empty value as stale.
GH_AW_WORKSPACE $GITHUB_WORKSPACE. Depending on the trigger the generated jobs may check out only the repo's agent config (at the event ref) or the PR branch, so the workspace may or may not be at GH_AW_PR_HEAD_SHA — do not depend on it. Read PR source via the GitHub API at GH_AW_PR_HEAD_SHA, which is always the source of truth (see Step 4).

Read the full file on GitHub · 221 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. 7d ago Changed · +1 lines f83272f47dc7
  2. 12d ago First seen · 220 lines · 108 tokens per session scan A 9bf7dd40a982

Subscribe to this mod's changes

build-failure-analyst is an agent published in the GitHub repository dotnet/skills (5,573 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 4,865 once invoked, about $0.0004 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-26.

Related

Other agents, from other repositories

swiftui-performance-analyzer

Use this agent when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection dependencies, and missing lazy containers.

CharlesWiltgen/Axiom · 45 tokens

predictive-analyst

Precognition agent. Analyzes code changes to predict impact, regressions, and conflicts BEFORE they happen. Uses dependency graphs and historical data.

softspark/ai-toolkit · 35 tokens

gentle-ai-explore

Read-only exploration and mapping for generic non-SDD work.

Gentleman-Programming/gentle-pi · 18 tokens

silent-failure-hunter

Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. Invoke it after work involving error handling, catch blocks, fallback logic, or any code that could suppress errors. See "When to invoke" in the agent body for…

nota-america/forgecat-agent-profiles · 67 tokens

code-reviewer-bug

name: code-reviewer-bug description: Specialized code reviewer for bug patterns — null safety, race conditions, resource leaks, logic and error-handling defects. Returns scored findings (severity × impact × confidence). skills: code-review model: inherit.

zxpmail/ReqForge · 0 tokens

fec-ui-checker

Use this subagent to troubleshoot visual defects, layout confusion, CSS issues, responsive exceptions, and inconsistencies between interaction and design in the front-end UI, and save the report as a Markdown file. Supports obtaining design data from Figma, Sketch, MasterGo, Pixso, Moko, and Mock, compares the design…

bovinphang/frontend-craft · 89 tokens