agentleFS
abdullahkhawerabdullahkhawer/devops-skills/skills/mysql-cli/SKILL.md

mysql-cli

Skill8 starsChanged 7 months agoApache-2.0View on GitHub

Perform MySQL operations using the mysql CLI. Use for inspecting schemas, running read-only queries, and troubleshooting databases across environments.

  • Deletes or force-pushes
  • Installs packages

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the connection table and rules below when constructing all mysql commands.

    line 8
  2. Distinctive:

    Update the table below with your connection details before using this skill:

    line 12
  3. Distinctive:

    If the target environment is unclear, ask the user before running any command.

    line 19
  4. Very specific:

    If mysql is not installed or no connection group is configured, inform the user that setup is required and ask them to complete the …

    line 23
  5. Very specific:

    Always use --defaults-group-suffix or --login-path from ~/.my.cnf — never pass raw host/user/password on the command line, where they could …

    line 33
  6. Distinctive:

    NEVER target a connection group not listed in the configuration table above.

    line 84
  7. Very specific:

    NEVER pass -h, -u, or -p<password> directly on the command line — always use --defaults-group-suffix backed by ~/.my.cnf, so credentials …

    line 85
  8. Very specific:

    NEVER print, display, or store the contents of ~/.my.cnf or any credential value.

    line 86
  9. Very specific:

    NEVER run DELETE, DROP, TRUNCATE, GRANT, or REVOKE without explicit user instruction — these are destructive or security-sensitive.

    line 87
  10. Very specific:

    Always run EXPLAIN on unfamiliar or complex queries before executing them against a large table, to catch missing indexes or full table …

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MySQL CLI Skill

Use the connection table and rules below when constructing all mysql commands.

Configuration

Update the table below with your connection details before using this skill:

EnvironmentConfig Group Name (in ~/.my.cnf)
Production<your-prod-group>
Staging / Non-Prod<your-nonprod-group>

If the target environment is unclear, ask the user before running any command.

Prerequisites (one-time setup by user)

If mysql is not installed or no connection group is configured, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.

brew install mysql-client && brew link --force mysql-client

Configure ~/.my.cnf with a named [<group>] section per environment (host, port, database, user, password), and chmod 600 ~/.my.cnf. Never share credential file contents with the assistant.

Command Format

Always use --defaults-group-suffix or --login-path from ~/.my.cnf — never pass raw host/user/password on the command line, where they could leak into shell history or process listings:

mysql --defaults-group-suffix=<group> -e "<SQL>"

Examples

# Non-Prod — list tables
mysql --defaults-group-suffix=<your-nonprod-group> -e "SHOW TABLES;"

# Non-Prod — describe a table
mysql --defaults-group-suffix=<your-nonprod-group> -e "DESCRIBE <table_name>;"

Available Commands

Read-only (safe, no confirmation needed)

CommandDescription
SHOW DATABASES;List databases
SHOW TABLES;List tables
DESCRIBE <table>;Describe a table's schema
SHOW INDEX FROM <table>;List indexes for a table
SHOW GRANTS FOR <user>;Show a user's grants (informational, not a mutation)
SELECT ...Any read-only query
EXPLAIN <query>;Show a query plan without executing it
SHOW PROCESSLIST;List currently running queries

Mutating operations (confirm with user before running)

CommandDescription
INSERT / UPDATEInsert or update rows
CREATE TABLE / CREATE INDEXCreate new schema objects
ALTER TABLEModify an existing table's structure

Never run — requires explicit human approval

CommandReason
DELETE FROM ... (without a WHERE reviewed by the user)Can irreversibly remove rows at scale
DROP TABLE / DROP DATABASEIrreversible destruction of data or structure
TRUNCATEIrreversibly wipes all rows from a table
GRANT / REVOKEAlters access control, security-sensitive
Any DDL/DML against the production groupA human must execute changes against production data

Rules

  • NEVER target a connection group not listed in the configuration table above. If a command references an unfamiliar group, stop and ask the user to confirm.
  • NEVER pass -h, -u, or -p<password> directly on the command line — always use --defaults-group-suffix backed by ~/.my.cnf, so credentials never appear in shell history or process listings.
  • NEVER print, display, or store the contents of ~/.my.cnf or any credential value.
  • NEVER run DELETE, DROP, TRUNCATE, GRANT, or REVOKE without explicit user instruction — these are destructive or security-sensitive.
  • Always run EXPLAIN on unfamiliar or complex queries before executing them against a large table, to catch missing indexes or full table scans.
  • For any UPDATE/DELETE, always show the equivalent SELECT ... WHERE ... first and confirm the row count before proceeding.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.