visualization-standards

A set of rules for choosing and creating diagrams, charts, plots, and other visuals in textbook chapters.

In plain words
What is it for?
Use it when researching, writing, editing, or updating chapters that need source figures, diagrams, data plots, or illustrations.
Why use it?
It helps ensure that each concept gets an appropriate visual and that numerical charts are made accurately.

Cursor rule for Cursor

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 rules/ai-learning-gems/ai-learning-gems.github.io/visualization-standards
Clone the repo
git clone --depth 1 https://github.com/AI-Learning-Gems/AI-Learning-Gems.github.io

Made for: Cursor.

Per session 3,406 This file is loaded in full into every session.
When invoked 3,406 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.03406 $0.03406
Opus 5 $0.01703 $0.01703
Sonnet 5 $0.00681 $0.00681
Haiku 4.5 $0.00341 $0.00341

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

Security

Grade A, and why

visualization-standards 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.

.cursor/rules/visualization-standards.mdc · 300 lines

How it starts

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

Visualization Standards

Shared visualization rules for all textbook chapter workflows (research, write, edit, update).

Goal: Your chapter should contain the absolutely perfect picture to explain each concept.


Visual Priority Order (CRITICAL)

Follow this order when choosing how to illustrate a concept:

  1. Source images from downloaded papers — Check the TEXTBOOK-PLAN.md Source Image Catalog FIRST. These are canonical, authoritative figures that readers expect to see. Copy them to {Chapter}/images/ and embed.
  2. D2 diagrams — for concept maps, flowcharts, and structural diagrams. Always use ELK engine.
  3. Python/hvplot (bokeh backend) — for data visualizations, distributions, function plots, and ANY visual that must be numerically accurate.
  4. Web downloads — for images not in sources/ (search and download during writing).
  5. generate_image — ONLY for decorative/conceptual illustrations where numerical accuracy is irrelevant (e.g., a stylized icon, a non-data artistic illustration). See the warning below.

NEVER use generate_image for plots, charts, graphs, reliability diagrams, bar charts, heatmaps, confusion matrices, or ANY visual that needs to display accurate data.

LLM image generation tools (e.g. Gemini Imagen, DALL-E) produce visually plausible but factually incorrect data in plots. The numbers, axis labels, bar heights, curve shapes, and data points will look reasonable but will be WRONG. This is unacceptable in a textbook.

For any visual that contains numerical data, use one of these instead:

  • Source images from papers — always preferred for canonical results (copy from sources/)
  • Python code — generate the plot programmatically with hvplot (bokeh backend) or matplotlib directly, using real data or carefully constructed synthetic data
  • Web download — find the original published figure online and download it

The ONLY acceptable use of generate_image is for purely conceptual/artistic illustrations where no data accuracy is needed (e.g., a stylized banner image, an abstract concept illustration).

Read the full file on GitHub · 300 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 · 300 lines · 3,406 tokens per session scan A 5ced386170e9

Subscribe to this mod's changes

visualization-standards is a cursor rule published in the GitHub repository AI-Learning-Gems/AI-Learning-Gems.github.io (22 stars, last pushed 2mo ago), licensed MIT. It adds 3,406 tokens to every session, about $0.0170 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.