Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Diagnoses slow SQL queries and rewrites them for safer performance. Applies a structured playbook with checkpoints and quality gates to development tasks that need repeatable steps and practical outputs. Returns ranked findings, action plans with risk mitigations, and exact commands or checklists.
The built-in quality gates and fallback requirements prevent shipping unverified fixes, reducing the risk of regressions from ad-hoc query changes.
When to use it
- Diagnosing an 8-second dashboard query before a production deploy
- Rewriting a report query that times out under load
- Creating a phased refactor plan for a slow legacy schema
- Getting a risk-ranked fix list for a database performance incident
- Turning vague slowness complaints into a prioritized action sequence
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: My dashboard query takes 8 seconds on a 2M-row table. Here are the query and the EXPLAIN output.
- 1Define success criteria: query must run under 500ms on production data
- 2Identify the smallest fix path, starting with missing indexes before considering rewrites
- 3Execute each candidate fix in a staging checkpoint and record EXPLAIN ANALYZE output
- 4Apply quality gate: confirm no full-table scans remain and a rollback script is ready
- 5Return ranked findings, today/this-week action plan, and exact index or rewrite commands
Situation summary, top bottlenecks ranked by impact, specific ALTER/CREATE INDEX commands, risk mitigations, and a fallback rollback plan