/handbook-dotnet:dotnet-run-filefrom handbook-dotnet
Runs C# code directly with dotnet run file.cs, supporting stdin one-liners and run file directives for packages, SDKs, and properties.
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.
Run C# code directly without creating project files using .NET 10's dotnet run file.cs feature.
Use this skill when the user wants to:
#:package, #:sdk, #:property)For detailed examples and directives reference, load references/guide.md.
# Run a .cs file
dotnet run app.cs
# Run from stdin
echo 'Console.WriteLine("Hello");' | dotnet run -
# Multi-line via heredoc
dotnet run - << 'EOF'
var now = DateTime.Now;
Console.WriteLine($"Time: {now}");
EOF
#:package Humanizer@* // NuGet package (version required, wildcards ok)
#:sdk Microsoft.NET.Sdk.Web // SDK selection
#:property LangVersion preview // MSBuild property
#:project ../src/MyLib // Project reference
dotnet project convert app.cs
Steps:
.cs file with your code (top-level statements supported)dotnet run filename.csExample:
// hello.cs
Console.WriteLine("Hello from .NET!");
dotnet run hello.cs
Purpose: Run C# code without creating files - ideal for quick scripts and AI-assisted workflows.
Patterns:
# Simple one-liner
echo 'Console.WriteLine(Math.PI);' | dotnet run -
# With package
dotnet run - << 'EOF'
#:package Humanizer@*
using Humanizer;
Console.WriteLine(TimeSpan.FromMinutes(90).Humanize());
EOF
# Heredoc for multi-line
dotnet run - << 'EOF'
using System.Text.Json;
var obj = new { Name = "Test", Value = 42 };
Console.WriteLine(JsonSerializer.Serialize(obj));
EOF
When user asks to run C# code without specifics:
.cs fileFor AI-assisted workflows:
dotnet run script.cs | jq .What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 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.npx claudepluginhub nikiforovall/claude-code-rules --plugin handbook-dotnetOther plugins' skills for the same job