Answers questions from the user's databases (PostgreSQL, MySQL/MariaDB, SQLite) - inspect the schema, write read-only SQL, show the SQL, then report tables and charts. Use when the user asks about data, numbers, customers, orders, trends or reports stored in a database (資料庫、查詢、報表、統計、SQL).
SinoBee 實測評鑑
還沒有評鑑。在 SinoBee 用這個技能完成任務後,可以在結果上發起評鑑,比較不同模型組合。
SKILL.md
v1.0.0When to Use
The answer lives in a saved database connection: "上個月哪個客戶下單最多", "每月營收趨勢", "哪些商品缺貨". If the user has no connection yet, ask them to add one in the 資料庫 (Database) tab or paste a connection string - never ask them to type a password into the chat.
Procedure
db_listto pick the connection. If a skill nameddb-<name>exists for it, read it first: it has table notes and saved queries written for this database.db_schemafor the connection, thendb_schemawithtablefor the tables you will use (columns, keys). Never guess column names.- Write ONE read-only statement (SELECT / WITH). Aggregate in SQL (GROUP BY, window functions) instead of
fetching many rows; add LIMIT. Use the dialect of the connection (PostgreSQL
date_trunc, MySQLDATE_FORMAT, SQLitestrftime). - Show the SQL to the user, then run it with
db_query. - Check the result makes sense (row counts, NULLs, units, time zone). If not, fix the SQL and run it again.
- Answer in the user's language: a short conclusion first, then a markdown table; for trends or rankings also draw a chart (a ```mermaid xychart-beta block, or a PNG with python/matplotlib saved in the workspace).
- If the query is likely to be reused, save it with
db_save_query. When the user wants to keep using this database, offerdb_make_tool(table notes + saved queries + a skill for this database).
Without SinoBee's database tools
Agents that only have a shell can use the same connections through SinoBee's CLI (read-only, passwords stay in SinoBee's secrets.json):
sinobee db listsinobee db schema <connection> [table]sinobee db query <connection> "<SELECT …>" --format md|csv|json --limit 100
Pitfalls
- Writes (INSERT/UPDATE/DELETE/DDL) need
db_execute, the connection's write permission and the user's approval every time. Never try to work around the read-only guard. - Large tables: count first (
SELECT count(*)), then sample or aggregate. - Money and quantities: keep the database's precision; say the currency and unit.
Verification
Every number in the answer comes from a query result shown in this conversation, and the SQL is visible.
版本
| 版本 | 狀態 | 發布日期 | 內容雜湊 | 簽章 | Boltchain 存證 |
|---|---|---|---|---|---|
| 1.0.0 | 已審核 | sha256:c6ce4dc9c0b76073493e7eaa6af9642a39c2aad5c250bd7851708a1279867ca8 | ed25519 ✓ | 2VFG-DAQD-8E9Z-FD3N |
評鑑報告
為此技能發起評鑑眾籌這個技能還沒有評鑑報告。
留言討論 (0)
還沒有留言,來當第一個吧。
登入後即可留言。