write-script-bash

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

Updated May 28, 2026
One-click install
npx skills add https://github.com/kma-core/windmill --skill write-script-bash-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-bash
Source: https://github.com/kma-core/windmill/tree/main/system_prompts/auto-generated/skills/write-script-bash
Command: npx skills add https://github.com/kma-core/windmill --skill write-script-bash-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Bash scripts for the Windmill platform requires following specific conventions—no shebang, positional parameters for arguments, JSON output via stdout—and knowing which wmill CLI command to use for previewing versus deploying. This Skill encodes those rules so generated scripts work correctly on the first run. ## Core Features & Use Cases - Windmill-compliant Bash generation: Produces scripts without shebang lines that read arguments via $1, $2 and return structured JSON through stdout. - CLI workflow guidance: Distinguishes wmill script preview for local iteration from wmill script run for deployed scripts and wmill sync push for explicit deployments, preventing accidental overwrites of workspace versions. - Environment variable access: Shows how to use Windmill-provided variables like $WM_WORKSPACE and $WM_JOB_ID inside scripts. - Use Case: A developer asks for a Bash script that processes a filename and count; the Skill generates a Windmill-ready script, then offers to run wmill script preview with sample arguments to validate it before any deployment. ## Quick Start Write a Windmill Bash script that takes a name and count as arguments and outputs them 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 like $1 and $2, since Windmill passes all arguments as strings. Return results by echoing valid JSON to stdout, which Windmill captures as the script result.

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

wmill script preview executes a local script file without deploying it, making it the default for iterating on edits. wmill script run executes the version already deployed in the workspace and should only be used when testing the deployed version explicitly.

How do I pass arguments to a Windmill Bash script?

Arguments arrive as positional parameters accessed with $1, $2, and so on, always as strings. When previewing locally, pass them with wmill script preview <path> -d '<args>' matching the script's declared parameters.

When should I run wmill sync push?

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

Can Bash scripts access Windmill environment variables?

Yes, environment variables set in Windmill are available directly in Bash scripts. Built-in variables like $WM_WORKSPACE and $WM_JOB_ID expose workspace and job context without extra configuration.