sql
GitHub提供安全只读 SQL 查询技能,通过读取授权表 Schema 确认字段后编写查询。优先聚合与限制行数,禁止写入或导出操作,并解释口径总结结果。
Trigger Scenarios
用户需要对已选数据表进行数据查询
用户需要获取特定表的元数据或 Schema 信息
Install
npx skills add Zafer-Liu/Data-Analysis-Agent --skill sql -g -y
SKILL.md
Frontmatter
{
"icon": "🗄️",
"name": "sql",
"description": "使用 SQL 安全查询当前已选择的数据表(query 数据查询)",
"allowedTools": [
"get_schema",
"get_table_detail",
"query_data"
]
}
SQL 查询
先读取已授权分析表的 schema,确认真实表名与字段名,再编写只读 SQL。优先聚合并限制返回行数,不猜测字段;SQL 数据源只能查询用户已选择的分析表。解释查询口径并总结结果。
Tool routing
- Use
get_schemabefore writing SQL to confirm real table and field names. - Use
get_table_detailwhen a specific table needs deeper metadata. - Use
query_datafor read-only SQL. Prefer aggregate queries and explicitLIMITfor previews. - Do not use write, export, cleanup, or analysis tools from this skill.
Implementation reference
- Schema/query tool entries:
agent/tools/business/data.py::_tool_get_schema,agent/tools/business/data.py::_tool_get_table_detail,agent/tools/business/data.py::_tool_query_data - SQL validation:
agent/validate.py
Version History
- d6a2c3e Current 2026-07-24 12:13


