Agent skill

Mysql

by sanjay3290 in sanjay3290/ai-skills

Execute read-only SQL queries against multiple MySQL databases.

Apache-2.0Auto-check passedDatabases

Install Mysql

skills CLI
$ npx skills add sanjay3290/ai-skills --skill mysql -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sanjay3290/ai-skills mysql --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sanjay3290/ai-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mysql .claude/skills/mysql && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mysql
GitHub stars
431
Token cost
~1k tokens
SKILL.md length
337 words
Files
6 (incl. scripts)
Skills in repo
24
Repo updated
First seen
Licence
Apache-2.0

At a glance

Execute read-only SQL queries against multiple MySQL databases.

  • Works in 4 steps: Run --list to show available databases → Match user intent to database description → Run --tables or --schema to explore… → …
  • Querying MySQL databases
  • SKILL.md covers Requirements, Setup, Usage and Database Selection, plus 4 more sections
  • Runs Python scripts from its folder; calls python3 and pip

What it does

Mysql is an agent skill from sanjay3290/ai-skills. Execute read-only SQL queries against multiple MySQL databases. Use when: (1) querying MySQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `README.md`, `connections.example.json` and `scripts/query.py`).

It sits in Databases, covering SQL, Database schema design and Data analysis. It works with MySQL and SQL. The repository describes itself as: 24 cross-platform agent skills for Claude Code, Cursor, Codex & Gemini CLI — databases, messaging, research, TTS, DevOps, and Google Workspace. The licence is Apache-2.0.

When your agent uses it

  • Querying MySQL databases
  • Exploring database schemas/tables
  • Running SELECT queries for data analysis
  • Checking database contents

Example prompts

  • “/mysql”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Run --list to show available databases
  2. Match user intent to database description
  3. Run --tables or --schema to explore structure
  4. Execute query with appropriate LIMIT

What it can do on your machine

Read from SKILL.md and the folder at commit 281d88d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mysql loads about 1k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 337 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from sanjay3290/ai-skills at commit 281d88d, republished under its Apache-2.0 licence (© sanjay3290). 337 words, ~1,033 tokens.

Download SKILL.mdSave it as .claude/skills/mysql/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
mysql
description
Execute read-only SQL queries against multiple MySQL databases. Use when: (1) querying MySQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.
license
Apache-2.0
metadata.author
sanjay3290
metadata.version
1.0

MySQL Read-Only Query Skill

Execute safe, read-only queries against configured MySQL databases.

Requirements

  • Python 3.8+
  • mysql-connector-python: pip install -r requirements.txt

Setup

Create connections.json in the skill directory or ~/.config/claude/mysql-connections.json.

Security: Set file permissions to 600 since it contains credentials:

bash
chmod 600 connections.json
json
{
  "databases": [
    {
      "name": "production",
      "description": "Main app database - users, orders, transactions",
      "host": "db.example.com",
      "port": 3306,
      "database": "app_prod",
      "user": "readonly_user",
      "password": "your-password",
      "ssl_disabled": false
    }
  ]
}
Config Fields
FieldRequiredDescription
nameYesIdentifier for the database (case-insensitive)
descriptionYesWhat data this database contains (used for auto-selection)
hostYesDatabase hostname
portNoPort number (default: 3306)
databaseYesDatabase name
userYesUsername
passwordYesPassword
ssl_disabledNoSet to true to disable SSL (default: false)
ssl_caNoPath to CA certificate file
ssl_certNoPath to client certificate file
ssl_keyNoPath to client private key file

Usage

List configured databases
bash
python3 scripts/query.py --list
Query a database
bash
python3 scripts/query.py --db production --query "SELECT * FROM users LIMIT 10"
List tables
bash
python3 scripts/query.py --db production --tables
Show schema
bash
python3 scripts/query.py --db production --schema
Limit results
bash
python3 scripts/query.py --db production --query "SELECT * FROM orders" --limit 100

Database Selection

Match user intent to database description:

User asks aboutLook for description containing
users, accountsusers, accounts, customers
orders, salesorders, transactions, sales
analytics, metricsanalytics, metrics, reports
logs, eventslogs, events, audit

If unclear, run --list and ask user which database.

Safety Features

  • Read-only session: Connection uses MySQL SET SESSION TRANSACTION READ ONLY (primary protection)
  • Query validation: Only SELECT, SHOW, DESCRIBE, EXPLAIN, WITH queries allowed
  • Single statement: Multiple statements per query rejected
  • SSL support: Configurable SSL with CA, client cert, and key support
  • Query timeout: 30-second max_execution_time enforced (MySQL 5.7.8+)
  • Memory protection: Max 10,000 rows per query to prevent OOM
  • Column width cap: 100 char max per column for readable output
  • Credential sanitization: Error messages don't leak passwords

Troubleshooting

ErrorSolution
Config not foundCreate connections.json in skill directory
Authentication failedCheck username/password in config
Connection timeoutVerify host/port, check firewall/VPN
SSL errorTry "ssl_disabled": true for local databases
Permission warningRun chmod 600 connections.json
max_execution_time not supportedUpgrade to MySQL 5.7.8+ or MariaDB 10.1.1+

