Datawrapper AGENTS.md

A contributor guide for Datawrapper, a Python library for creating charts and working with the Datawrapper service. It covers setup, preferred APIs, code boundaries, and the checks expected before a change is submitted.

In plain words
What is it for?
Developing chart features, running type checks and tests, formatting code, building packages, and preparing Datawrapper changes for review.
Why use it?
It replaces guesswork about supported interfaces and project standards with the repository's agreed workflow. It also separates fast unit tests from broader mocked tests.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/chekos/datawrapper/agents-md
Clone the repo
git clone --depth 1 https://github.com/chekos/Datawrapper

Made for: Codex, OpenCode.

Per session 544 This file is loaded in full into every session.
When invoked 544 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00544 $0.00544
Opus 5 $0.00272 $0.00272
Sonnet 5 $0.00109 $0.00109
Haiku 4.5 $0.00054 $0.00054

Measured 2d ago against content hash 7adf9713e7eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Datawrapper AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent guide for Datawrapper

This repository is friendly to AI-assisted edits, but agents should stay inside the same guardrails as human contributors.

Start here

  1. Read README.md, CONTRIBUTING.md, and this file before changing code.
  2. Work from the latest main branch unless the maintainer tells you otherwise.
  3. Keep pull requests focused. Do not mix dependency upgrades, broad refactors, generated artifacts, and product changes in one PR.
  4. Prefer the object-oriented chart API (BarChart, LineChart, get_chart, etc.) for new work. Treat lower-level Datawrapper methods as legacy compatibility paths unless a task explicitly targets them.

Canonical local commands

Install the locked dependencies:

uv sync --frozen --all-extras

Run the same deterministic checks expected before a PR:

uv run ruff check ./datawrapper ./tests
uv run ruff format --check ./datawrapper ./tests
uv run mypy ./datawrapper --ignore-missing-imports
uv run pytest
uv build --sdist --wheel

Before committing, run the hook suite against all files:

uv run pre-commit run --all-files

Test strategy

  • Put fast, isolated validation in tests/unit/.
  • Put mocked multi-component behavior in tests/integration/ or tests/functional/.
  • Mark tests that require the real Datawrapper API with @pytest.mark.api and a DATAWRAPPER_ACCESS_TOKEN skip guard. The default local and CI test runs must pass without credentials.
  • Prefer responses, pytest-mock, or unittest.mock over live HTTP calls for regression tests.
  • When fixing a bug, add a regression test that would fail before the fix.

Change boundaries

  • Do not commit .venv/, .ruff_cache/, .mypy_cache/, htmlcov/, coverage.xml, dist/, or other generated outputs.
  • Do not edit uv.lock or dependency constraints unless the task is explicitly about dependency maintenance.
  • Do not add secrets, API tokens, recordings of API responses containing private data, or maintainer-specific local configuration.
  • Do not publish releases, merge pull requests, or change repository settings.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 54 lines · 544 tokens per session scan A 7adf9713e7eb

Subscribe to this mod's changes

Datawrapper AGENTS.md is an instructions file published in the GitHub repository chekos/Datawrapper (95 stars, last pushed 15d ago), licensed MIT. It adds 544 tokens to every session, about $0.0027 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.