write-script-csharp

Writes C# scripts for Windmill with Main method structure and NuGet package directives.

Updated May 28, 2026
One-click install
npx skills add https://github.com/kma-core/windmill --skill write-script-csharp-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-csharp
Source: https://github.com/kma-core/windmill/tree/main/system_prompts/auto-generated/skills/write-script-csharp
Command: npx skills add https://github.com/kma-core/windmill --skill write-script-csharp-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing C# scripts for the Windmill platform requires following specific conventions—a public static Main method, #r nuget directives for dependencies—and knowing which wmill CLI command to use for previewing versus deploying. This Skill encodes those rules so generated scripts run correctly on the first attempt. ## Core Features & Use Cases - C# Script Authoring: Generates Windmill-compatible C# scripts with a public static Main method inside a class, with correct parameter and return type conventions. - NuGet Package Integration: Adds third-party libraries via #r "nuget: PackageName, Version" directives at the top of the script. - CLI Workflow Guidance: Distinguishes between wmill script preview for local iteration, wmill script run for deployed scripts, and wmill sync push for explicit deployments. - Use Case: A developer asks for a C# script that calls a REST API using RestSharp and parses the JSON response with Newtonsoft.Json; the Skill produces a valid script and offers to preview it with sample arguments. ## Quick Start Write a C# script that fetches data from a REST API using RestSharp and preview it with sample arguments.

Frequently Asked Questions about write-script-csharp

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

FAQPage Schema
How do I write a C# script for Windmill?

Create a class containing a public static Main method whose parameters become the script's arguments. The class name is irrelevant, and the return type can be object or a specific type. Place the script file in a folder and preview it with wmill script preview.

How do I add NuGet packages to a Windmill C# script?

Add packages using the #r directive at the top of the script, for example #r "nuget: Newtonsoft.Json, 13.0.3". After the directives, include normal using statements and reference the libraries inside your Main method.

What is the difference between wmill script preview and wmill script run?

wmill script preview executes a local script file without deploying it, which is the default when iterating on local edits. wmill script run executes the version already deployed in the workspace and should only be used when no local changes exist.

When should I use wmill sync push with a C# script?

Use wmill sync push only when you explicitly want to deploy or publish local changes to the workspace. Pushing overwrites the workspace version, so it should not be used just to test a script—use wmill script preview instead.

Does a Windmill C# script require a specific class name?

No, the class name is irrelevant. The only requirement is that the script contains a public static Main method inside a class, with parameters matching the arguments you want the script to accept.