.NET Run File
Executes C# code directly from standalone files or stdin without requiring traditional project files or configuration.
The source repository doesn't declare a license. Check its terms before reusing the code.
Key features
- One-command conversion from standalone scripts to full .NET projects
- Project-less execution of C# files using top-level statements
- Optimized patterns for AI-driven development and quick calculations
- Inline dependency management via #:package, #:sdk, and #:property directives
- Support for stdin and heredoc patterns for interactive code execution
Use cases
- Testing code snippets with NuGet dependencies without project setup
- Executing quick C# scripts for system automation or data processing
- Rapidly prototyping logic within an AI-assisted terminal environment
FAQ
What does the .NET Run File skill do?
This skill enables the execution of C# code directly from standalone .cs files or stdin. It leverages .NET 10's ability to run script-like programs without requiring a .csproj file or traditional project configuration.
Can I convert a .NET run file into a full project later?
Yes. If your script grows in complexity, you can use the 'dotnet project convert' command to automatically generate a standard .NET project based on your standalone script and its inline directives.
When should I use this skill instead of a standard .NET project?
Use this skill for quick calculations, automation scripts, rapid prototyping, or data transformations. It is ideal for scenarios where you want to execute C# code immediately without the overhead of creating a full project directory structure.
How does this skill improve my AI-assisted coding workflow?
It allows Claude Code to execute multi-line C# snippets instantly via heredocs or stdin. This provides a fast feedback loop for verifying logic, testing API calls, or performing complex math without leaving the terminal or generating boilerplate files.
How does this skill manage NuGet dependencies without a project file?
It utilizes inline directives like '#:package' followed by the package name and version. This allows the .NET runtime to resolve and download dependencies automatically during execution of the standalone file.
Related skills
DSPy for Ruby
Builds type-safe, composable, and optimizable LLM applications in Ruby using the DSPy.rb framework.
Developer Tools2,82412 ptsDHH Ruby/Rails Style
Generates Ruby and Rails code embodying David Heinemeier Hansson's philosophy of clarity, convention, and developer happiness.
Developer Tools2,82412 ptsDHH/37signals Rails Style
Applies the distinctive 37signals/DHH conventions to generate and refactor Ruby on Rails code.
Developer Tools2,82412 pts