write-script-csharp

Validate C# scripts for a public static Main method and NuGet directives.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-csharp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-csharp
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-csharp
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-csharp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes and validates the structure of C# scripts to ensure consistency across projects and deployments.

Core Features & Use Cases

  • Enforces a public static Main method inside a Script class.
  • Supports NuGet package references via #r directives for script dependencies.
  • Guides on declaring return types and using object results for flexible scripting.
  • Use Case: When you need a uniform entry point across multiple C# scripts used in Windmill flows.

Quick Start

Place scripts in a folder named scripts/. After writing, run:

  • wmill script generate-metadata
  • wmill sync push Use wmill resource-type list --schema to discover available resource types.

Frequently Asked Questions about write-script-csharp

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

FAQPage Schema
How do I structure a C# script with a public static Main method?

C# scripts require a public static Main method as the entry point. This standardized structure ensures consistent script execution across Windmill workflows. The Main method should be declared inside a Script class and return a supported type such as object or a concrete type.

Can I use NuGet packages in C# scripts?

Yes, C# scripts support NuGet package references via #r directives. This allows you to declare dependencies directly in your script and access external libraries without manual installation steps.

What return types are supported in C# scripts?

C# scripts enforce return types such as object or concrete types from the Main method. Using object provides flexibility when you need to return different data structures across multiple scripts in your workflows.

How do I validate and deploy C# scripts in Windmill?

Place scripts in a scripts/ folder, then run wmill script generate-metadata to validate structure and wmill sync push to deploy. Use wmill resource-type list --schema to discover available resource types for your scripts.

Why enforce a consistent C# script structure across projects?

Standardized script structure prevents runtime errors and deployment failures. Enforcing a public static Main method, optional NuGet directives, and consistent return types ensures predictable behavior when scripts are reused across multiple Windmill flows.