Read-only MySQL inspection and data sampling. Use when Codex needs to initialize a MySQL connection, list visible databases or tables, inspect table structure, or preview table rows without executing free-form SQL. Trigger for requests like connecting to MySQL in read-only mode, analyzing schemas, analyzing tables, or reading sample table data. Refuse any write or DDL request.
Inspect MySQL metadata and sample rows through fixed read-only operations. Keep all work inside the allowed commands below and refuse anything that would mutate data, schema, or permissions.
./.mysql-readonly-inspector.json in the skill directory.python scripts/mysql_readonly.py init
mysql.connectorpymysqlMySQLdbpython scripts/mysql_readonly.py <command> [flags]
python -m pip install PyMySQL
Use only these operations:
Use only these commands:
python scripts/mysql_readonly.py init
python scripts/mysql_readonly.py list-databases
python scripts/mysql_readonly.py list-tables --database <db>
python scripts/mysql_readonly.py describe-table --database <db> --table <table>
python scripts/mysql_readonly.py preview-table --database <db> --table <table> --page 1 --page-size 50
page-size is 50.page-size is 200.page plus page-size to navigate. Do not emulate full exports by issuing many pages unless the user explicitly wants iterative inspection and the volume stays reasonable.Use direct driver access only if a supported driver is already present in the active runtime and you can stay inside the same fixed read-only operation set documented by this skill.
Mirror these exact behaviors when using a direct driver:
list-databases: SHOW DATABASESlist-tables: query information_schema.tables for one schemadescribe-table: query information_schema.columns and information_schema.statisticspreview-table: run COUNT(*) plus paged SELECT * ... LIMIT ... OFFSET ...Do not improvise additional SQL shapes. If a request needs anything outside those fixed operations, refuse it.
Read references/mysql-readonly-reference.md when you need: