ggsql Query Writer
SkillDev toolsWrites, modifies, explains, validates, and runs ggsql grammar-of-graphics visualization queries.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the ggsql Query Writer skill
What this skill tells your AI
The instructions your AI receives, as published by edmundmiller/dotfiles in skills/catalog/ggsql/SKILL.md and read by ahel’s review.
Write valid ggsql visualization queries from natural-language requests. ggsql combines SQL data shaping with a declarative grammar of graphics.
Use this skill when
- Creating or modifying a ggsql query.
- Converting a chart request into ggsql.
- Explaining, validating, or running ggsql.
- Choosing ggsql layers, mappings, scales, facets, projections, or labels.
Do not trigger for ordinary SQL work that has no visualization component.
Required reference
Read references/syntax.md before writing or changing a query. It is the complete upstream language reference and defines the allowed clauses, aesthetics, layers, settings, palettes, and CLI commands.
Never invent ggsql syntax. If the reference does not document a requested feature, say so and offer the closest documented form.
Workflow
- Identify the data source, columns, desired visual encodings, grouping, and output.
- Shape data with SQL or CTEs before
VISUALISEwhen necessary. - Choose the simplest documented
DRAWlayer and mappings. - Add
SCALE,FACET,PROJECT, orLABELonly when the request needs them. - If
ggsqlis available, validate withggsql validate. Render withggsql exec ... -vonly when output is requested. - Return the complete query, then briefly explain consequential choices.
Minimal pattern
SELECT category, SUM(value) AS total
FROM 'data.parquet'
GROUP BY category
VISUALISE category AS x, total AS y
DRAW bar
LABEL
title => 'Total by category',
x => 'Category',
y => 'Total'
Alternatively, let VISUALISE name the source:
VISUALISE bill_len AS x, bill_dep AS y, species AS color
FROM ggsql:penguins
DRAW point
Guardrails
- Use only documented clauses, settings, aesthetics, layers, transforms, and palettes.
- Preserve the user's source names and column names.
- Prefer
ggsql:penguinsorggsql:airqualityonly when example data is needed. - Do not claim validation or rendering unless the command actually ran.
- Keep SQL portable unless the selected backend requires a documented dialect feature.
Signals
- GitHub stars
- 80
- Forks
- 6
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
ggsql- Source
- github.com/edmundmiller/dotfiles