{"id":83313,"plugin_id":"plugin_asdk_app_6aa2c81fc7c48191a06e101858e41837","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-06T00:12:32.647Z","digest":"f353faf12107bc2ce90ad5b09734803dc7406b5628f867178dcb32cadfc81836","against":null,"payload":{"description":"Explore and query databases on the user's servers (Postgres, MySQL/MariaDB, Redis, MongoDB, SQLite) through Termalin without credentials in the chat. Use when the user asks what is in a database, wants a query, a count, a schema, a slow query check or a data fix on a server.","included_files":[],"name":"database-access","skill_md_contents":"---\nname: database-access\ndescription: Explore and query databases on the user's servers (Postgres, MySQL/MariaDB, Redis, MongoDB, SQLite) through Termalin without credentials in the chat. Use when the user asks what is in a database, wants a query, a count, a schema, a slow query check or a data fix on a server.\n---\n\nTermalin's `data_*` tools connect to the database on the server through the Connector, so no password is ever pasted here. The default is read-only.\n\nOrder of work:\n\n1. `hosts_list` to pick the server, then `data_tables` with the `engine` and `database` to see what exists. Do not guess table names.\n2. `data_schema` for each table the question touches: columns, types, keys, indexes, row estimate. Use the real column names in the query.\n3. `data_query` for the actual question. Rules:\n   - Always add `LIMIT` (default 50, at most 500) to row-returning queries; aggregate with `COUNT`, `GROUP BY`, `date_trunc` instead of pulling rows and counting in the chat.\n   - Read-only unless the user explicitly asks for a change. A write (`INSERT`, `UPDATE`, `DELETE`, `ALTER`, `DROP`, Redis `SET`/`DEL`, Mongo updates) needs `allowWrites: true`, a connection with full access, and the user's yes to the exact statement; show the statement first, with a `WHERE` that matches what they described, and prefer a `SELECT COUNT(*)` with the same `WHERE` before the `UPDATE`/`DELETE`.\n   - Wrap risky writes in a transaction when the engine supports it, and report the affected-row count after.\n   - Long analytical queries (over a minute) time out; narrow the date range or run them as a background job on the server with `job_start` and the engine's CLI.\n4. Present results as a compact table or a sentence with the number; name the database and server the answer came from.\n\nPrivacy: do not dump whole tables of personal data (emails, names, addresses, payment fields) into the chat. Aggregate, or select only the columns the question needs, and mask identifiers when the user only needs a count or a pattern.\n\nSlow database: `data_query` with the engine's own views — Postgres `pg_stat_activity` (running queries, waits), `pg_stat_user_tables` (seq scans), `pg_stat_statements` if installed; MySQL `SHOW FULL PROCESSLIST`, `SHOW ENGINE INNODB STATUS`; Redis `INFO memory`, `SLOWLOG GET 10`. Pair with `server_metrics` to see whether the host is CPU-, memory- or disk-bound.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}