sql-query-builder
从自然语言构建 SQL 查询
根据业务请求编写正确的 SQL 可能缓慢且容易出错。此技能可帮助将请求转换为 SQL、审查执行计划,并建议查询改进方案。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "sql-query-builder" from https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder.md and its manifest at https://skillstore.io/api/skills/zhangchenlai-dev-sql-query-builder/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“sql-query-builder”。 Find monthly revenue by customer segment for the last year.
预期结果:
一份结构化 SQL 草稿,包含日期筛选、按月份和细分客户群分组、收入聚合,以及对结果集的简短说明。
正在使用“sql-query-builder”。 Review a slow order lookup query with an execution plan.
预期结果:
用自然语言分析可能的扫描、连接或索引问题,然后给出调优选项和验证检查。
正在使用“sql-query-builder”。 Turn a product metric request into a query plan.
预期结果:
一个查询大纲,用于识别所需表、连接键、筛选条件、指标,以及实现前需要确认的假设。
安全审计
安全The high-entropy static finding is a false positive. SKILL.md is readable Markdown with front matter and short SQL assistant documentation, not binary or encrypted content. No prompt injection, data exfiltration intent, or hidden execution behavior was found.
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/zhangchenlai-dev-sql-query-builder/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/zhangchenlai-dev-sql-query-builder.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
Hermes-Sedimentary. (2026). sql-query-builder security audit report (audit version 5) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder/audits/5BibTeX 引用
@techreport{hermes-sedimentary-zhangchenlai-dev-sql-query-builder-2026,
author = {Hermes-Sedimentary},
title = {sql-query-builder security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder/audits/5},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "sql-query-builder security audit report (audit version 5)"
version: "1.0.0"
type: report
authors:
- name: "Hermes-Sedimentary"
date-released: "2026-07-08"
url: "https://skillstore.io/skills/zhangchenlai-dev-sql-query-builder/audits/5"
identifiers:
- type: other
value: "skillstore:zhangchenlai-dev-sql-query-builder:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
编写报表查询草稿
将业务问题转换为包含筛选、连接、分组和排序的 SELECT 查询。
审查慢查询
使用提供的执行计划识别可能的瓶颈和实用的调优选项。
转换需求
将利益相关者的请求转换为工程师可以审查和完善的 SQL 草稿。
试试这些提示
Create a SQL query for this request: [goal]. Tables: [tables]. Columns: [columns]. Use clear aliases and explain the result.
Build a SQL query that joins [tables] to answer [question]. Include filters for [conditions] and explain each join choice.
Review this SQL query and execution plan. Identify likely performance issues, explain the cause, and suggest safe optimization options.
Optimize this query for [database engine]. Schema: [schema]. Indexes: [indexes]. Row counts: [counts]. Explain tradeoffs and validation steps.
最佳实践
- 提供表名、列名、关系以及目标数据库引擎。
- 在请求优化建议时,分享具有代表性的行数和索引。
- 在生产环境使用前,请由合格的工程师审查生成的 SQL。
避免
- 不要在未分享数据库 schema 的情况下要求生成准确的 SQL。
- 不要在未经审查的情况下对生产环境执行生成的写入查询。
- 不要将通用优化建议视为可替代实测数据库测试的方案。
常见问题
此技能可以执行 SQL 查询吗?
它支持哪些数据库?
我应该提供哪些信息?
它可以优化慢查询吗?
生成的 SQL 可以直接用于生产环境吗?
它能取代数据库管理员吗?
开发者详情
许可证
MIT
作者版本
v1.0.0
Skillstore 修订
r1
引用
64ca8af0f54a325752f08bd54e52151061ea659a
维护新鲜度
2026/7/20
使用量
4 次下载 · 0 次浏览
文件结构
📄 SKILL.md