mysql_skill

This skill executes safe read-only MySQL queries across configured databases to explore schemas and analyze data without risking writes.
  • Python

109

GitHub Stars

5

Bundled Files

3 weeks ago

Catalog Refreshed

2 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstart where the catalogue uses aiagentskills.

npx veilstart add skill sanjay3290/ai-skills --skill mysql

  • .gitignore282 B
  • connections.example.json945 B
  • README.md2.0 KB
  • requirements.txt34 B
  • SKILL.md4.0 KB

Overview

This skill executes safe, read-only SQL queries against one or more configured MySQL databases. It helps explore schemas, list tables, and run SELECT-style queries while preventing any write or destructive operations. Connections are chosen intelligently from descriptive entries so the right database is used for a given intent.

How this skill works

The skill reads a connections.json file containing named database entries with host, credentials, and optional SSL settings. It enforces a read-only session, validates that only allowed statements (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH) are executed, and rejects multi-statement or write queries. Result sets are capped (row count, column width) and queries use a timeout to protect memory and execution resources.

When to use it

  • Run ad-hoc SELECT queries against production or staging databases
  • Explore database structure with table lists and schema dumps
  • Validate data, inspect recent records, or sample rows for analysis
  • Check specific tables or fields before making application changes
  • Quickly confirm counts, joins, or aggregated results without risking writes

Best practices

  • Store credentials in connections.json with file permissions set to 600
  • Provide clear, concise descriptions for each connection to enable auto-selection
  • Use --list, --tables, or --schema to inspect structure before composing queries
  • Always include LIMIT for wide scans; the skill enforces a maximum row cap
  • Avoid long-running full-table scans; rely on indexed predicates where possible

Example use cases

  • List configured databases and pick the one containing users or orders
  • Show schema for the orders table to verify available columns before querying
  • Run SELECT queries to sample the latest 100 rows from a transactions table
  • Describe a table to get column types and nullability for data-mapping tasks
  • Run EXPLAIN on a query to review index usage and performance characteristics

FAQ

Create or edit connections.json in the skill directory or ~/.config/claude/mysql-connections.json with the required fields (name, description, host, database, user, password). Set file permissions to 600.

What SQL is blocked by the skill?

All write or DDL statements are blocked, including INSERT, UPDATE, DELETE, DROP, ALTER, and multi-statement requests. Only SELECT, SHOW, DESCRIBE, EXPLAIN, and WITH queries are allowed.

How does the skill protect against large results or long queries?

It enforces a 30-second max_execution_time where supported, limits results to 10,000 rows, and truncates columns above a configured width to avoid OOM and unreadable output.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational