exception-audit

Classify catch blocks in a Roslyn workspace by exception type and boundary risks.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill exception-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exception-audit
Source: https://github.com/darylmcd/Roslyn-Backed-MCP/tree/main/skills/exception-audit
Command: npx skills add https://github.com/darylmcd/Roslyn-Backed-MCP --skill exception-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repo-wide classification of exception handling patterns to identify swallow risks, overly broad catches, and unhandled-at-boundary throw sites across a C# solution.

Core Features & Use Cases

  • Enumerates catch clauses reachable from known exception types and categorizes their bodies by pattern (swallow, rethrow, handle, or delegate).
  • Identifies possible unhandled-at-boundary throw sites and flags boundary risks for front-line remedies.
  • Produces a ranked, actionable report to guide targeted refactors and improve error-handling practices in large codebases.

Quick Start

Load a solution and run the audit to generate a structured report of exception-handling patterns.

Frequently Asked Questions about exception-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit exception handling across a C# solution?

To audit exception handling, load your solution into a Roslyn workspace and run the audit to identify catch blocks, classify their patterns, and generate a ranked report of unhandled-at-boundary throw sites and swallow risks.

What is an exception swallow risk in C# code quality analysis?

An exception swallow risk in C# code quality analysis is a catch block that silently absorbs errors without rethrowing or handling them, which this audit identifies by classifying catch-body patterns to surface hidden boundary risks.

Can I filter the exception audit to specific exception types in my codebase?

Yes, you can filter the exception audit to specific types. The audit covers all exceptions in scope or an optional filter, categorizing reachable catch clauses and flagging unhandled-at-boundary throw sites for targeted refactoring.

Does this exception audit work with a loaded Roslyn workspace?

Yes, the exception audit works with a loaded Roslyn workspace. It relies on Roslyn MCP tools like trace_exception_flow, symbol_search, and analyze_control_flow to extract, analyze, and rank catch-body patterns across the solution.

What is the best way to find overly broad catch blocks in C#?

The best way to find overly broad catch blocks in C# is to run a solution-wide audit that uses Roslyn control flow analysis to identify and classify all catch clauses, producing a ranked report to guide targeted refactors.

When should I use a Roslyn-based exception flow analysis for error handling?

You should use a Roslyn-based exception flow analysis when you need a repo-wide classification of exception handling patterns in large codebases to identify unhandled-at-boundary throw sites and improve error-handling practices.