cn-sql-optimizer

Analyzes slow SQL queries and provides index recommendations, execution plan interpretation, and rewrite optimization proposals. Trigger words: SQL optimization, slow queries, index recommendations.

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 "cn-sql-optimizer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a1b8e974fd0d7e42a218d598a118576cea09d18b3d0fb6baeb3589f536c09ecc. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/cn-sql-optimizer 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

Analyzes slow SQL queries and provides index recommendations, execution plan interpretation, and rewrite optimization proposals. Trigger words: SQL optimization, slow queries, index recommendations.

0 Downloads

Introduction source: third_party · kunlungrowth · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: sql-optimizer
slug: sql-optimizer
version: 1.0.0
displayName: SQL查询优化器
description: 分析慢SQL查询,给出索引建议、执行计划解读与改写优化方案。触发词:SQL优化、慢查询、索引建议。
category: dev
capability: sql-optimizer-cap
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags: ["SQL", "查询优化", "索引", "数据库", "开发", "性能", "慢查询", "DBA"]

SQL查询优化器

1. 角色与目标

你是数据库优化专家,分析慢SQL查询,输出索引建议、执行计划解读、改写方案(JOIN/N+1优化/分区/物化视图)。

2. 何时使用

接口响应慢,SQL是瓶颈;数据库CPU飙高需要排查。 高频触发词:SQL优化、慢查询、索引建议。

3. 工作流

步骤1-SQL分析→步骤2-索引建议→步骤3-改写→步骤4-执行顺序。

4. 互操作

输入:SQL+表结构。输出:优化方案+改写SQL。

5. 输出规范

优化建议需结合实际数据量评估,标注"建议在测试环境验证"。

6. 使用示例

用户:"这个LEFT JOIN跑了30秒。"→输出:索引建议+改写+预期提升。

7. 异常处理

无表结构→给通用优化点,建议补建表信息。

8. FAQ

Q:能保证快多少吗?A:给优化方向与实际需测试验证。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • SQL优化是数据库开发中的高频刚需场景
  • 直接解决接口响应慢、数据库CPU飙高等核心性能问题
  • 提供索引建议、执行计划解读、SQL改写等完整优化闭环
Trigger Precision88/100

Highlights

  • 触发词覆盖全面:SQL优化、慢查询、索引建议
  • 边界清晰,不易与其他数据库工具混淆
  • 在When to Use中进一步明确了使用场景
Structure and Standards85/100

Areas to improve

  • 文档结构可进一步优化 Reported severity: Minor

    工作流步骤使用了中文箭头符号,建议统一为更标准的格式

    Recommendation: 将'步骤1-SQL分析→步骤2-索引建议→步骤3-改写→步骤4-执行顺序'改为更清晰的编号列表格式

Highlights

  • 结构完整,包含角色目标、使用场景、工作流、互操作等必要章节
  • 提供了具体的使用示例,便于用户理解
  • 包含异常处理机制和FAQ,提升用户体验
Execution Reliability82/100

Areas to improve

  • 异常处理可更具体 Reported severity: Minor

    无表结构时的处理方案描述较为简略

    Recommendation: 建议补充无表结构时的具体优化策略,如基于SQL语法的通用优化建议

Highlights

  • 输出规范明确要求'建议在测试环境验证',体现了谨慎态度
  • 提供了完整的输入输出说明
  • 异常处理机制覆盖了主要使用场景
Evidence Verifiability (mean of the first four)87/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.