Skip to main content

sql

使用 SQL 安全查询当前已选择的数据表(query 数据查询)

来源信息

仓库
Zafer-Liu/Data-Analysis-Agent
最近来源活动
2026年7月17日 13:24
检测到的 SKILL.md 语言
多语言混合
星标
2,606
分支
226

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
sql
description
使用 SQL 安全查询当前已选择的数据表(query 数据查询)
icon
🗄️
allowedTools
["get_schema","get_table_detail","query_data"]
# SQL 查询 先读取已授权分析表的 schema,确认真实表名与字段名,再编写只读 SQL。优先聚合并限制返回行数,不猜测字段;SQL 数据源只能查询用户已选择的分析表。解释查询口径并总结结果。 ## Tool routing 1. Use `get_schema` before writing SQL to confirm real table and field names. 2. Use `get_table_detail` when a specific table needs deeper metadata. 3. Use `query_data` for read-only SQL. Prefer aggregate queries and explicit `LIMIT` for previews. 4. 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`
在 GitHub 查看