db-readonly
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/reed1898/db-readonlydb-readonly
Use this skill for database read tasks only.
What this skill does
- Connect to PostgreSQL or MySQL using connection env vars
- Execute SELECT / WITH / EXPLAIN queries only
- Optionally save output to CSV/TSV/JSON
- Block risky SQL (
INSERT,UPDATE,DELETE,DROP,ALTER, etc.)
Connection env vars
PostgreSQL
PGHOSTPGPORT(optional, default 5432)PGDATABASEPGUSERPGPASSWORD
MySQL
MYSQL_HOSTMYSQL_PORT(optional, default 3306)MYSQL_DATABASEMYSQL_USERMYSQL_PASSWORD
Run
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.csv
Safety rules
- Refuse non-read SQL.
- Prefer
LIMITfor exploratory queries. - When user asks for updates/deletes/schema changes, ask explicit confirmation and do not run via this skill.
- Avoid printing secrets from env vars.
Reference
- Query cookbook:
references/query-cookbook.md
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-reed1898-db-readonly": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
larksuite-wiki
Manage and export Lark Suite (Feishu) Wiki/Knowledge Base documents. Read, search, sync with subdocuments, and incremental export to local Markdown files.
knowledge-base-collector
Collect and organize a personal knowledge base from URLs (web/X/WeChat) and screenshots. Use when the user says they want to save an URL, ingest a link, archive content to KB, tag/classify notes, store screenshots, or search their saved knowledge in Telegram. Supports WeChat via a connected macOS node when cloud fetch is blocked.
Reminder
Skill by reed1898
claw-roam
Sync OpenClaw workspace between multiple machines (local Mac and remote VPS) via Git. Enables seamless migration of OpenClaw personality, memory, and skills. Use when user wants to (1) push workspace changes to remote before shutdown, (2) pull latest workspace on a new machine, (3) check sync status between machines, (4) migrate OpenClaw to another machine.