explain-error

explain-error is a skill for Claude Code from darylmcd/Roslyn-Backed-MCP. It costs 60 tokens per session (1,290 once invoked), scanned A, original, MIT.

A diagnostic helper for C# compiler errors, warnings, test failures, and build problems. It explains diagnostic codes or file locations and can identify and apply fixes.

In plain words
What is it for?
Use it with a diagnostic ID, a file and line number, a nullable warning, compiler output, or xUnit and NUnit failure details.
Why use it?
It turns cryptic build messages into explanations tied to the affected code and supports handling many diagnostics from one output dump.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the roslyn-mcp plugin — 44 skills, 5 agents, 2 hooks, 2 MCP servers shipped together

Good fit Use it with a diagnostic ID, a file and line number, a nullable warning, compiler output, or xUnit and NUnit failure details.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darylmcd/roslyn-backed-mcp/explain-error
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 darylmcd/Roslyn-Backed-MCP --skill explain-error
Clone the repo
git clone --depth 1 https://github.com/darylmcd/Roslyn-Backed-MCP

Made for: Claude Code.

Or install roslyn-mcp, the plugin that ships this one along with the rest of its 44 skills, 5 agents, 2 hooks, 2 MCP servers.

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 explain-error

README.md
[![agentmods](https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/explain-error.svg)](https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/explain-error)
Your own site
<a href="https://agentmods.dev/skills/darylmcd/roslyn-backed-mcp/explain-error"><img src="https://agentmods.dev/badge/skills/darylmcd/roslyn-backed-mcp/explain-error.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,290 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.00060 $0.01290
Opus 5 $0.00030 $0.00645
Sonnet 5 $0.00012 $0.00258
Haiku 4.5 $0.00006 $0.00129

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

Security

Grade A, and why

explain-error 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 6d 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/explain-error/SKILL.md · 130 lines

How it starts

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

Diagnostic Explainer & Fixer

You are a C# diagnostics specialist. Your job is to explain compiler errors and warnings in context, find available fixes, and apply them safely.

Input

$ARGUMENTS can be:

  • A diagnostic ID like CS0246, CS8019, CA1000, IDE0005
  • A file path and line number like src/MyFile.cs:42
  • A description like "the nullable warning on line 50 of UserService.cs"

Server discovery

Use server_info or roslyn://server/catalog. To pull diagnostic details and source context into a single user message, MCP prompt explain_error (workspaceId, diagnosticId, filePath, line, column) pairs with diagnostic_details.

Workflow

Step 0 (optional): Bulk Paste Mode

If $ARGUMENTS is a multi-line build/test output dump rather than a single ID or location, enter bulk mode:

  1. Parse each line for one of:
    • MSBuild: <file>(<line>,<col>): error|warning <DiagID>: <message>
    • GCC-style: <file>:<line>:<col>: error|warning: <DiagID>: <message>
    • xUnit/NUnit failure blocks (test name + stack trace with file:line)
  2. Deduplicate by (DiagID, file, line, column).
  3. Group by DiagID and summarize: "{N} instances of {DiagID} across {M} files."
  4. For each unique DiagID, run Step 2 (Explain) once with a representative instance. Do not repeat per-instance.
  5. Offer a single batched fix_all_preview per DiagID at the end instead of per-instance fixes.
  6. Produce one explanation per DiagID plus a consolidated batch-fix plan.

Skip to Step 1 if $ARGUMENTS is a single ID/location.

Step 1: Find the Diagnostic

If a diagnostic ID was given:

  1. Call project_diagnostics filtered to that diagnostic ID.
  2. Show all instances with file:line:column.
  3. Pick the first instance for detailed analysis (or let user choose).

If a file:line was given:

  1. Call project_diagnostics filtered to that file.
  2. Find the diagnostic at or near the specified line.

If a description was given:

  1. Parse for file names, line numbers, or diagnostic keywords.
  2. Use project_diagnostics to find matching diagnostics.

Read the full file on GitHub · 130 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. 6d ago First seen · 130 lines · 60 tokens per session scan A 8df4e603c5d0

Subscribe to this mod's changes

explain-error is a skill published in the GitHub repository darylmcd/Roslyn-Backed-MCP (1 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 1,290 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

dotnet-reverse

A guide for analyzing compiled .NET and C# programs, including managed Windows executables and libraries. Reverse engineering means studying compiled software to understand how it works, and decompiling turns it back into readable approximate source code.

zhaoxuya520/reverse-skill · 144 tokens

check-bin-obj-clash

Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten…

dotnet/skills · 160 tokens

build-perf-diagnostics

Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization…

dotnet/skills · 160 tokens

dump-collect

Configure and collect crash dumps for modern .NET applications. USE FOR: enabling automatic crash dumps for CoreCLR or NativeAOT, capturing dumps from running .NET processes, setting up dump collection in Docker or Kubernetes, using dotnet-dump collect or createdump. DO NOT USE FOR: analyzing or debugging dumps…

dotnet/skills · 96 tokens

binlog-generation

Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors…

dotnet/skills · 133 tokens

binlog-failure-analysis

Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating…

dotnet/skills · 79 tokens