Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/sanjay3290-mysql/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -40% | 0% |
Execute safe, read-only queries against configured MySQL databases.
pip install -r requirements.txtCreate connections.json in the skill directory or ~/.config/claude/mysql-connections.json.
Security: Set file permissions to 600 since it contains credentials:
bashchmod 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 } ] }
| Field | Required | Description | |-------|----------|-------------| | name | Yes | Identifier for the database (case-insensitive) | | description | Yes | What data this database contains (used for auto-selection) | | host | Yes | Database hostname | | port | No | Port number (default: 3306) | | database | Yes | Database name | | user | Yes | Username | | password | Yes | Password | | ssl_disabled | No | Set to true to disable SSL (default: false) | | ssl_ca | No | Path to CA certificate file | | ssl_cert | No | Path to client certificate file | | ssl_key | No | Path to client private key file |
bashpython3 scripts/query.py --list
bashpython3 scripts/query.py --db production --query "SELECT * FROM users LIMIT 10"
bashpython3 scripts/query.py --db production --tables
bashpython3 scripts/query.py --db production --schema
bashpython3 scripts/query.py --db production --query "SELECT * FROM orders" --limit 100
Match user intent to database description:
| User asks about | Look for description containing | |-----------------|--------------------------------| | users, accounts | users, accounts, customers | | orders, sales | orders, transactions, sales | | analytics, metrics | analytics, metrics, reports | | logs, events | logs, events, audit |
If unclear, run --list and ask user which database.
SET SESSION TRANSACTION READ ONLY (primary protection)| Error | Solution | |-------|----------| | Config not found | Create connections.json in skill directory | | Authentication failed | Check username/password in config | | Connection timeout | Verify host/port, check firewall/VPN | | SSL error | Try "ssl_disabled": true for local databases | | Permission warning | Run chmod 600 connections.json | | max_execution_time not supported | Upgrade to MySQL 5.7.8+ or MariaDB 10.1.1+ |
--list to show available databases--tables or --schema to explore structure| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 23,208 | 7,812 | -66% | 1 | 1 | 0% | 3,846 | 1,170 | -70% | 0 | 0 | — |
case-02 | fail→fail | 7,261 | 3,895 | -46% | 1 | 1 | 0% | 1,011 | 1,122 | +11% | 0 | 0 | — |
case-03 | fail→fail | 6,661 | 2,139 | -68% | 1 | 1 | 0% | 1,267 | 1,155 | -9% | 0 | 0 | — |
case-04 | fail→pass | 8,526 | 1,444 | -83% | 1 | 1 | 0% | 1,490 | 1,106 | -26% | 0 | 0 | — |
case-09 | fail→pass | 7,923 | 1,548 | -80% | 1 | 1 | 0% | 1,518 | 1,232 | -19% | 0 | 0 | — |
case-05 | fail→pass | 7,932 | 2,128 | -73% | 1 | 1 | 0% | 1,296 | 1,335 | +3% | 0 | 0 | — |
case-06 | fail→pass | 10,746 | 1,633 | -85% | 1 | 1 | 0% | 1,794 | 1,223 | -32% | 0 | 0 | — |
case-07 | pass→pass | 7,798 | 1,517 | -81% | 1 | 1 | 0% | 1,305 | 1,212 | -7% | 0 | 0 | — |
case-08 | pass→pass | 4,806 | 2,409 | -50% | 1 | 1 | 0% | 905 | 1,383 | +53% | 0 | 0 | — |
case-10 | pass→pass | 8,647 | 3,894 | -55% | 1 | 1 | 0% | 1,674 | 1,729 | +3% | 0 | 0 | — |
case-11 | pass→pass | 11,336 | 1,545 | -86% | 1 | 1 | 0% | 1,801 | 1,171 | -35% | 0 | 0 | — |
case-12 | fail→pass | 11,592 | 1,288 | -89% | 1 | 1 | 0% | 1,836 | 1,108 | -40% | 0 | 0 | — |
case-13 | pass→pass | 5,795 | 1,194 | -79% | 1 | 1 | 0% | 988 | 1,122 | +14% | 0 | 0 | — |
case-14 | pass→pass | 10,918 | 3,501 | -68% | 1 | 1 | 0% | 1,668 | 1,547 | -7% | 0 | 0 | — |
case-15 | pass→pass | 10,327 | 3,970 | -62% | 1 | 1 | 0% | 1,708 | 1,280 | -25% | 0 | 0 | — |
case-16 | fail→pass | 6,750 | 1,873 | -72% | 1 | 1 | 0% | 1,185 | 1,298 | +10% | 0 | 0 | — |
case-17 | fail→pass | 6,940 | 1,801 | -74% | 1 | 1 | 0% | 1,168 | 1,263 | +8% | 0 | 0 | — |
case-18 | pass→pass | 11,667 | 1,931 | -83% | 1 | 1 | 0% | 1,992 | 1,316 | -34% | 0 | 0 | — |
case-19 | pass→pass | 8,534 | 1,368 | -84% | 1 | 1 | 0% | 1,505 | 1,146 | -24% | 0 | 0 | — |
case-20 | pass→pass | 6,706 | 5,566 | -17% | 1 | 1 | 0% | 1,276 | 1,732 | +36% | 0 | 0 | — |
case-21 | pass→pass | 9,666 | 4,523 | -53% | 1 | 1 | 0% | 1,861 | 1,737 | -7% | 0 | 0 | — |
case-22 | pass→pass | 6,493 | 5,834 | -10% | 1 | 1 | 0% | 1,224 | 2,024 | +65% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +32 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.