Data SQL Writer
Write, explain and debug SQL in your own dialect, catching the errors that silently return wrong numbers. Use for writing queries, duplicated results or numbers that look too high.
Install
npx skills add eshmith7/claude-skills-library --skill data-sql-writergit clone --depth 1 https://github.com/eshmith7/claude-skills-library.git /tmp/claude-skills-library
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills-library/data-skills/data-sql-writer ~/.claude/skills/data-sql-writerPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# SQL Writer and Debugger A query that errors out is a small problem. A query that runs cleanly and returns a wrong number is a large one, because it gets pasted into a report and believed. Most bad SQL in the wild does not fail. It quietly counts things twice. ## When to use this Trigger on: write a query, SQL help, "my query returns duplicates", "these numbers look too high", explain this query, optimise this query, "how do I get X from these tables". ## Before you start Required: the question you need answered, plus the two things below. Ask for these two. Do not guess at either. 1. **The dialect.** MySQL, PostgreSQL, SQL Server, Oracle, BigQuery, Snowflake, Redshift, Databricks or SQLite. Syntax for dates, string functions, limits and window frames differs enough that a query written for the wrong one either fails or, worse, behaves differently. 2. **The schema.** Table names, column names, types, and how the tables relate. A description in plain English is fine. A `CREATE TABLE` statement is better. Then establish the one thing that decides whether the query is correct: **What does one row of the result represent?** One customer, one order, one order line, one customer per month. Ask it explicitly if it is not obvious. Almost every silently wrong query comes from confusing two grains. ## Workflow ### 1. Restate the question as a specification Before writing anything, write back what you understood: - The grain of the result
Details
- Skill name
data-sql-writer- Repository
- eshmith7/claude-skills-library
- Path
data-skills/data-sql-writer/SKILL.md- Repo updated
- 9 September 2026
FAQ
What does the Data SQL Writer skill do?
Write, explain and debug SQL in your own dialect, catching the errors that silently return wrong numbers. Use for writing queries, duplicated results or numbers that look too high.
How do I install the Data SQL Writer skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add eshmith7/claude-skills-library --skill data-sql-writer. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Data SQL Writer popular?
It lives in eshmith7/claude-skills-library, which has 5 GitHub stars and 1 forks.
Related skills
Content Brief
5eshmith7/claude-skills-library
Turn a vague content request into a brief a writer can execute without a second conversation: one question, reader, intent, angle, structure, evidence required. Use for content briefs.
Content Performance Audit
5eshmith7/claude-skills-library
Turn a performance export into one decision per asset: keep, refresh, rewrite, consolidate or delete, with cannibalisation groups found first. Use for content audits or pruning.
Content Prepublication Check
5eshmith7/claude-skills-library
Check a draft before publishing: every claim registered with its source, numbers verified, headline against body, originality and compliance flags. Use before anything goes out.
Health Claim Readiness
5eshmith7/claude-skills-library
Check a claim or pre-auth pack for what a payer will query, then draft the justification letter or query response from clinician content. Use for pre-auth, claims or denials.
Content Voice Guide
5eshmith7/claude-skills-library
Derive a testable brand voice guide from real samples, then check drafts against it. Use for tone of voice, style guides, writer onboarding or inconsistent content.
Health Patient Instructions
5eshmith7/claude-skills-library
Turn clinician content into plain-language patient instructions with a time-of-day medication grid, red flags and a verbal script. Use for discharge, pre-op or post-op instructions.
Browse the most popular Claude skills, all writing & content skills, or write your own with the skills generator.