mysql-table-context is a Codex skill for inspecting one or more MySQL tables with CLI-friendly output for agent workflows.
It is designed for schema-aware AI systems that need:
- column names, types, keys, defaults, and comments
- a compact matched/unmatched table summary
- up to 5 sample rows per matched table
- a strict "configured database only" execution model
SKILL.md: skill contract and response formatagents/openai.yaml: interface metadatascripts/inspect_mysql_table.py: MySQL inspector CLIscripts/vendor/: vendoredPyMySQL
The script reads these environment variables:
MYSQL_HOSTMYSQL_PORTMYSQL_USERMYSQL_PASSWORDMYSQL_DATABASE
Single table:
python3 scripts/inspect_mysql_table.py --table usersMultiple tables:
python3 scripts/inspect_mysql_table.py --table users --table orders --table invoicesUser mentioned another database name:
python3 scripts/inspect_mysql_table.py --table users --database analytics- MySQL only
- sample rows are fetched with
LIMIT 5 - the vendored driver avoids a system-level
pip install