/handbook-dotnet:roslyn-query [analysis description or query type]from handbook-dotnet
Queries .NET/C# codebases using Roslyn AST analysis for data flow tracing, API usage auditing, pattern violation detection, and ad-hoc structural queries.
Ships in handbook-dotnet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Query .NET/C# codebases using Roslyn AST analysis scripts executed via dotnet run file.cs.
Before generating scripts, load the handbook-dotnet:dotnet-run-file skill for execution conventions and directive syntax.
Uses CSharpSyntaxTree.ParseText() — parses files individually, no solution loading.
Best for:
x.Content = ...)Uses MSBuildWorkspace — loads project, resolves types, enables cross-file analysis.
Best for:
SymbolFinder.FindCallersAsync)SymbolFinder.FindImplementationsAsync)SymbolFinder.FindOverridesAsync)SemanticModel.AnalyzeDataFlow)Based on the user's request, choose the appropriate template from references/templates.md. If no template fits, compose a custom script using the patterns documented there.
Create a .cs file in a scripts/ directory (or temp location) using dotnet run file.cs format with #:package directives.
For syntax-only analysis:
#:package Microsoft.CodeAnalysis.CSharp@4.*
For semantic analysis, additionally:
#:package Microsoft.CodeAnalysis.CSharp.Workspaces@4.*
#:package Microsoft.CodeAnalysis.Workspaces.MSBuild@4.*
#:package Microsoft.Build.Locator@1.*
#:property DisableMSBuildAssemblyCopyCheck=true
Note:
DisableMSBuildAssemblyCopyCheck=truesuppresses the MSBL001 build error that requiresExcludeAssets="runtime"on MSBuild packages — an attribute#:packagedirectives can't express. Safe for throwaway analysis scripts.
.slnxnot supported: Roslyn 4.xMSBuildWorkspaceonly supports.sln, not.slnx. UseOpenProjectAsyncwith a.csprojinstead — transitive project references are loaded automatically.
args[0], default to Directory.GetCurrentDirectory()Path.GetRelativePath() for output pathsdotnet run scripts/my-analysis.cs -- <target-path>
Analyze the output. For taint analysis, categorize findings:
Load references/roslyn-api.md for detailed API reference with code examples.
Load references/templates.md for ready-to-use analysis script templates.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
roslyn, dotnet-analysis, codebase-query, ast-analysis, csharp-analysis
npx claudepluginhub nikiforovall/claude-code-rules --plugin handbook-dotnet9 skills in this plugin
/coverage-reportGenerate a .NET code coverage report scoped to files changed in the current branch. Runs tests with coverage collection and produces filtered HTML reports./dotnet-analyzersRun dotnet format to fix code style and analyzer diagnostics (IDE0005, CA*, SA*). Use when fixing unnecessary usings, code style violations, analyzer warnings, or verifying format compliance/dotnet-dependencyThis skill should be used when investigating .NET project dependencies, understanding why packages are included, listing references, or auditing for outdated/vulnerable packages./dotnet-inspectQuery .NET APIs across NuGet packages, platform libraries, and local files. Search for types, list API surfaces, compare and diff versions, find extension methods and implementors. Use whenever you need to answer questions about .NET library contents./dotnet-run-fileRun script-like CSharp programs using dotnet run file.cs. Use this skill when users want to execute CSharp code directly, write one-liner scripts via stdin, or learn about run file directives./dotnet-testThis skill should be used when running .NET tests selectively with a build-first, test-targeted workflow. Use it for running tests with xUnit focus.Other plugins' skills for the same job