Agent skill

Query Grapher DB

by owid in owid/etl

Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server.

MITAuto-check passedDatabases

Install Query Grapher DB

skills CLI
$ npx skills add owid/etl --skill query-grapher-db -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install owid/etl query-grapher-db --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/owid/etl.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/query-grapher-db .claude/skills/query-grapher-db && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
query-grapher-db
GitHub stars
159
Token cost
~731 tokens
SKILL.md length
274 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server.

  • You need to run SQL against grapher
  • SKILL.md covers Quick queries (staging), Python (for more control), Production queries via public… and Verifying charts on staging
  • Calls make and curl; reaches api-staging.owid.io and datasette-public.owid.io
  • Find which charts use an indicator

What it does

Query Grapher DB is an agent skill from owid/etl. Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server. Use when you need to run SQL against grapher, find which charts use an indicator, assess the blast radius of a data fix, or check that a chart/indicator renders correctly on staging-site-<branch.

Its SKILL.md is about 730 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering SQL. It works with MySQL, SQL and Python. The repository describes itself as: A compute graph for loading and transforming OWID's data. The licence is MIT.

When your agent uses it

  • You need to run SQL against grapher
  • Find which charts use an indicator
  • Assess the blast radius of a data fix
  • Check that a chart/indicator renders correctly on staging-site-<branch

Example prompts

  • “/query-grapher-db”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit d5ba5a6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api-staging.owid.io
    • datasette-public.owid.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Query Grapher DB loads about 731 tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 274 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~731

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from owid/etl at commit d5ba5a6, republished under its MIT licence (© owid). 274 words, ~731 tokens.

