π¦ ClawHub
DB Readonly
by @reed1898
Run safe read-only queries against MySQL or PostgreSQL for data inspection, reporting, and troubleshooting. Use when the user asks to read tables, inspect schema, count rows, sample data, or export query results without modifying data.
TERMINAL
clawhub install db-readonlyπ About This Skill
name: db-readonly description: Run safe read-only queries against MySQL or PostgreSQL for data inspection, reporting, and troubleshooting. Use when the user asks to read tables, inspect schema, count rows, sample data, or export query results without modifying data.
db-readonly
Use this skill for database read tasks only.
What this skill does
INSERT, UPDATE, DELETE, DROP, ALTER, etc.)Connection env vars
PostgreSQL
PGHOSTPGPORT (optional, default 5432)PGDATABASEPGUSERPGPASSWORDMySQL
MYSQL_HOSTMYSQL_PORT (optional, default 3306)MYSQL_DATABASEMYSQL_USERMYSQL_PASSWORDRun
Use script:
scripts/db_readonly.sh postgres "SELECT now();"scripts/db_readonly.sh mysql "SELECT NOW();"Export example:
scripts/db_readonly.sh postgres "SELECT * FROM users LIMIT 100" --format csv --out /tmp/users.csvSafety rules
1. Refuse non-read SQL.
2. Prefer LIMIT for exploratory queries.
3. When user asks for updates/deletes/schema changes, ask explicit confirmation and do not run via this skill.
4. Avoid printing secrets from env vars.
Reference
references/query-cookbook.md