write-script-mysql

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

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/adamkingsbury/unified-data-model --skill write-script-mysql-adamkingsbury
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-mysql
Source: https://github.com/adamkingsbury/unified-data-model/tree/main/.claude/skills/write-script-mysql
Command: npx skills add https://github.com/adamkingsbury/unified-data-model --skill write-script-mysql-adamkingsbury

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manual, ad-hoc SQL writing often leads to injection risks and inconsistent query patterns. This skill provides a standardized approach to parameterized MySQL query construction to improve safety and readability.

Core Features & Use Cases

  • Parameterized queries: Use ? placeholders with inline comments to name parameters, ensuring clarity and safe execution.
  • Template-driven scripting: Create reusable MySQL script templates that can be adapted for multiple queries.
  • Use Case: When building user-facing search or filter features, apply these patterns to prevent injection and simplify maintenance.

Quick Start

Provide a parameterized MySQL template and a small example to guide safe query construction.

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?

To write parameterized MySQL queries, you use ? placeholders for values instead of string concatenation, and provide inline parameter annotations to ensure clarity and safe execution against injection attacks.

What is the best way to maintain consistency across MySQL scripts in deployment environments?

The best way to maintain consistency is using template-driven scripting with standardized ? placeholders and inline parameter annotations, which enforces safe execution and readability across development and deployment environments.

How do inline parameter annotations work with MySQL query templates?

Inline parameter annotations work by mapping descriptive names to ? placeholders in your MySQL query templates, ensuring developers understand which values map to which parameters for clear, safe execution.

Can I use these parameterized SQL patterns for user-facing search features?

Yes, you can apply these parameterized SQL patterns to user-facing search features. Using ? placeholders prevents injection from dynamic user input while simplifying ongoing query maintenance.

Why does manual ad-hoc SQL writing lead to inconsistent query patterns?

Manual ad-hoc SQL writing leads to inconsistent patterns because it lacks standardized templates, often resulting in direct variable interpolation that creates injection risks and reduces script readability.