Agent Skills: C#

MUST use when writing C# scripts.

UncategorizedID: windmill-labs/windmill/write-script-csharp

Repository

windmill-labsLicense: NOASSERTION
16,266927

Install this agent skill to your local

pnpm dlx add-skill https://github.com/windmill-labs/windmill/tree/HEAD/system_prompts/auto-generated/skills/write-script-csharp

Skill Files

Browse the full folder contents for write-script-csharp.

Download Skill

Loading file tree…

system_prompts/auto-generated/skills/write-script-csharp/SKILL.md

Skill Metadata

Name
write-script-csharp
Description
MUST use when writing C# scripts.

CLI Commands

Place scripts in a folder. After writing, tell the user they can run:

  • wmill generate-metadata - Generate .script.yaml and .lock files
  • wmill sync push - Deploy to Windmill

Do NOT run these commands yourself. Instead, inform the user that they should run them.

Use wmill resource-type list --schema to discover available resource types.

C#

The script must contain a public static Main method inside a class:

public class Script
{
    public static object Main(string name, int count)
    {
        return new { Name = name, Count = count };
    }
}

Important:

  • Class name is irrelevant
  • Method must be public static
  • Return type can be object or specific type

NuGet Packages

Add packages using the #r directive at the top:

#r "nuget: Newtonsoft.Json, 13.0.3"
#r "nuget: RestSharp, 110.2.0"

using Newtonsoft.Json;
using RestSharp;

public class Script
{
    public static object Main(string url)
    {
        var client = new RestClient(url);
        var request = new RestRequest();
        var response = client.Get(request);
        return JsonConvert.DeserializeObject(response.Content);
    }
}