Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Expert system for generating, validating, and optimizing ClickHouse SQL. Use this when the user needs data, queries, or analysis.
.claude/skills/frankchen021-sql-expert/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-05 | ✓→✗ | ▼ Worse | -22% | 0% |
| case-14 | ✓→✗ | ▼ Worse | -24% | 0% |
| case-11 | ✓→✗ | ▼ Worse | -18% | 0% |
| case-13 | ✗→✗ | = Same ✗ | 45% | 0% |
> ## 🚨 CRITICAL RULE: MANDATORY VALIDATION > You MUST call validate_sql(sql) for every new query you generate. > Context Note: Historical validation steps are pruned to save tokens, but this does NOT excuse you from validating new queries in the current turn. Always validate before executing.
get_tables and explore_schema first.columns argument of explore_schema instead of loading the full table schema.ProfileEvent_*, CurrentMetric_*, and flattened event columns on system.* tables.explore_schema with a narrower columns list based on the user-mentioned identifier or the closest confirmed column names.explore_schema. Do not assume standard columns exist if they are not in the tool output.WHERE user = '<clickHouseUser>'.system.* tables (e.g., system.query_log, system.parts, system.merges), defer to the clickhouse-system-queries skill - it contains table-specific patterns, predicates, and resource metrics that this skill does not cover. For system.query_log, do not generate SQL until references/system-query-log.md has been loaded via skill_resource, and do not call search_query_log for chart/time-series requests.database.table).;).LIMIT for data exploration queries.event_date or timestamp) first. Use bounded time windows (e.g., last 24h, 7 days) unless the user asks for all history.WHERE event_time > now() - 1h (If PK is event_date, event_time, this scans everything).WHERE event_date >= toDate(now() - 1h) AND event_time > now() - 1h (Uses index, handles midnight crossover).uniq() instead of uniqExact() unless precision is explicitly requested.GLOBAL IN only for distributed queries.validate_sql(sql).execute_sql(sql).| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→fail | 5,811 | 3,787 | -35% | 1 | 1 | 0% | 756 | 1,093 | +45% | 0 | 0 | — |
case-01 | fail→fail | 36,000 | 62,338 | +73% | 1 | 1 | 0% | 1,187 | 1,055 | -11% | 0 | 0 | — |
case-02 | fail→fail | 8,772 | 26,071 | +197% | 1 | 1 | 0% | 1,643 | 1,164 | -29% | 0 | 0 | — |
case-03 | fail→fail | 5,014 | 4,259 | -15% | 1 | 1 | 0% | 1,091 | 1,148 | +5% | 0 | 0 | — |
case-04 | fail→fail | 9,776 | 38,531 | +294% | 1 | 1 | 0% | 2,204 | 1,241 | -44% | 0 | 0 | — |
case-05 | pass→fail | 16,504 | 11,787 | -29% | 1 | 1 | 0% | 3,008 | 2,337 | -22% | 0 | 0 | — |
case-06 | fail→pass | 15,694 | 8,537 | -46% | 1 | 1 | 0% | 2,199 | 2,464 | +12% | 0 | 0 | — |
case-07 | fail→fail | 7,651 | 6,647 | -13% | 1 | 1 | 0% | 1,498 | 1,255 | -16% | 0 | 0 | — |
case-08 | fail→fail | 11,361 | 4,827 | -58% | 1 | 1 | 0% | 1,736 | 1,100 | -37% | 0 | 0 | — |
case-14 | pass→fail | 8,994 | 8,029 | -11% | 1 | 1 | 0% | 1,432 | 1,088 | -24% | 0 | 0 | — |
case-09 | fail→fail | 7,943 | 4,113 | -48% | 1 | 1 | 0% | 1,462 | 1,119 | -23% | 0 | 0 | — |
case-10 | fail→fail | 10,551 | 34,788 | +230% | 1 | 1 | 0% | 2,149 | 1,116 | -48% | 0 | 0 | — |
case-11 | pass→fail | 6,514 | 4,025 | -38% | 1 | 1 | 0% | 1,261 | 1,030 | -18% | 0 | 0 | — |
case-12 | fail→fail | 18,043 | 3,985 | -78% | 1 | 1 | 0% | 2,102 | 1,084 | -48% | 0 | 0 | — |
case-15 | fail→fail | 8,300 | 4,417 | -47% | 1 | 1 | 0% | 1,303 | 1,138 | -13% | 0 | 0 | — |
case-16 | fail→fail | 11,218 | 4,373 | -61% | 1 | 1 | 0% | 1,904 | 1,074 | -44% | 0 | 0 | — |
case-17 | fail→fail | 3,101 | 4,736 | +53% | 1 | 1 | 0% | 541 | 1,115 | +106% | 0 | 0 | — |
case-18 | fail→fail | 7,517 | 3,796 | -50% | 1 | 1 | 0% | 1,439 | 1,098 | -24% | 0 | 0 | — |
case-19 | fail→fail | 4,301 | 3,402 | -21% | 1 | 1 | 0% | 281 | 1,052 | +274% | 0 | 0 | — |
case-20 | fail→fail | 7,536 | 4,330 | -43% | 1 | 1 | 0% | 1,498 | 1,101 | -27% | 0 | 0 | — |
case-21 | fail→fail | 8,490 | 5,724 | -33% | 1 | 1 | 0% | 1,777 | 1,204 | -32% | 0 | 0 | — |
case-22 | fail→fail | 2,760 | 3,809 | +38% | 1 | 1 | 0% | 459 | 1,077 | +135% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 1 counted toward the lift figure. The other 21 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -9 percentage points is the difference between those two pass rates over the 1 comparable cases. 11 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.