windmill-labs / write-script-bash
Install for your project team
Run this command in your project directory to install the skill for your entire team:
mkdir -p .claude/skills/write-script-bash && curl -L -o skill.zip "https://fastmcp.me/Skills/Download/1739" && unzip -o skill.zip -d .claude/skills/write-script-bash && rm skill.zip
Project Skills
This skill will be saved in .claude/skills/write-script-bash/ and checked into git. All team members will have access to it automatically.
Important: Please verify the skill by reviewing its instructions before using it.
MUST use when writing Bash scripts.
0 views
0 installs
Skill Content
---
name: write-script-bash
description: MUST use when writing Bash scripts.
---
## CLI Commands
Place scripts in a folder. After writing, run:
- `wmill script generate-metadata` - Generate .script.yaml and .lock files
- `wmill sync push` - Deploy to Windmill
Use `wmill resource-type list --schema` to discover available resource types.
# Bash
## Structure
Do not include `#!/bin/bash`. Arguments are obtained as positional parameters:
```bash
# Get arguments
var1="$1"
var2="$2"
echo "Processing $var1 and $var2"
# Return JSON by echoing to stdout
echo "{\"result\": \"$var1\", \"count\": $var2}"
```
**Important:**
- Do not include shebang (`#!/bin/bash`)
- Arguments are always strings
- Access with `$1`, `$2`, etc.
## Output
The script output is captured as the result. For structured data, output valid JSON:
```bash
name="$1"
count="$2"
# Output JSON result
cat << EOF
{
"name": "$name",
"count": $count,
"timestamp": "$(date -Iseconds)"
}
EOF
```
## Environment Variables
Environment variables set in Windmill are available:
```bash
# Access environment variable
echo "Workspace: $WM_WORKSPACE"
echo "Job ID: $WM_JOB_ID"
```