Skip to main content

sql-debugging-and-repair

Use this skill when the user wants data where the agent does not start from scratch, but must fix broken SQL. Trigger it for requests like “make debugging tasks”, “start from a wrong query”, “the model should repair existing SQL”, or “I want issue-resolution examples rather than plain text-to-SQL.” Example trigger: “I want SQL repair tasks, not blank-slate generation.” Example trigger: “Give the agent a buggy query and make it fix it.” Example trigger: “The challenge should be diagnosis plus correction.”

来源信息

仓库
Dingxingdi/paper_fast_search_backup
最近来源活动
2026年4月8日 15:14
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
4 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
sql debugging and repair
description
Use this skill when the user wants data where the agent does not start from scratch, but must fix broken SQL. Trigger it for requests like “make debugging tasks”, “start from a wrong query”, “the model should repair existing SQL”, or “I want issue-resolution examples rather than plain text-to-SQL.” Example trigger: “I want SQL repair tasks, not blank-slate generation.” Example trigger: “Give the agent a buggy query and make it fix it.” Example trigger: “The challenge should be diagnosis plus correction.”
# Skill: sql debugging and repair ## 1. Capability Definition & Real Case * **Professional Definition**: The ability to inspect an existing but incorrect SQL query, diagnose why it fails or behaves undesirably, interact with the schema or execution environment, and produce a corrected SQL solution. * **Dimension Hierarchy**: Robustness and Adaptation->Corrective Reasoning->sql debugging and repair ### Real Case **[Case 1]** * **Initial Environment**: A relational database contains a hierarchical card_type table with parent-child references. The user already has a recursive query that executes, but its output structure does not match the desired grouped tree representation. * **Real Question**: I have a certain hierarchy of data in the card_type table ... I would prefer to have a structured output where each parent card includes a list of its child cards ... Can you guide me on how to achieve this transformation using SQL? * **Real Trajectory**: Read the issue description, inspect the existing recursive SQL, identify that it aggregates parent paths rather than child groups, revise the recursion and aggregation logic, and validate the repaired query. * **Real Answer**: The correct solution rewrites the recursive logic so the output groups child-card identifiers under the intended parent structure. * **Why this demonstrates the capability**: The problem is not natural-language-to-SQL from scratch. The agent must first understand the user’s intended output format, then diagnose how the current recursive query deviates from that intent, and only then repair it. That makes debugging and repair the primary capability under test. ## Pipeline Execution Instructions To synthesize data for this capability, you must strictly follow a 3-phase pipeline. **Do not hallucinate steps.** Read the corresponding reference file for each phase sequentially: 1. **Phase 1: Environment Exploration** Read the exploration guidelines to discover raw knowledge seeds: `references/EXPLORATION.md` 2. **Phase 2: Trajectory Selection** Once Phase 1 is complete, read the selection criteria to evaluate the trajectory: `references/SELECTION.md` 3. **Phase 3: Data Synthesis** Once a trajectory passes Phase 2, read the synthesis instructions to generate the final data: `references/SYNTHESIS.md`
在 GitHub 查看