Files
centdix a7ce5484b8 feat(local-dev): create Claude skills when doing wmill init (#7699)
* use skills

* add prompts

* update system prompts

* generate skills on init

* add prompts in cli

* better for raw apps

* nit

* test pipeline draft

* better

* yaml for triggers and schedules

* cleaning

* better

* add descriptions to ai agent fileds

* adjust

* better openapi

* better

* nit

* feat: add typed provider and memory schemas for ai agent in openapi

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: improve zod validation errors with dynamic schema extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* regen

* fix

* cleaning

* refactor: deduplicate skill descriptions in generate_skills_ts_export

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* cleaning

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2026-02-05 13:48:32 +00:00

1.1 KiB

name, description
name description
write-script-csharp MUST use when writing C# scripts.

CLI Commands

Place scripts in a folder. After writing, run:

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

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);
    }
}