.claude/skills/dotnet-run-file/SKILL.md
Run 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.
npx skillsauth add nguyenmanhtuan2004/apis.locknlock dotnet-run-fileInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 .testing
Comprehensive performance, security, and architectural guidelines for .NET 9 and C# 13 applications. Includes enterprise patterns from European and Japanese markets.
documentation
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
tools
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.