write-script-bash

Writes Windmill Bash scripts with positional arguments and JSON output conventions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Bash scripts for Windmill requires following platform-specific conventions — no shebang, positional parameters, JSON stdout output — plus knowing which wmill CLI command to run for previewing, metadata regeneration, or deployment. This Skill encodes those rules so scripts work correctly on the first try. ## Core Features & Use Cases - Windmill Bash conventions: Enforces the required structure — no #!/bin/bash shebang, arguments via $1, $2, and structured JSON results echoed to stdout. - CLI command guidance: 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 for a Bash script that pings a list of hosts and reports status. The Skill writes the script with positional args and JSON output, then offers to run wmill script preview with sample arguments. ## Quick Start Write a Windmill Bash script that takes a hostname and a count as arguments and returns the ping results as JSON, then preview it with sample arguments.

Frequently Asked Questions about write-script-bash

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

FAQPage Schema
How do I write a Bash script for Windmill?▼

Omit the shebang line and read arguments as positional parameters ($1, $2, etc.), which always arrive as strings. Echo valid JSON to stdout to return structured results from the script.

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

wmill script preview executes your local script file without deploying, making it the default for iterating on edits. wmill script run executes the version already deployed in the workspace, so use it only when testing the deployed version.

How do I access environment variables in a Windmill Bash script?▼

Windmill injects environment variables directly into the script's shell environment. Read them with standard Bash syntax, for example $WM_WORKSPACE for the workspace name or $WM_JOB_ID for the current job.

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

Editing script content, especially adding imports or changing main's arguments, invalidates the content hash tracked in wmill-lock.yaml. Run wmill generate-metadata to regenerate the .lock, .script.yaml schema, and hashes so they match the code.

When should I deploy a Windmill script with sync push?▼

Run wmill sync push only when explicitly asked to deploy, publish, or push changes. Pushing overwrites the workspace version, so testing local edits should use wmill script preview instead of deploying untested code.