mysql-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# 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:
| Environment | Config 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.
```bash
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:
```bash
mysql --defaults-group-suffix=<group> -e "<SQL>"
```
### Examples
```bash
# 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 co