
handbook-dotnet
Structured .NET toolkit covering single-file runs, selective testing, coverage, API inspection, analyzers, and Roslyn queries.
- GitHub stars
- 143
What it does
- Adds
dotnet-run-file,dotnet-inspect,dotnet-test,coverage-report,dotnet-analyzers, androslyn-queryskills for everyday .NET work - Runs C# files directly with
dotnet runand#:packagedirectives, including one-liners via stdin on .NET 10+ - Generates branch-scoped coverage reports, and queries NuGet and platform APIs with diffs between package versions
- Designed for .NET developers who want structural code analysis without writing a full project for each question
.NET development skills: dotnet run file support, selective unit testing, coverage, API inspection, analyzers and Roslyn queries
Add marketplace
/plugin marketplace add NikiforovAll/claude-code-rulesRun it inside Claude Code once, then install the plugin below.
Install
/plugin install handbook-dotnet@cc-handbookRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceCode Coverage Report
Generate a code coverage report scoped to source files changed in the current branch compared to a base branch.
Workflow
1. Determine base branch
Detect the base branch to diff against. Use the MR/PR target branch if known, otherwise default to main or master (whichever exists). Ask the user if ambiguous.
git merge-base --fork-point main HEAD || git merge-base --fork-point master HEAD
2. Detect changed source files
git diff <base-branch> --name-only -- '*.cs'
Filter out test files (paths containing Test, Tests, .Tests, .Test).
If no source files changed, stop and inform the user.
3. Identify test project(s)
Determine which test project(s) to run. Strategies (in order):
- User-specified: If the user names a test project, use it
- Convention-based: Look for test projects whose name matches the changed project (e.g.,
MyProject->MyProject.Tests) - Solution-wide: Run all tests in the solution if scope is unclear
- Ask: If ambiguous, ask the user which test project(s) to run
4. Clean previous results
rm -rf TestResults/
5. Run tests with coverage
dotnet test <test-project-or-solution> \
--collect:"XPlat Code Coverage" \
--results-directory ./TestResults/
6. Build file filters
From the changed file list (step 2), extract basenames and build a filter string:
+*FileName1.cs;+*FileName2.cs;+*FileName3.cs
7. Generate report
dotnet reportgenerator \
-reports:"TestResults/**/coverage.cobertura.xml" \
-targetdir:"TestResults/CoverageReport" \
-reporttypes:"Html;TextSummary" \
-filefilters:"<filters>"
8. Display results
- Print
TestResults/CoverageReport/Summary.txtto the terminal - Open the HTML report (platform-aware):
- Windows:
start TestResults/CoverageReport/index.html - macOS:
open TestResults/CoverageReport/index.html - Linux:
xdg-open TestResults/CoverageReport/index.html
- Windows:
Tips
- For large solutions, scope to specific test projects to speed up collection
- The
-filefiltersflag accepts wildcards -- basename matching avoids path sensitivity
Readme
Handbook .NET
.NET development skills: running single C# files, testing, coverage, API inspection, analyzers and Roslyn queries.
Automatic CSharpier formatting left this plugin in 1.20.1. It is now
dotnet-csharpier, so you can take these skills without the formatting hook.
Features
- dotnet-run-file skill: Run C# files directly without projects (.NET 10+)
- coverage-report skill: Generate code coverage reports scoped to branch changes
- dotnet-inspect skill: Query .NET APIs across NuGet packages, platform libraries, and local assemblies
- dotnet-analyzers skill: Fix code style and analyzer diagnostics with
dotnet format, plus an HTML dashboard - roslyn-query skill: Query C# codebases structurally via Roslyn AST analysis
Installation
/plugin marketplace add nikiforovall/claude-code-rules
/plugin install handbook-dotnet
Skills
dotnet-run-file
Run C# code directly without creating project files using .NET 10's dotnet run file.cs feature.
Invoke the skill:
Use the dotnet-run-file skill to help me run this C# code
Quick examples:
# Run a .cs file
dotnet run app.cs
# One-liner via stdin (Claude Code friendly)
echo 'Console.WriteLine("Hello");' | dotnet run -
# Multi-line with heredoc
dotnet run - << 'EOF'
var now = DateTime.Now;
Console.WriteLine($"Time: {now}");
EOF
# With NuGet package
dotnet run - << 'EOF'
#:package Humanizer@*
using Humanizer;
Console.WriteLine(TimeSpan.FromMinutes(90).Humanize());
EOF
Directives:
#:package Humanizer@*- Add NuGet packages (version required)#:sdk Microsoft.NET.Sdk.Web- Set SDK (for web apps)#:property LangVersion preview- MSBuild properties
See skills/dotnet-run-file/references/ for detailed guides.
dotnet-inspect
Query .NET library APIs — the same commands work across NuGet packages, platform libraries, and local .dll/.nupkg files.
Quick examples:
# Scan a type's members
dnx dotnet-inspect -y -- member JsonSerializer --package System.Text.Json --oneline
# Triage what changed between two versions
dnx dotnet-inspect -y -- diff --package System.CommandLine@2.0.0-beta4.22272.1..2.0.3 --oneline
# Find extension methods for a type
dnx dotnet-inspect -y -- extensions IServiceCollection --extensions
Generic types need quotes and a type parameter: 'Option<T>'. Use the built-in -n N / -s Section limits instead of piping through head.
dotnet-analyzers
Fix code style and analyzer diagnostics (IDE*, CA*, SA*) with dotnet format. Always reports first — never fixes without confirmation.
Quick examples:
# List violations without fixing
dotnet format style --verify-no-changes --severity warn -v diag
# Fix a specific diagnostic
dotnet format style --diagnostics IDE0005 --severity warn
# CI gate
dotnet format --verify-no-changes --severity warn
Pass --dashboard for an interactive HTML report, or --dashboard --sarif for comprehensive SARIF-based coverage that respects .editorconfig severity.
roslyn-query
Query C# codebases structurally using Roslyn AST analysis, run as throwaway scripts via dotnet run file.cs. Answers questions grep can't: who calls this method, what implements this interface, where does untrusted data flow.
Two tiers — syntax-only (fast, no compilation) for assignment audits and pattern checks, semantic (MSBuildWorkspace) for callers, implementations, and data flow.
dotnet run scripts/my-analysis.cs -- <target-path>
See skills/roslyn-query/references/ for the API reference and script templates.
Details
- Marketplace
- NikiforovAll/claude-code-rules
- Source
- plugins/handbook-dotnet
- Category
- Development
- Listed since
- Apr 7, 2026
More from NikiforovAll/claude-code-rules
All 22- handbook-elasticsearch
- handbook-extras
- handbook-git-worktree
- handbook-github-pr
- handbook-gitlab-mr
- handbook-glab
- handbook-microsoft-docs
- handbook-nano-banana
- handbook-qa
- handbook-reflect
- handbook-sounds
- handbook-structured-plan-mode
- handbook-team-stack
- handbook-visual-explainer
- dotnet-csharpier
- handbook
- handbook-agent-spec-kit
- handbook-code-review
- handbook-context7
- handbook-csharp-lsp
- handbook-discover
Similar to handbook-dotnet
More Developer Tools
dotnet-testPlugindotnet/skills6.3K starsSkills for running, generating, analyzing, and improving .NET tests: test execution, filtering, platform detection, coverage, testability, and MSTest workflows.
dotnet-diagPlugindotnet/skills6.3K starsSkills for .NET performance investigations, debugging, and incident analysis.
handbook-csharp-lspPluginNikiforovAll/claude-code-rules143 starsC# Language Server Protocol support using csharp-ls for code intelligence features
dotnet-skillsPluginrichlander/dotnet-skills59 stars.NET skills for coding assistants
csharp-dotnetPluginmiles990/claude-software-skills26 starsC# and .NET development patterns
csharp-proSkillsickn33/agentic-awesome-skills322 installsModern C# development guidance covering records, pattern matching, async/await, nullable contracts, and .NET testing practices.