SQLBot Workspace Datasource Dashboard Skill
Use this skill when the user wants to operate SQLBot workspaces, datasources, ask-data flows, or dashboards from Claude Code / Agent Skills compatible tools.
This skill wraps the bundled script ${CLAUDE_SKILL_DIR}/sqlbot_skills.py.
Before you run it
- 1. Check whether
${CLAUDE_SKILL_DIR}/.env exists. - If it does not exist, tell the user to copy
${CLAUDE_SKILL_DIR}/.env.example to .env and fill in:
-
SQLBOT_BASE_URL
-
SQLBOT_API_KEY_ACCESS_KEY
-
SQLBOT_API_KEY_SECRET_KEY
- 3. For export requests, if Playwright is missing, tell the user to install it with:
CODEBLOCK0
Map the user request to one of these commands
CODEBLOCK1
CODEBLOCK2
CODEBLOCK3
CODEBLOCK4
CODEBLOCK5
or continue an existing chat:
CODEBLOCK6
CODEBLOCK7
Optional flags:
- - INLINECODE7
- INLINECODE8
- INLINECODE9
CODEBLOCK8
CODEBLOCK9
or
CODEBLOCK10
Execution rules
- - Prefer exact workspace names or numeric workspace IDs when switching or querying.
- Prefer exact datasource names or numeric datasource IDs when switching or asking.
- Remember that SQLBot dashboard APIs are scoped by the current workspace and current user, so switch workspace before listing or showing dashboards in another workspace.
- Datasource list and ask-data also depend on the current workspace context.
- SQLBot has no standalone datasource-switch API, so
datasource switch updates the skill-local state file and ask uses that datasource by default when starting a new chat. - Preserve the user's requested output path for exports whenever possible.
- If the user does not provide an export path, use the script default (
./<dashboard-id>.jpg unless another format is specified). - Summarize the command output clearly after execution.
Additional resources
- - Detailed usage and installation notes: reference.md
- Repository overview and manual usage examples: README.md
SQLBot 工作空间数据源仪表盘技能
当用户想要从 Claude Code / Agent Skills 兼容工具中操作 SQLBot 工作空间、数据源、数据查询流程或仪表盘时,使用此技能。
该技能封装了捆绑脚本 ${CLAUDESKILLDIR}/sqlbot_skills.py。
运行前准备
- 1. 检查 ${CLAUDESKILLDIR}/.env 文件是否存在。
- 如果不存在,告知用户将 ${CLAUDESKILLDIR}/.env.example 复制为 .env 并填写:
- SQLBOT
BASEURL
- SQLBOT
APIKEY
ACCESSKEY
- SQLBOT
APIKEY
SECRETKEY
- 3. 对于导出请求,如果缺少 Playwright,告知用户使用以下命令安装:
bash
pip install playwright
playwright install chromium
将用户请求映射到以下命令之一
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py workspace list
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py workspace switch
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py datasource list --workspace
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py datasource switch --workspace
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py ask --datasource --workspace
或继续现有对话:
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py ask --chat-id 101
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py dashboard list --workspace
可选标志:
- - --node-type folder
- --node-type leaf
- --flat
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py dashboard show --workspace
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py dashboard export --workspace --output ./dashboard.jpg
或
bash
python3 ${CLAUDESKILLDIR}/sqlbot_skills.py dashboard export --workspace --format pdf --output ./dashboard.pdf
执行规则
- - 切换或查询时,优先使用精确的工作空间名称或数字工作空间 ID。
- 切换或查询时,优先使用精确的数据源名称或数字数据源 ID。
- 请记住,SQLBot 仪表盘 API 受当前工作空间和当前用户范围限制,因此在另一个工作空间中列出或显示仪表盘之前,请先切换工作空间。
- 数据源列表和数据查询也依赖于当前工作空间上下文。
- SQLBot 没有独立的数据源切换 API,因此 datasource switch 会更新技能本地状态文件,而 ask 在开始新对话时默认使用该数据源。
- 尽可能保留用户请求的导出输出路径。
- 如果用户未提供导出路径,则使用脚本默认值(除非指定了其他格式,否则为 ./.jpg)。
- 执行后清晰总结命令输出。
其他资源