write-script-csharp

Writes C# scripts for Windmill with NuGet packages and CLI preview workflows.

1|Updated Aug 3, 2026
One-click install
npx skills add https://github.com/vpzed-dev/smithy --skill write-script-csharp-vpzed-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-script-csharp
Source: https://github.com/vpzed-dev/smithy/tree/main/windmill/local-dev/.agents/skills/write-script-csharp
Command: npx skills add https://github.com/vpzed-dev/smithy --skill write-script-csharp-vpzed-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing C# scripts for the Windmill platform requires knowing the exact entry-point contract, NuGet reference syntax, and the correct CLI commands for previewing versus deploying, and mistakes in any of these cause failed runs or accidental deploys. ## Core Features & Use Cases - C# Script Authoring: Enforces the required public static Main method inside a class, with object or specific return types. - NuGet Package Integration: Adds dependencies via #r "nuget: PackageName, Version" directives at the top of the script. - CLI Workflow Guidance: Distinguishes wmill script preview for local iteration from wmill script run for deployed versions, and keeps .lock and .script.yaml metadata in sync with wmill generate-metadata. - Use Case: You need a script that calls a REST API and parses JSON. The Skill produces a C# script using RestSharp and Newtonsoft.Json with pinned versions, then previews it locally with sample arguments before any deploy. ## Quick Start Write a Windmill C# script that fetches data from a REST API and preview it locally 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 input arguments. The class name is irrelevant, and the return type can be object or a specific type.

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

Add #r "nuget: PackageName, Version" directives at the top of the script, then use normal using statements. Pin exact versions, for example #r "nuget: Newtonsoft.Json, 13.0.3", so dependency resolution stays reproducible.

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

wmill script preview executes the local file without deploying, which is the default when iterating on edits. wmill script run executes the version already deployed in the workspace and should only be used when you explicitly want the deployed version.

Why is my Windmill lock file out of sync after editing a script?▼

Adding or removing imports or changing Main's arguments invalidates the content hash tracked in wmill-lock.yaml. Run wmill generate-metadata to regenerate the .lock, the .script.yaml input schema, and the hashes so they match the code.

Does wmill generate-metadata deploy my script?▼

No, generate-metadata only writes local files such as locks, schemas, and hashes. Only git push or wmill sync push mutates the remote workspace, and those should run only when you explicitly ask to deploy.