Sandbox
@caylent/tufte-data-viz

Tufte charting skill for Claude Code

This skill tells Claude Code how to style charts and graphs using Tufte's principles: remove chartjunk, label directly, use restrained color, and keep the data front and center. It also adds screen-first guidance for accessibility, responsiveness, animation, and dark mode across multiple charting libraries.

216 stars9 forksPythonUpdated 7mo ago
Who it's for

Builders who use Claude Code to generate charts and want a reusable visual style guide.

What it delivers

You can turn default charts into clearer, more honest visuals without re-explaining your style preferences each time.

What it does

Tufte chart rules

Applies 22 rules for data-ink ratio, direct labels, range-frame axes, serif typography, and minimal decoration.

Screen-first chart guidance

Adds progressive disclosure, accessibility checks, responsive behavior, purposeful animation, and intentional dark mode.

Library-specific instructions

Includes separate rule files for Recharts, ECharts, Chart.js, matplotlib, Plotly, and D3/SVG.

Examples and demos

Shows before-and-after images, a live demo, and example code for several charting libraries.

Anti-pattern guidance

Lists common chart mistakes and one-line fixes in `rules/anti-patterns.md`.

How to get it

  1. 1Run
    npx skills add caylent/tufte-data-viz

README

tufte-data-viz

An agent skill that applies Edward Tufte's data visualization principles when generating charts, plots, and graphs. Produces clean, honest, high-data-ink-ratio visualizations across multiple charting libraries — extended with modern screen-first standards for accessibility, responsiveness, and interactivity.

Fair warning

This skill is opinionated by design. It will remove your gridlines, delete your legends, reject your pie charts, and insist on serif fonts. It enforces a specific visual philosophy — Tufte's — not a neutral one. If you want total creative freedom over your chart styling, this is not the skill for you. If you want every chart to come out clean, honest, and readable without thinking about it, read on.

Install

npx skills add caylent/tufte-data-viz

Before & After

The same data, default styling vs. Tufte principles applied:

Before and after comparison — default chart style vs. Tufte style

See it happen live — gridlines fade, legends become direct labels, chartjunk dissolves:

Animated transition from default chart styling to Tufte principles

Interactive Demo

Try the live demo — toggle between default and Tufte styling across ECharts, Chart.js, Plotly, and D3.js. Includes dark mode.

Examples

Line chart — direct labels, range-frame axes, annotation

Tufte-styled line chart showing revenue vs. target with direct labels and peak annotation

Horizontal bar chart — sorted by value, highlighted leader

Tufte-styled horizontal bar chart with direct value labels and highlighted top product

Slopegraph — before/after comparison

Slopegraph showing team size changes from 2024 to 2025, highlighting Engineering growth

Small multiples — shared scale, minimal chrome

Small multiples showing revenue trend by region with shared y-axis

Sparklines — word-sized charts with min/max markers

Five sparklines showing key metrics over 24 months with min and max markers

Data table — whitespace, thin rules, highlighted outlier

Tufte-styled data table with thin rules, right-aligned numbers, and highlighted growth leader

Dark mode — intentional palette, not inverted

Dark mode line chart with desaturated highlight color on dark background

Accessible scatter — dual-encoded with shape + color

Scatter plot using different shapes per segment so data is distinguishable without color

Light & dark — same chart, both themes

Side-by-side bar chart in light and dark mode showing intentional palette design

What it does

22 universal rules applied to every chart, organized in three tiers:

Static principles (rules 1–14) — the Tufte foundation:

  • Maximize data-ink ratio — remove gridlines, borders, legends, and decoration that don't convey data
  • Direct labeling, range-frame axes, no 3D, no pie charts (unless forced), no dual y-axes
  • Serif typography, off-white backgrounds, gray as primary color with selective highlighting
  • Annotate notable features, show comparison context, minimal tooltips

Screen-first principles (rules 15–19) — modern interactive contexts:

  • Progressive disclosure (overview first, details on hover/tap/click)
  • WCAG accessibility (contrast ratios, dual encoding, keyboard nav, screen reader text alternatives)
  • Responsive design (fluid/adaptive strategies, touch targets, mobile-adapted chart types)
  • Purposeful animation (data transitions only, respect prefers-reduced-motion)
  • Intentional dark mode (semantic color tokens, never invert, reduce saturation)

Content & formatting (rules 20–22) — what Tufte assumed but never codified:

  • Titles assert findings ("Revenue Surged 23%"), not axis descriptions
  • Numbers formatted for humans ($1.2M, thousand separators, matched precision)
  • Don't chart what a sentence or table can say better

Supported libraries

LibraryRule fileLanguage
Rechartsrules/recharts.mdReact/JSX
EChartsrules/echarts.mdJavaScript
Chart.jsrules/chartjs.mdJavaScript
matplotlibrules/matplotlib.mdPython
Plotlyrules/plotly.mdPython/JS
D3.js / SVG / HTMLrules/svg-html.mdWeb

Additional references

  • rules/interactive-and-accessible.md — progressive disclosure, accessibility, responsive, animation, dark mode
  • rules/typography-and-color.md — font stacks, palettes, hex values
  • rules/anti-patterns.md — common violations and one-liner fixes
  • rules/small-multiples-sparklines.md — small multiples, sparklines, slopegraphs

Based on

  • The Visual Display of Quantitative Information (1983)
  • Envisioning Information (1990)
  • Visual Explanations (1997)
  • Beautiful Evidence (2006)

License

MIT

Files in the repo

Repository payload7 top-level entries
  • _docs
  • docs
  • examples
  • rules
  • LICENSE
  • README.md
  • SKILL.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k