scripting-guide

Execute C# code snippets via `dotnet run -` with external libraries.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/MakotoUwaya/dotfiles --skill scripting-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scripting-guide
Source: https://github.com/MakotoUwaya/dotfiles/tree/main/.config/claude-code/skills/scripting-guide
Command: npx skills add https://github.com/MakotoUwaya/dotfiles --skill scripting-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires CsvHelper, ClosedXML, and includes references (resource) components.

What problem does it solve?

This Skill enables developers to write and execute C# code for data processing and file generation directly via the command line, without the need to create separate .cs files.

Core Features & Use Cases

  • File-less Scripting: Execute C# code snippets by piping them directly to dotnet run -.
  • Standard Library Access: Utilizes built-in .NET namespaces for common tasks like JSON processing.
  • External Library Integration: Supports adding external packages like CsvHelper and ClosedXML via # directives.
  • Use Case: Quickly process a JSON string from an API response or transform CSV data using C# logic on the fly.

Quick Start

Execute the C# code 'Console.WriteLine("Hello, World!");' using the scripting-guide skill.

Frequently Asked Questions about scripting-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute C# scripts directly from the command line without creating a file?

You can execute C# scripts directly from the command line without creating a file by piping code snippets to `dotnet run -`. This one-liner execution method processes data on the fly without generating .cs files.

What is the best way to process JSON or CSV data using C# on the fly?

The best way to process JSON or CSV data on the fly is by piping C# code to `dotnet run -`. This file-less scripting approach uses built-in .NET namespaces for JSON and external packages for CSV processing.

Can I use external libraries like CsvHelper and ClosedXML in a dotnet run script?

Yes, you can use external libraries like CsvHelper and ClosedXML in a dotnet run script. The scripting guide supports adding external packages via `#` directives for data processing and file generation tasks.

How does file-less C# execution handle standard .NET libraries?

File-less C# execution handles standard .NET libraries by providing built-in access to standard namespaces. This allows developers to utilize standard libraries for common tasks like JSON processing without creating separate .cs files.

Do I need the .NET SDK to run C# code snippets without files?

Yes, you need the .NET SDK to run C# code snippets without files. The scripting guide relies on the .NET SDK to execute code snippets as file-based applications using the `dotnet run -` command.