Exit Codes

  • 0: Success
  • 1: Error (config missing, auth failed, invalid query, database error)

Workflow

  1. Run --list to show available databases
  2. Match user intent to database description
  3. Run --tables or --schema to explore structure
  4. Execute query with appropriate LIMIT

© sanjay3290, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in skills/mysql of sanjay3290/ai-skills.

  • SKILL.md
  • .gitignore
  • README.md
  • connections.example.json
  • requirements.txt
  • scripts/query.py

Open the folder on GitHubat commit 281d88d

Compare with similar skills

Mysql next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mysql compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mysql this skillsanjay3290/ai-skills431—~1kAutomated safety check: PassApache-2.0
Golang Databaseunxed/f42412 repos~2.9kAutomated safety check: PassMIT
Expert DatabaseReJeCtAll/ExpertTeam-Codex113—~692Automated safety check: PassMIT
Database Guidehmislk/hmis236—~664Automated safety check: PassGPL-3.0
SQL ProJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
SQL AnalystRightNow-AI/openfang18k—~655Automated safety check: PassApache-2.0

Similar skills

  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    241 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Expert Database

    ReJeCtAll/ExpertTeam-Codex

    数据库优化专家入口。用于 Codex CLI 的 $expert-database 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~692 tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Database Guide

    hmislk/hmis

    MySQL database development guide for the HMIS project. An agent skill from hmislk/hmis.

    236 GitHub stars~664 tokensUpdated today
    DatabasesAuto-check passed
  • SQL Pro

    Jeffallan/claude-skills

    Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.

    12k GitHub stars~1.3k tokensUpdated 5 days ago
    DatabasesAuto-check passed
  • SQL Analyst

    RightNow-AI/openfang

    SQL query expert for optimization, schema design, and data analysis

    18k GitHub stars~655 tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • SQL Queries

    phuryn/pm-skills

    Generate SQL queries from natural language descriptions. An agent skill from phuryn/pm-skills.

    27k GitHub stars~907 tokensUpdated 24 days ago
    DatabasesAuto-check passed

More from sanjay3290/ai-skills

All 24 skills in this repo
  • Deep Research

    sanjay3290/ai-skills

    Execute autonomous multi-step research using Google Gemini Deep Research Agent.

    431 GitHub starsUsed in 10 repos~683 tokens
    Auto-check: notes
  • Imagen

    sanjay3290/ai-skills

    Generate images using Google Gemini's image generation capabilities.

    431 GitHub starsUsed in 7 repos~657 tokens
    Auto-check passed
  • Whatsapp

    sanjay3290/ai-skills

    Send and receive WhatsApp messages via the unofficial linked-device client pywhats (pip install pywhats) — pair with QR, send text/images, group chat, read receipts, presence/typing, and a…

    431 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Notebooklm

    sanjay3290/ai-skills

    Query and manage Google NotebookLM notebooks with persistent profile auth, source sync, batch/multi queries, and structured exports.

    431 GitHub stars~655 tokensUpdated 28 days ago
    Auto-check passed
  • Elevenlabs

    sanjay3290/ai-skills

    Convert documents and text to audio using ElevenLabs text-to-speech.

    431 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Postgres

    sanjay3290/ai-skills

    Execute read-only SQL queries against multiple PostgreSQL databases.

    431 GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed

Works with

Categories

Questions about Mysql

What does Mysql do?

Execute read-only SQL queries against multiple MySQL databases. Mysql is an agent skill from sanjay3290/ai-skills. Execute read-only SQL queries against multiple MySQL databases.

When should I use Mysql?

Mysql fits situations like: querying MySQL databases; exploring database schemas/tables; running SELECT queries for data analysis; checking database contents.

How do I install Mysql in Claude Code?

Run `npx skills add sanjay3290/ai-skills --skill mysql -a claude-code`. Or copy the skill folder (skills/mysql in sanjay3290/ai-skills) into .claude/skills/mysql in your project. Claude Code loads it when a task matches its description.

How do I install Mysql in Codex?

Run `npx skills add sanjay3290/ai-skills --skill mysql -a codex`. Or copy the skill folder (skills/mysql in sanjay3290/ai-skills) into .agents/skills/mysql in your project. Codex loads it when a task matches its description.

Can I use Mysql in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sanjay3290/ai-skills --skill mysql -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mysql, .gemini/skills/mysql, .github/skills/mysql and .opencode/skills/mysql in your project.

What does Mysql need to run?

Going by SKILL.md and its folder, Mysql needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and pip). Our summary lists: Python 3.

Does Mysql access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mysql safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mysql use?

Mysql is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mysql use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mysql?

Skills that share tags, products or a category with Mysql: Golang Database (unxed/f4, 241 stars), Expert Database (ReJeCtAll/ExpertTeam-Codex, 113 stars), Database Guide (hmislk/hmis, 236 stars) and SQL Pro (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mysql?

sanjay3290 (a GitHub user) maintains it in sanjay3290/ai-skills, which has 431 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on September 10, 2026.

Source: sanjay3290/ai-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.