run-sql

Execute MySQL SQL scripts sequentially with dry run and error handling options.

9|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/Katsumitec/Human_First --skill run-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-sql
Source: https://github.com/Katsumitec/Human_First/tree/main/projects/ll-ai-first/skills-scripts/ll-skills/run-sql
Command: npx skills add https://github.com/Katsumitec/Human_First --skill run-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymysql, python-dotenv, sqlparse, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the execution of MySQL SQL scripts, streamlining database operations and reducing manual errors.

Core Features & Use Cases

  • SQL Script Execution: Execute multiple SQL files sequentially with precision.
  • Database Selection: Specify the database to be targeted for execution.
  • Error Handling: Choose between stopping on error or continuing execution.
  • Use Case: Ideal for automating database migrations, data population, and schema changes.

Quick Start

Execute the SQL scripts for your database migration by running the skill with the script paths and specifying the database name.

Frequently Asked Questions about run-sql

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

FAQPage Schema
How do I automate MySQL SQL script execution for database migrations?

You can automate MySQL SQL script execution by running a Python script that sequentially processes SQL files using pymysql for connections and sqlparse for statement parsing. This enables precise database migrations, schema changes, and data population while reducing manual execution errors.

Can I run multiple SQL files sequentially and specify which database to target?

Yes, you can execute multiple SQL files sequentially and specify the target MySQL database by providing the script paths and database name when running the Python script. This ensures your SQL statements are applied directly to the correct database environment.

Does this SQL script execution method support dry run mode and error handling?

Yes, the SQL script execution supports both dry run mode for validating statements without applying changes and configurable error handling to either stop execution on the first error or continue processing remaining SQL statements in the sequence.

What dependencies do I need to execute SQL scripts against a MySQL database?

You need pymysql for establishing the MySQL database connection, sqlparse for parsing the SQL statements within your script files, and python-dotenv for managing environment configurations like database credentials securely.

What is the best way to automate schema changes and data population for MySQL?

Automating schema changes and data population is best handled by executing multiple SQL scripts sequentially through a Python script with error handling options. This approach streamlines repetitive database operations and minimizes the risk of manual input mistakes.