check-chart-preview
Skill160 starsChanged 6 months agoMITView on GitHub
Check chart or multidim preview on the staging server using a browser. Use when user wants to visually verify a chart renders correctly on staging, take a screenshot of a chart, or QA a chart/mdim preview.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
Use the resulting PNG by reading it directly with the Read tool (Claude can view images).
- Distinctive: line 97
If the chart hasn't been pushed yet:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Check Chart/Mdim Preview on Staging
Visually verify that a chart or multidimensional indicator page renders correctly on the staging server.
Prerequisites
- A staging server must be running for the current git branch (check via
curl -s -o /dev/null -w "%{http_code}" http://<container>/) - The chart/mdim must have been pushed to staging already (either via
etlr --watchin VSCode or manually) - For non-trivial UI checks (MDIM dropdowns, link/unlink chips, etc.) the
agent-browserskill is needed; for plain PNG snapshots it isn't
Getting the Staging URL
Option 1: Helper script (recommended)
.venv/bin/python .claude/skills/check-chart-preview/get_staging_url.py <slug-or-path>Accepts chart slugs, mdim slugs, or file paths:
# Chart slug (most common)
.venv/bin/python .claude/skills/check-chart-preview/get_staging_url.py life-expectancy
# Mdim slug
.venv/bin/python .claude/skills/check-chart-preview/get_staging_url.py energy/latest/energy_prices#energy_prices
# Export multidim file path
.venv/bin/python .claude/skills/check-chart-preview/get_staging_url.py etl/steps/viz/chart/energy/latest/energy_prices.config.yml
# Chart file path
.venv/bin/python .claude/skills/check-chart-preview/get_staging_url.py etl/steps/graph/covid/latest/covid-cases.chart.ymlOption 2: Construct manually
- Get the git branch:
git branch --show-current - Compute container name: replace
/._with-in branch name, strip anystaging-site-prefix, prependstaging-site-, truncate the normalized part to 28 chars, strip trailing- - Determine chart type and URL:
| File type | URL pattern |
.chart.yml (simple, no # in slug) | http://<container>/grapher/<slug> |
.chart.yml (mdim, # in slug) | http://<container>/admin/grapher/<catalogPath> |
viz/chart/*.config.yml or *.py | http://<container>/admin/grapher/<namespace>/<version>/<shortName>%23<shortName> |
For .chart.yml: the slug is in the YAML slug: field. For mdim slugs containing #, the catalogPath inserts the version from the file path.
For viz chart steps: derive from path etl/steps/viz/chart/<namespace>/<version>/<shortName>.* → catalogPath is <namespace>/<version>/<shortName>#<shortName>.
Checking the Preview
Recommended: PNG via /grapher/by-uuid/<UUID>.png (works for drafts)
The fastest, most reliable way to grab a chart's rendered image — works for drafts as well as published charts, no browser, no auth required. Uses the same render pipeline OWID's public site uses for /grapher/<slug>.png, but addresses the chart by its chart_configs.id UUID, which is published to R2's byUUID/ directory for every chart (whether or not the chart itself is isPublished).
# Resolve slug → by-uuid PNG URL, then fetch
URL=$(.venv/bin/python .claude/skills/check-chart-preview/get_chart_png_url.py <slug-or-id>)
curl -o ai/chart_preview.png "$URL"Pass extra grapher query params with --<key>=<value>:
.venv/bin/python .claude/skills/check-chart-preview/get_chart_png_url.py <slug> --tab=map
.venv/bin/python .claude/skills/check-chart-preview/get_chart_png_url.py <slug> --tab=chart --time=earliest..2020The helper queries the staging MySQL via etl.config.OWID_ENV.read_sql (which auto-routes to staging-site-<branch>).
Use the resulting PNG by reading it directly with the Read tool (Claude can view images).
Fallback: browser preview for mdim pages / interactive UI
The by-uuid PNG route renders a single chart frame. For MDIM data pages with dropdowns, or for verifying interactive UI (controls, link/unlink chips, etc.), use the agent-browser skill to navigate to the staging URL from get_staging_url.py and take an in-browser screenshot.
Quick PNG check (published charts only)
For charts that are already published, the slug-based PNG route also works:
curl -o ai/chart_preview.png "http://<container>/grapher/<slug>.png?nocache"This 404s for drafts — use the by-uuid route above instead.
Pushing to Staging First
If the chart hasn't been pushed yet:
# For graph step charts
.venv/bin/etlr graph://<namespace>/<version>/<slug> --graph --graph-push
# For viz chart steps (charts and MDIMs)
.venv/bin/etlr viz://chart/<namespace>/<version>/<shortName> --grapherIn this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/instructions/copilot-instructions.mdCopilot instructions
- add-gdp-scatterSkill
- add-ivs-indicatorsSkill
- add-provider-regionsSkill
- babysit-prSkill
- check-empty-entitiesSkill
- check-hardcoded-yearsSkill
- check-metadata-styleSkill
- check-metadata-typosSkill
- check-outdated-practicesSkill
- create-chartSkill
- create-datasetSkill
- create-etl-stepsSkill
- create-explorerSkill
- create-snapshotSkill
- create-static-vizSkill
- develop-vscode-extensionSkill
- develop-wizard-appSkill
- draft-data-update-slack-postSkill
- edit-faust-metadataSkill
- fact-check-datasetSkill
- find-chart-referencesSkill
- fix-dependabotSkill
- generate-metadataSkill
- map-charts-to-mdimSkill
- map-explorer-to-mdimSkill
- migrate-explorer-to-etlSkill
- profile-etl-stepSkill
- query-grapher-dbSkill
- remap-ghost-variablesSkill
- report-indicator-changesSkill
- review-data-prSkill
- sync-grapher-schemaSkill
- tool-owlSkill
- update-climate-dataSkill
- update-datasetSkill
- update-wildfires-dataSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

