write-script-mysql

Write parameterized MySQL queries with ? placeholders and inline parameter comments.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-mysql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-mysql
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-mysql
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-mysql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers construct safe, parameterized MySQL queries, reducing manual mistakes and guarding against injection risks by standardizing the use of placeholders and parameter naming.

Core Features & Use Cases

  • Parameterized queries with ? placeholders for values.
  • Inline comments to name and document parameters before the statement.
  • Examples covering common DML and DDL scenarios (SELECT, INSERT, UPDATE, DELETE) and migration scripts.

Quick Start

Create a SQL file that uses ? placeholders and preceding comments to name parameters, then run your tooling to validate and deploy the script.

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 parameterized MySQL queries to prevent SQL injection?

Parameterized MySQL queries use ? placeholders for values instead of string concatenation, eliminating injection risks. Precede your query with inline comments naming each parameter, then bind values at runtime using positional arguments matching the placeholder order.

What's the best way to document parameters in MySQL queries?

Add inline comments before your SQL statement to name and define each parameter's type and default value. Comments map directly to ? placeholders in order, making queries self-documenting and maintainable across application code, migrations, and automated reports.

Can I use parameterized queries for INSERT, UPDATE, and DELETE operations?

Yes, parameterized queries work for all DML statements—SELECT, INSERT, UPDATE, DELETE—and DDL scenarios like migration scripts. The ? placeholder syntax and comment-based parameter naming apply consistently across all query types.

Do parameterized MySQL queries work across different programming languages?

Parameterized queries are language-agnostic; the ? placeholder and comment structure apply to MySQL queries regardless of whether you're using Python, Node.js, Java, or other languages. Each environment binds positional parameters to placeholders at runtime.

Why should I avoid manual string concatenation in SQL queries?

Manual concatenation introduces SQL injection vulnerabilities and makes queries harder to audit and maintain. Parameterized queries with placeholders enforce separation of logic and data, reducing mistakes and improving security across all environments.