write-script-go

Writes Go scripts for Windmill with correct package structure and CLI preview workflow.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Go scripts for the Windmill platform requires a specific structure (package inner, exported main function, JSON-serializable return types) and a disciplined CLI workflow for previewing, running, and syncing metadata. This Skill ensures scripts are written correctly the first time and that local edits are tested without accidentally deploying untested code. ## Core Features & Use Cases - Correct Go Structure: Enforces the package inner convention, a lowercase main function, and ({return_type}, error) return signatures required by Windmill. - Preview vs Run Discipline: Distinguishes wmill script preview (test local edits) from wmill script run (deployed version) and wmill sync push (explicit deploys only), preventing accidental overwrites of workspace scripts. - Metadata Synchronization: Runs wmill generate-metadata after edits that change imports or main arguments so .lock, .script.yaml, and wmill-lock.yaml hashes stay consistent. - Use Case: You ask the AI to write a Go script that fetches data and returns a struct. The Skill produces a valid Windmill Go script, then offers to run wmill script preview with sample arguments and regenerates metadata after any import changes. ## Quick Start Write a Windmill Go script that takes a name and count as parameters and returns them as a JSON result, then preview it locally.

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 for Windmill?▼

Create a file with package inner and an exported main function that returns a JSON-serializable type and an error. Windmill maps main's parameters to the script's input schema automatically.

How do I test a Windmill script locally without deploying?▼

Use wmill script preview <script_path> to run the local file without deploying. Pass sample arguments with -d '<args>'. Only use wmill script run when you want to execute the version already deployed in the workspace.

What return types does a Windmill Go script support?▼

Any Go type serializable to JSON works, including structs with json tags, maps, and primitives. The function must return two values: the result and an error.

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

Editing imports or main's arguments invalidates the content hash in wmill-lock.yaml. Run wmill generate-metadata to regenerate the .lock, .script.yaml schema, and hashes so git-sync and CI show no spurious diffs.

When should I use wmill sync push versus script preview?▼

Use script preview to validate local edits; it never touches the workspace. Use sync push only when explicitly deploying, since pushing overwrites the deployed script with your local version.