Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide for researching SQL syntax and behavior for database backends. Use when you need to research how a SQL function, command, or feature works in a specific database before implementing it in dbplyr.
.claude/skills/microck-sql-research/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-21 | ✓→✗ | ▼ Worse | 99% | 0% |
| case-22 | ✓→✗ | ▼ Worse | -44% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 49% | 0% |
Use this skill when researching SQL syntax and behavior for any database backend before implementing translations or features in dbplyr.
SQL correctness is paramount in dbplyr. You MUST complete research and documentation BEFORE implementing any SQL-related code.
Use WebSearch to find official documentation for "{dialect} {function/command}":
Create research/{dialect}-{command}.md with the following structure:
markdown# {Dialect} - {Function/Command} ## Summary [1-2 sentence summary focused on R-to-SQL translation] ## Syntax [Minimal syntax examples from official sources] ## Key behaviors [Only behaviors that matter for dbplyr translation] ## Limitations [Only restrictions that affect dbplyr usage] ## Sources - [Source name](URL) - [Source name](URL)
Documentation guidelines:
Cross-reference multiple sources when:
Best practices:
Only after completing research and documentation should you:
markdown# PostgreSQL - POSITION ## Summary Returns the starting position of a substring within a string (1-indexed). ## Syntax POSITION(substring IN string) ## Key behaviors - Returns integer position (1-indexed) - Returns 0 if substring not found - Case-sensitive by default - NULL if any argument is NULL ## Sources - [PostgreSQL String Functions](https://www.postgresql.org/docs/current/functions-string.html)
markdown# SQL Server - STRING_AGG ## Summary Concatenates string values with a specified separator, optionally ordering results. ## Syntax STRING_AGG(expression, separator) [WITHIN GROUP (ORDER BY order_expression)] ## Key behaviors - Available in SQL Server 2017+ (compatibility level 110+) - Returns NULL for empty groups - Separator must be a literal or variable, not an expression - WITHIN GROUP clause is optional but commonly used for deterministic ordering - Maximum output length is 2GB ## Limitations - Not available in SQL Server 2016 or earlier - Cannot use with DISTINCT (use subquery instead) - Separator cannot be a computed expression ## Sources - [SQL Server STRING_AGG](https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql) - [Compatibility requirements](https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql#compatibility-support)
Before completing SQL research:
research/{dialect}-{function}.md| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 17,765 | 4,552 | -74% | 1 | 1 | 0% | 3,227 | 1,427 | -56% | 0 | 0 | — |
case-02 | fail→fail | 23,104 | 5,509 | -76% | 1 | 1 | 0% | 4,056 | 1,499 | -63% | 0 | 0 | — |
case-03 | fail→fail | 17,953 | 5,205 | -71% | 1 | 1 | 0% | 3,245 | 1,543 | -52% | 0 | 0 | — |
case-04 | fail→fail | 21,127 | 7,214 | -66% | 1 | 1 | 0% | 3,618 | 1,518 | -58% | 0 | 0 | — |
case-05 | fail→fail | 12,916 | 5,464 | -58% | 1 | 1 | 0% | 2,283 | 1,407 | -38% | 0 | 0 | — |
case-06 | fail→fail | 20,532 | 5,871 | -71% | 1 | 1 | 0% | 2,976 | 1,501 | -50% | 0 | 0 | — |
case-07 | fail→fail | 18,761 | 5,841 | -69% | 1 | 1 | 0% | 3,361 | 1,486 | -56% | 0 | 0 | — |
case-08 | fail→fail | 21,727 | 5,408 | -75% | 1 | 1 | 0% | 3,862 | 1,511 | -61% | 0 | 0 | — |
case-09 | fail→fail | 24,651 | 5,129 | -79% | 1 | 1 | 0% | 4,117 | 1,389 | -66% | 0 | 0 | — |
case-10 | fail→pass | 25,516 | 18,781 | -26% | 1 | 1 | 0% | 4,907 | 4,255 | -13% | 0 | 0 | — |
case-16 | fail→fail | 18,418 | 6,871 | -63% | 1 | 1 | 0% | 3,297 | 1,610 | -51% | 0 | 0 | — |
case-11 | fail→fail | 24,420 | 5,564 | -77% | 1 | 1 | 0% | 4,276 | 1,501 | -65% | 0 | 0 | — |
case-12 | fail→pass | 19,674 | 17,873 | -9% | 1 | 1 | 0% | 3,492 | 3,845 | +10% | 0 | 0 | — |
case-13 | fail→fail | 22,651 | 6,057 | -73% | 1 | 1 | 0% | 3,998 | 1,442 | -64% | 0 | 0 | — |
case-14 | fail→fail | 35,914 | 5,727 | -84% | 1 | 1 | 0% | 3,587 | 1,417 | -60% | 0 | 0 | — |
case-15 | fail→fail | 22,195 | 7,372 | -67% | 1 | 1 | 0% | 3,926 | 2,442 | -38% | 0 | 0 | — |
case-17 | fail→fail | 17,218 | 6,201 | -64% | 1 | 1 | 0% | 3,139 | 1,539 | -51% | 0 | 0 | — |
case-18 | fail→fail | 19,289 | 5,183 | -73% | 1 | 1 | 0% | 3,424 | 1,428 | -58% | 0 | 0 | — |
case-19 | fail→fail | 26,010 | 4,970 | -81% | 1 | 1 | 0% | 4,631 | 1,505 | -68% | 0 | 0 | — |
case-20 | pass→pass | 13,157 | 13,290 | +1% | 1 | 1 | 0% | 2,358 | 3,511 | +49% | 0 | 0 | — |
case-21 | pass→fail | 14,803 | 28,868 | +95% | 1 | 1 | 0% | 2,896 | 5,766 | +99% | 0 | 0 | — |
case-22 | pass→fail | 16,210 | 6,791 | -58% | 1 | 1 | 0% | 2,664 | 1,500 | -44% | 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 5 counted toward the lift figure. The other 17 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 0 percentage points is the difference between those two pass rates over the 5 comparable cases. 8 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.