brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
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.
Independent GitHub snapshot · Automated classification · Original documentation governs
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(quot;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 .