Download SKILL.mdSave it as .claude/skills/query-grapher-db/SKILL.md (or your agent's skills folder).
name
query-grapher-db
description
Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server. Use when you need to run SQL against grapher, find which charts use an indicator, assess the blast radius of a data fix, or check that a chart/indicator renders correctly on staging-site-<branch>.
metadata.internal
true
metadata.owner
Marigold

Querying grapher MySQL and verifying charts on staging

Quick queries (staging)

bash
make query SQL="SELECT COUNT(*) FROM variables WHERE catalogPath IS NULL"

Automatically connects to staging-site-{branch} based on current git branch.

Python (for more control)

python
from etl.config import OWID_ENV
df = OWID_ENV.read_sql("SELECT * FROM datasets LIMIT 10")

Prefer Python when the SQL contains % (LIKE patterns, JSON_EXTRACT paths) or single-quoted strings — make query re-interprets those via shell + make and breaks unpredictably. Use params={...} for %/quoted values to dodge pymysql's own %-format-string parsing.

OWID_ENV targets your local dev DB even when you're on a branch. To query the branch's staging DB from Python, use OWIDEnv.from_staging('<branch>') (from etl.config import OWIDEnv) — e.g. OWIDEnv.from_staging('my-branch').read_sql(...). Also note make query shells out to the mysql CLI, which may not be installed; if it errors with mysql: command not found, use the Python from_staging(...).read_sql(...) path instead.

Production queries via public Datasette

When you need production data (which charts use an indicator, chart configs, gdoc links) and local/prod MySQL isn't reachable, query the public Datasette over HTTP:

bash
curl -s "https://datasette-public.owid.io/owid.json?sql=<url-encoded SQL>"

chart_dimensions + charts + chart_configs answer "which charts use variable X"; narrative_charts and posts_gdocs_links cover derived charts and article references — together they answer the full "what does this dataset affect?" question when assessing the blast radius of a data fix.

Verifying charts on staging

  • Indicator data/metadata API: https://api-staging.owid.io/staging-site-<branch>/v1/indicators/<id>.data.json (and .metadata.json). The path prefix is staging-site-<branch>, not the bare branch name — a wrong prefix silently serves data from a different environment instead of 404ing, which looks exactly like "my fix didn't take". When in doubt, grep the staging chart page (http://staging-site-<branch>/grapher/<slug>) for data.json to get the exact URLs it loads.
  • Rendered chart without a browser: http://staging-site-<branch>/grapher/<slug>.svg returns a server-side render — grep it for axis labels / entity names to verify a fix end-to-end (e.g. grep -oE '>[0-9]+ [a-z]+[^<]*<' to read the y-axis ticks).

© owid, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/query-grapher-db of owid/etl.

Open the folder on GitHubat commit d5ba5a6

Compare with similar skills

Query Grapher DB next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Query Grapher DB compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Query Grapher DB this skillowid/etl159—~731Automated safety check: PassMIT
Chdb SQLvemetric/vemetric3951 repos~1.2kAutomated safety check: PassApache-2.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Sql2erystemsrx/sql_to_ER188—~1.1kAutomated safety check: PassAGPL-3.0
Kolokoloai/kolo525—~1.2kAutomated safety check: PassNone
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT

Similar skills

  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    395 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Sql2er

    ystemsrx/sql_to_ER

    A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…

    188 GitHub stars~1.1k tokensUpdated 9 days ago
    DatabasesAuto-check passed
  • Kolo

    koloai/kolo

    Kolo is a text-based Python debugger that captures every executed function, return value, local variable, HTTP request, and SQL query into greppable trace files.

    525 GitHub stars~1.2k tokensUpdated 5 mo ago
    DatabasesAuto-check passed
  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 17 days ago
    DatabasesAuto-check passed
  • SQL Schema Policy Validator

    rominirani/antigravity-skills

    Validates SQL schema files for compliance with internal safety and naming policies.

    592 GitHub stars~264 tokensUpdated 3 mo ago
    DatabasesAuto-check passed

More from owid/etl

All 35 skills in this repo
  • Find every OWID surface that references a chart, indicator, MDIM, or explorer — articles (links vs embeds), explorers, narrative charts, data insights, static viz, key-chart slots, MDIM views.

    159 GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Add a scatter view (with GDP per capita on x) to existing OWID charts via the admin API, mirroring the admin UI's "Add scatter type" defaults, then retire the old standalone "X vs.

    159 GitHub stars~19k tokensUpdated today
    Auto-check passed
  • Add new survey question codes (e.g. An agent skill from owid/etl.

    159 GitHub stars~11k tokensUpdated today
    Auto-check: notes
  • Build or refresh an OWID static visualization end to end — resolve what data it needs from an old static viz image, an indicator, or a grapher chart; check both the ETL catalog and the producer's…

    159 GitHub stars~8.3k tokensUpdated today
    Auto-check passed
  • Propose redirects from (soon-to-sunset) grapher charts to the matching views of published MDIMs.

    159 GitHub stars~9.6k tokensUpdated today
    Auto-check: notes
  • Take (soon-to-sunset) OWID explorers to redirected MDIMs, end to end.

    159 GitHub stars~7.3k tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Query Grapher DB

What does Query Grapher DB do?

Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server. Query Grapher DB is an agent skill from owid/etl. Query the grapher MySQL database (local dev, a branch's staging server, or production via the public Datasette) and verify indicators and charts on a staging server.

When should I use Query Grapher DB?

Query Grapher DB fits situations like: you need to run SQL against grapher; find which charts use an indicator; assess the blast radius of a data fix; check that a chart/indicator renders correctly on staging-site-<branch.

How do I install Query Grapher DB in Claude Code?

Run `npx skills add owid/etl --skill query-grapher-db -a claude-code`. Or copy the skill folder (.claude/skills/query-grapher-db in owid/etl) into .claude/skills/query-grapher-db in your project. Claude Code loads it when a task matches its description.

How do I install Query Grapher DB in Codex?

Run `npx skills add owid/etl --skill query-grapher-db -a codex`. Or copy the skill folder (.claude/skills/query-grapher-db in owid/etl) into .agents/skills/query-grapher-db in your project. Codex loads it when a task matches its description.

Can I use Query Grapher DB in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add owid/etl --skill query-grapher-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/query-grapher-db, .gemini/skills/query-grapher-db, .github/skills/query-grapher-db and .opencode/skills/query-grapher-db in your project.

What does Query Grapher DB need to run?

Going by SKILL.md and its folder, Query Grapher DB needs the command-line tools its instructions call (make and curl). Our summary lists: Python 3.

Does Query Grapher DB access the network?

SKILL.md names 2 domains. In commands or code: api-staging.owid.io and datasette-public.owid.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Query Grapher DB safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Query Grapher DB use?

Query Grapher DB is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Query Grapher DB use?

About 731 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Query Grapher DB?

Skills that share tags, products or a category with Query Grapher DB: Chdb SQL (vemetric/vemetric, 395 stars), SQL Database Support for pREST (prest/prest, 4.6k stars), Sql2er (ystemsrx/sql_to_ER, 188 stars) and Kolo (koloai/kolo, 525 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Query Grapher DB?

owid (a GitHub organization) maintains it in owid/etl, which has 159 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 9, 2026.

Source: owid/etl on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.