Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

ggsql Query Writer

Writes and validates ggsql queries that fuse SQL with a grammar-of-graphics visualization spec.

Data & AnalyticsIntermediate★ 537⑂ 54AI score 8/10Last updated: Oct 7, 2026

What it does

  • Loads the full ggsql syntax (SQL + grammar of graphics) into Claude so generated queries actually parse — with an explicit rule never to invent clauses, settings, aesthetics, or palette names.
  • Covers VISUALISE, DRAW layers (point, line, path, bar, histogram, density, boxplot, violin, smooth, area, ribbon, segment, rule, text, rect, polygon, range), plus SCALE, FACET, PROJECT, LABEL, and PLACE.
  • Documents advanced aggregation (SETTING aggregate with reductions, positional functions, and band specs like mean+1.96sdev), explosion via REMAPPING aggregate, and scale interaction rules.
  • Encodes CLI etiquette: validate with ggsql validate, render with ggsql exec ... -o chart.svg, and never call blocking ggsql view.

Who it's for

  • SQL/DuckDB users who want ggplot-style charts from a single query.
  • Data analysts and engineers already running the ggsql binary.
  • Anyone who'd rather describe a chart in plain language than hand-write a spec.

Examples

  1. "Scatter of bill length vs depth colored by species" → VISUALISE bill_len AS x, bill_dep AS y, species AS fill FROM ggsql:penguins DRAW point
  2. "Donut chart of revenue share by region from a CSV" → aggregate in a CTE, then DRAW bar with PROJECT TO polar SETTING inner => 0.5
  3. "Monthly mean ±1.96 SD band" → DRAW ribbon SETTING aggregate => ('mean-1.96sdev','mean+1.96sdev') PARTITION BY Month

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/posit-dev/skills/HEAD/ggsql/ggsql/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the ggsql/ggsql folder from the GitHub repo posit-dev/skills into my ~/.claude/skills/ggsql/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/posit-dev/skills.git /tmp/posit-skills && mkdir -p ~/.claude/skills && cp -r /tmp/posit-skills/ggsql/ggsql ~/.claude/skills/ggsql

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/posit-dev/skills.git /tmp/posit-skills
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill in: cp -r /tmp/posit-skills/ggsql/ggsql ~/.claude/skills/ggsql
  5. Install the ggsql CLI (see https://ggsql.org) and verify with ggsql --version.
  6. Restart Claude Code, then ask something like "write a ggsql query for a penguins scatter plot" to trigger the skill.
  7. For images, ask for -o chart.svg or .pdf output — those writers need no GPU.