MySQL Skill for Openclaw

A powerful database management skill that allows users to interact with MySQL through natural language commands instead of manual SQL coding.

ryanlee-gemini
v1.0.0
Mar 23, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mysql-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mysql-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is MySQL Skill?

The mysql-skill is a specialized tool within the Openclaw Skills ecosystem designed to bridge the gap between natural language and structured database operations. It empowers developers and data analysts to manage MySQL instances by simply describing their intent, such as querying specific data, modifying table schemas, or performing critical backup and recovery tasks.

By integrating seamlessly with the MySQL CLI, this skill automates the generation of complex SQL statements, including joins, aggregations, and indexing strategies. It provides a conversational layer that simplifies database administration while maintaining high standards for security and performance optimization.

MySQL Skill Use Cases

  • Querying specific datasets like recent user registrations or top-performing products using plain English.
  • Modifying database structures such as adding new columns or updating record statuses across multiple tables.
  • Automating database maintenance tasks including full backups, table exports, and data restoration.
  • Analyzing database performance through slow query log activation and index usage audits.

How MySQL Skill Works

  1. The user provides a natural language description of a database task (e.g., "Find the top 5 sales this month").
  2. The skill analyzes the request and references the database schema to generate a syntactically correct SQL query.
  3. The generated SQL or CLI command (like mysqldump) is presented to the user for execution or performed via the configured client.
  4. For administrative tasks, the skill utilizes system-level commands to interact with the MySQL engine directly.
  5. Results or confirmation of the operation are returned to the user in a human-readable format.

MySQL Skill Setup

To use this Openclaw Skills module, you must first install the MySQL client on your system.

1. Install MySQL Client

For Ubuntu/Debian:

sudo apt update
sudo apt install mysql-client

For macOS:

brew install mysql-client

2. Configure Connection

Create a ~/.my.cnf file with your credentials:

[client]
host = localhost
user = your_username
password = your_password
database = your_database

Alternatively, set environment variables:

export MYSQL_HOST=localhost
export MYSQL_USER=your_username
export MYSQL_PASSWORD=your_password
export MYSQL_DATABASE=your_database

MySQL Skill Data Schema & Taxonomy

The skill interacts with the standard MySQL information schema and user-defined tables. It organizes its operational data as follows:

Component Description
SQL Generation Maps natural language tokens to SELECT, INSERT, UPDATE, and DELETE operations.
Backups Generates .sql files using the format backup_YYYYMMDD_HHMMSS.sql.
Logs Accesses system-level slow query logs (e.g., /var/log/mysql/slow.log) for performance analysis.
Metadata Utilizes information_schema.STATISTICS for index and table health tracking.

MySQL Skill Advanced Features

  • Intelligent Slow Query Analysis: Automatically enables and parses slow query logs to identify bottlenecks.
  • Index Optimization Suggestions: Audits index cardinality and usage to recommend structural improvements.
  • Automated Transaction Handling: Supports wrapping large data operations in transactions for atomicity.
  • Security Hardening: Encourages the use of environment variables and the principle of least privilege for database access.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*