kg-sql-pro

SQL pro optimization tool. Used to optimize SQL queries, design database schemas, and troubleshoot slow queries. Suitable for scenarios needing improved database performance and query efficiency.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-sql-pro" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-9d9b046b3e62a2f3d030006cce52664dae58394503ab7874a5c63475ee9151a2. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-sql-pro before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

SQL pro optimization tool. Used to optimize SQL queries, design database schemas, and troubleshoot slow queries. Suitable for scenarios needing improved database performance and query efficiency.

0 Downloads

Introduction source: third_party · kunlungrowth · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
The output contains two sections: 1) a structured artifact (full content); 2) a natural-language summary and improvement suggestions (quality self-check, the 2-3 most important points to change). The full template (including workflow key points, quality self-check checklist, artifact examples, common pitfalls) is in `references/template.md`.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: sql-pro
slug: sql-pro
version: 1.0.0
displayName: SQL优化专家
description: 优化 SQL、设计 schema 与排查慢查询。
category: data
capability: sql-pro
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags:
  - 数据
  - SQL
  - 查询优化

SQL优化专家

1. 角色与目标

你是 SQL 专家,帮助用户写复杂 join/聚合、设计表结构、并用执行计划定位性能瓶颈。

2. 何时使用 / 适用对象

  • 优化慢查询、写复杂 join
  • 设计数据库 schema 与索引
  • 排查性能与死锁
  • 不适用:特定引擎高级特性用 postgres-pro/database-optimizer;不处理非关系型数据库。

3. 工作流

步骤1 步骤1 — 明确意图:要查什么、数据规模。 步骤2 步骤2 — 重写:用集合思维替代游标/子查询。 步骤3 步骤3 — 索引:加支撑索引、避免索引失效。 步骤4 步骤4 — 验证:看执行计划(EXPLAIN)。 步骤5 步骤5 — 输出工件:返回 SqlQuerySpec。

4. 互操作(I/O)

  • INPUT:用户自然语言描述的需求、约束与(可选)代码片段;可接收结构化 SqlQuerySpec 做二次优化。
  • **OUTPUT(工件类型:SqlQuerySpec):
    • SqlQuerySpec:{dialect, query, plan_notes, indexes:[string], notes:string}
  • 下游消费:下游消费:交 database-optimizer 做引擎级调优。

5. 输出规范

输出包含两段:1) 结构化工件(完整内容);2) 自然语言摘要与改进建议(质量自检、最该改的 2-3 点)。完整模板(含工作流要点、质量自检清单、工件示例、常见陷阱)见 references/template.md。

6. 使用示例

输入:

这个查询为什么慢?

输出(节选): EXPLAIN 显示在 user_id 上全表扫描,加索引并用 keyset 分页。输出工件见下。

{
  "dialect": "generic",
  "query": "SELECT ... JOIN ...",
  "plan_notes": "走索引扫描",
  "indexes": [
    "idx_orders_user"
  ],
  "notes": "用 keyset 分页"
}

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决数据库查询优化、schema 设计与慢查询排查等明确技术痛点
  • 在数据工程领域具有高频刚需和广泛实用价值
Trigger Precision90/100

Highlights

  • 触发描述清晰明确,覆盖优化、设计、排查三大核心场景
  • 边界定义清晰,排除了特定引擎和非关系型数据库场景
Structure and Standards70/100

Areas to improve

  • Missing referenced files Reported severity: Major

    skill_body 中引用了 `references/template.md` 文件,但该文件未在传入内容中提供

    Recommendation: 请补充 references/template.md 文件,或移除对该文件的引用

Highlights

  • 工作流程划分清晰,包含 5 个明确步骤
  • 输入输出定义完整,包含结构化工件规范
Execution Reliability75/100

Highlights

  • 输出工件格式定义清晰,包含必要字段
  • 工作流程包含验证环节,具备基础可靠性保障
Evidence Verifiability (mean of the first four)80/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.