write-script-go

Create Go script entrypoints conforming to Windmill's inner package main signature.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often need to create deterministic, Windmill-compatible script entry points with a precise package and function contract.

Core Features & Use Cases

  • Enforces the inner package named inner and a main function with signature func main(param1 string, param2 int) (map[string]interface{}, error)
  • Returns JSON-serializable data for easy downstream consumption
  • Use Case: quickly scaffold Go scripts that integrate with Windmill for parameterized data processing.

Quick Start

Place your Go code in a file under the skill workspace, implement the inner package with the required main function, and return a map[string]interface{} along with error. For example, a minimal implementation could look like:

package inner

func main(param1 string, param2 int) (map[string]interface{}, error) { return map[string]interface{}{"result": param1, "count": param2}, nil }

Frequently Asked Questions about write-script-go

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

FAQPage Schema
How do I write a Go script that returns JSON-serializable results?

Go scripts can return JSON-serializable data by implementing a main function in the inner package with signature func main(param1 string, param2 int) (map[string]interface{}, error). Return a map containing your results and an error; Windmill automatically serializes the map to JSON for downstream consumption.

What's required to create a deterministic Go script for Windmill?

Deterministic Go scripts for Windmill require the Go toolchain, a properly configured module, and a package named inner with a main function matching the exact signature func main(param1 string, param2 int) (map[string]interface{}, error). This enforced contract ensures consistent, reproducible execution.

Can I use Go to build parameterized scripts that integrate with Windmill?

Yes. Go scripts integrate with Windmill by implementing the inner package with a main function accepting typed parameters and returning a map and error. This pattern enables parameterized data processing with deterministic, JSON-compatible output.

How do I scaffold a Go script entrypoint quickly?

Create a file in your workspace with a package named inner and a main function matching func main(param1 string, param2 int) (map[string]interface{}, error). Populate the map with your results and return it alongside an error to complete the entrypoint scaffold.

Do I need specific knowledge to structure Go code for Windmill compatibility?

You need to understand Go's package structure and function signatures. The core requirement is implementing the inner package with a main function conforming to func main(param1 string, param2 int) (map[string]interface{}, error)—familiarity with Go tooling and modules is assumed.