write-script-mysql

Writes MySQL query scripts with named parameters and S3 streaming for Windmill workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and testing MySQL scripts for Windmill requires knowing the correct placeholder syntax, parameter naming conventions, and the right CLI command for previewing versus deploying, which this Skill codifies. ## Core Features & Use Cases - Parameterized MySQL Queries: Write queries using ? placeholders with comment-based parameter declarations like -- ? name (text) including default values. - S3 Integration: Receive S3Object parameters decoded via JSON_TABLE, or stream large result sets directly to S3 in JSON, Parquet, or CSV format using the -- s3 directive. - Correct CLI Workflow: Distinguishes wmill script preview for local iteration from wmill script run for deployed scripts and wmill sync push for explicit deployment. - Use Case: A developer needs a script that exports all users to Parquet on S3; the Skill produces the SQL with the -- s3 prefix=exports/users format=parquet directive and previews it locally before any deployment. ## Quick Start Write a Windmill MySQL script that selects users by name and age, then preview it locally with sample arguments.

Frequently Asked Questions about write-script-mysql

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

FAQPage Schema
How do I write a parameterized MySQL script in Windmill?

Use `?` placeholders in the SQL statement and declare each parameter with a comment before it, such as `-- ? name1 (text)` or `-- ? name2 (int) = 0` for defaults. Windmill binds the arguments positionally to the placeholders.

How do I test a Windmill script locally without deploying?

Run `wmill script preview <script_path>` to execute the local file without deploying it to the workspace. Use `wmill script run` only for scripts already deployed, and reserve `wmill sync push` for when you explicitly want to publish changes.

Can a Windmill MySQL script read files from S3?

Yes, declare a parameter with type `(s3object)` and Windmill renders an S3 file picker, downloads the file, and binds it as JSON text. Parquet and CSV files are decoded server-side into JSON records, which you query with JSON_TABLE.

How do I export large MySQL query results to S3 from Windmill?

Add a `-- s3` directive at the top of the script, optionally with `prefix`, `storage`, and `format` keys (json, parquet, or csv). Rows stream directly to S3 instead of being buffered as the script return value, and the script returns the S3Object.

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

`script preview` runs the local script file without deploying, making it the default for iterating on edits. `script run` executes the version already deployed in the workspace, so it ignores uncommitted local changes.