文本描述或实现了文件修改
50 次命中此行包含可能的文件写入或重定向操作。应检查目标路径和覆盖行为;静态审查没有写入任何文件。 该规则在收集文本中命中 50 处;此处列出 3 个代表位置。命中文本可能只是文档,分析器没有执行它。
技能研究档案
Optimizes SQL queries, designs database schemas, and troubleshoots performance issues. Use when a user asks why their query is slow, needs help writing complex joins or aggregations, mentions database performance issues, or wants to design or migrate a schema. Invoke for complex queries, window functions, CTEs, indexing strategies, query plan analysis, covering index creation, recursive queries, EXPLAIN/ANALYZE interpretation, before/after query benchmarking, or migrating queries between database dialects (PostgreSQL, MySQL, SQL Server, Oracle).
Optimizes SQL queries, designs database schemas, and troubleshoots performance issues. Use when a user asks why their query is slow, needs help writing complex joins or aggregations, mentions database performance issues, or wants to design or migrate a schema. Invoke for complex queries, window functions, CTEs, indexing strategies, query plan analysis, covering index creation, recursive queries, EXPLAIN/ANALYZE interpretation, before/after query benchmarking, or migrating queries between database dialects (PostgreSQL, MySQL, SQL Server, Oracle).
Skill Atlas editorial review · editorial-preview-1.0.0
指导 SQL 查询优化与表结构设计:先分析 schema,用 CTE 和窗口函数编写基于集合的查询,再通过 EXPLAIN ANALYZE 检查执行计划。
对所收集的 SKILL.md 及辅助文本/代码进行确定性静态分析。机器辅助候选和发现等待人工编辑复核;不评估动态行为或效果。
文件清单来自记录提交中的采集源码。路径与大小属于结构观察,不代表质量评价。
skills/sql-pro/references/database-design.md引用12.2 KBskills/sql-pro/references/dialect-differences.md引用11.7 KBskills/sql-pro/references/optimization.md引用10.6 KBskills/sql-pro/references/query-patterns.md引用7.3 KBskills/sql-pro/references/window-functions.md引用8.7 KBskills/sql-pro/SKILL.md指令5.3 KB{
"name": "sql-pro",
"description": "Optimizes SQL queries, designs database schemas, and troubleshoots performance issues. Use when a user asks why their query is slow, needs help writing complex joins or aggregations, mentions database performance issues, or wants to design or migrate a schema. Invoke for complex queries, window functions, CTEs, indexing strategies, query plan analysis, covering index creation, recursive queries, EXPLAIN/ANALYZE interpretation, before/after query benchmarking, or migrating queries between database dialects (PostgreSQL, MySQL, SQL Server, Oracle).",
"license": "MIT",
"metadata": {
"author": "https://github.com/Jeffallan",
"company": "https://synergetic.solutions",
"version": "1.1.0",
"domain": "language",
"triggers": "SQL optimization, query performance, database design, PostgreSQL, MySQL, SQL Server, window functions, CTEs, query tuning, EXPLAIN plan, database indexing",
"role": "specialist",
"scope": "implementation",
"output-format": "code",
"related-skills": "devops-engineer"
}
}此工作流根据源码材料重建表面顺序。除非明确记录受控评估,否则它属于暂定解读,而非真实运行轨迹。
对照描述中的触发场景:慢查询、复杂连接、窗口函数、表结构设计或方言迁移。
使用 CTE、窗口函数和合适的连接编写基于集合的操作。
确认大表上没有顺序扫描;若未达到 100ms 目标,则继续调整索引或重写查询。
提供优化后的查询、所需索引、执行计划分析和性能指标。
静态发现用于提示安装前需要检查的位置,不能证明一项技能安全、恶意或有效。
收集的文本中有 56 项确定性词法发现需要复核。发现可能仅位于文档中,不证明已执行或可被利用;仅含二进制的文件未扫描。
此行包含可能的文件写入或重定向操作。应检查目标路径和覆盖行为;静态审查没有写入任何文件。 该规则在收集文本中命中 50 处;此处列出 3 个代表位置。命中文本可能只是文档,分析器没有执行它。
此源文件行包含 URL 或网络客户端。应检查目标地址、发送的数据和信任边界;静态文本无法证明实际发生了网络活动。 该规则在收集文本中命中 6 处;此处列出 3 个代表位置。命中文本可能只是文档,分析器没有执行它。
先在非生产副本上运行 EXPLAIN ANALYZE 和生成的 DDL,因为它们会实际执行查询并创建索引。
发现、激活与资源层具有不同含义。只有使用指定官方方法并记录模型的运行时,才显示精确数值。
在管线使用明确模型执行官方精确计数之前,包括文件清单在内的所有 token 值均为 null。
未使用要求的官方方法记录 token 测量。本档案不会用字符数、文件大小或估计值替代。
该技能仅具备以上标明的证据。不声称任何任务成功率、token 效率、延迟或质量优势。
git clone https://github.com/Jeffallan/claude-skills.git
cd claude-skills
# 将该 Skill 目录复制到以下任一位置:
# ~/.claude/skills/sql-pro
# .claude/skills/sql-pro确认目标位置能够发现 SKILL.md,然后让 Claude Code 在一个小任务中使用 sql-pro。
Use the sql-pro skill to speed up a slow query that joins orders and customers filtered on created_at in the last 30 days. Analyze the EXPLAIN ANALYZE output, propose a covering index and show the before and after query.
Read the sql-pro skill at https://github.com/Jeffallan/claude-skills/blob/67c1961b180dc92cf08983344627109e983e8f51/skills/sql-pro/SKILL.md. Explain its workflow, required tools, permissions and the main risks before I decide whether to install it.
研究结论当可以查看真实执行计划时,这是一份实用的、以清单驱动的查询调优 Skill。
档案是对公开工件的限时阅读,而非背书。请通过来源链接检查确切的上游材料。
67c1961b180dc92cf08983344627109e983e8f51仅对提供的文件进行确定性词法解析、YAML frontmatter 校验、文件清单、来源描述的工作流程提取和启发式暂定分类。由机器生成;无 LLM、执行、动态测试或人工编辑批准。