Visualization
FrankChen021/datastoria
Rules for charts and visualization. An agent skill from FrankChen021/datastoria.
Apply whenever you generate any chart, graph, or data visualization — from SQL results, in the chart-maker agent, in decks, or on "make a chart / visualize / plot / dashboard" requests.
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/visualization-patterns .claude/skills/visualization-patterns && rm -rf skills-srcUse ~/.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/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .claude/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/visualization-patterns .agents/skills/visualization-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .agents/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/visualization-patterns .cursor/skills/visualization-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .cursor/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ai-analyst-lab/ai-analyst.git --path .claude/skills/visualization-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/visualization-patterns .gemini/skills/visualization-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .gemini/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/visualization-patterns .github/skills/visualization-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .github/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ai-analyst-lab/ai-analyst visualization-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/visualization-patterns .opencode/skills/visualization-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "visualization-patterns" agent skill from https://github.com/ai-analyst-lab/ai-analyst/tree/main/.claude/skills/visualization-patterns into .opencode/skills/visualization-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "visualization-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
visualization-patternsApply whenever you generate any chart, graph, or data visualization — from SQL results, in the chart-maker agent, in decks, or on "make a chart / visualize / plot / dashboard" requests.
Visualization Patterns is an agent skill from ai-analyst-lab/ai-analyst. Apply whenever you generate any chart, graph, or data visualization — from SQL results, in the chart-maker agent, in decks, or on "make a chart / visualize / plot / dashboard" requests. Enforces Storytelling With Data: gray first, one focus color, action titles, direct labels, no pies, using the helpers in helpers/viz/charthelpers.py.
Its SKILL.md is about 5.5k 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 Data & Analytics, covering Data visualization, Storytelling and SQL. It works with SQL. The repository describes itself as: AI Product Analyst — Claude Code-powered data analysis toolkit. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 52c0744. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Visualization Patterns loads about 5.5k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 1,816 words of instructions outside code blocks.
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.
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.
The full file from ai-analyst-lab/ai-analyst at commit 52c0744, republished under its MIT licence (© ai-analyst-lab). 1,816 words, ~5,472 tokens.
.claude/skills/visualization-patterns/SKILL.md (or your agent's skills folder).Ensure every chart Claude Code produces follows high-quality design standards with named themes, consistent styling, and clear data communication.
Apply this skill whenever generating a chart, graph, or data visualization.
Do not make the pie. Make the sorted bar (or a single stacked bar for parts of a whole), say in one sentence why (angles and areas are hard to compare; a bar shows the same shares with direct labels), and offer the pie only if they insist after seeing the bar. Producing both "to be safe" is not the standard; the bar is the deliverable.
When no theme or palette is set, use the default styling without asking; offer palette options only when the user asks about themes or colors.
The minimal theme is clean, professional, and suitable for most business contexts:
The swd_style() function automatically loads the minimal theme. Other available themes: nyt, economist, corporate (see Theme Definitions section).
Start every chart with the helpers in helpers/viz/chart_helpers.py; they set the R3 background, gray-plus-accent palette, direct labels and spine cleanup that the checkpoints verify.
from helpers.viz.chart_helpers import (
swd_style, # Apply SWD matplotlib theme
highlight_bar, # Bar chart with one bar highlighted
highlight_line, # Line chart with one series highlighted
action_title, # Action title + subtitle
save_chart # Save with correct DPI and tight layout
)
# Apply SWD style FIRST (loads .mplstyle, returns color palette)
colors = swd_style()If helpers/viz/chart_helpers.py doesn't exist: Inform the user that chart helpers are missing and you'll need to implement SWD principles manually. Then proceed with manual matplotlib following the SWD principles below.
Use the pre-built helpers instead of manual matplotlib code:
| Chart Type | Helper Function | Example Usage |
|---|---|---|
| Bar chart | highlight_bar() | fig, ax = plt.subplots(figsize=(10, 6))<br>highlight_bar(ax, categories=['Desktop', 'Tablet', 'Mobile'], values=[4.6, 4.1, 3.4], highlight='Desktop')<br>action_title(ax, 'Desktop converts best at 4.6%') |
| Line chart | highlight_line() | fig, ax = plt.subplots(figsize=(10, 6))<br>highlight_line(ax, x=months, y_dict={'Revenue': revenue_values}, highlight='Revenue')<br>action_title(ax, 'Revenue grew 43% after pricing launch') |
| Title only | action_title() | action_title(ax, title='Finding here', subtitle='Context: time range, data source, sample size') |
Key points:
ax object + arrays of data (not DataFrames)fig, ax = plt.subplots(figsize=(10, 6))highlight parameter specifies which category/series to emphasizeFor funnel charts, heatmaps, or custom visualizations: Use manual matplotlib but apply swd_style() first and follow the SWD principles below.
# Final deliverable charts
save_chart(fig, "outputs/conversion_by_device.png")
# Exploratory/intermediate charts
save_chart(fig, "working/exploration_chart.png")Naming convention: {metric}_{dimension}_{chart_type}.png (e.g., revenue_trends_line.png)
Check .knowledge/learnings/index.md for relevant entries:
Every chart follows the SWD methodology by Cole Nussbaumer Knaflic:
Gray everything first. Color is reserved for the one data point that tells the story.
#0072B2), for the element the takeaway argues; a second accent, orange (#D55E00), only for a genuine two-focal or good-vs-bad case. Both are Okabe-Ito colors, so the pair is colorblind-safe (blue vs orange, never red vs green). Everything else is gray. Use up to 5 Okabe-Ito categoricals ONLY when categories are truly independent; more than that is a signal to rethink the chart, never to add hues. (Amber #D97706 is the deck/thumbnail brand color; it is not a chart focus color.)Why use the helpers: They enforce these principles automatically. Manual matplotlib code often forgets to remove borders, uses rainbow colors, or includes legends. The helpers prevent these mistakes.
Before finalizing any chart, verify each item:
#E5E7EB), y-axis only$45 not $45.00; use 12% not 12.0%#F7F6F2)12% not 12.347%)When producing multiple charts for a deep dive or root cause investigation, follow Context → Tension → Resolution:
| Phase | Charts | Purpose | Example |
|---|---|---|---|
| Context | 1-2 | Set the baseline. What does normal look like? | "[Dataset] processes ~4,000 support tickets per month" |
| Tension | 2-3 | Reveal the problem. Progressively zoom in. | "June spiked to 6,200" → "The spike was iOS payment issues" |
| Resolution | 1-2 | Explain why and recommend action. | "iOS v2.3 introduced a bug → fix eliminates ~2,200 tickets/mo" |
All chart helpers live in helpers/viz/chart_helpers.py. The style file is helpers/viz/analytics_chart_style.mplstyle. The full style guide with before/after examples is in helpers/viz/chart_style_guide.md.
| Function | Purpose | Key Args |
|---|---|---|
swd_style() | Apply SWD matplotlib style, return color palette | — |
highlight_bar() | Bar chart with one bar highlighted, rest gray | highlight=, horizontal=True, sort=True |
highlight_line() | Line chart with one line colored, rest gray | highlight=, y_dict={} |
action_title() | Bold takeaway title + optional subtitle | title, subtitle= |
annotate_point() | Clean annotation with arrow | x, y, text, offset= |
save_chart() | Tight layout + correct DPI | fig, path, dpi=150 |
stacked_bar() | Stacked / 100% stacked (normalize=True) bar | highlight_layer=, normalize= |
share_bar() | Single horizontal 100% stacked bar (pie replacement) | parts={}, highlight= |
slope_chart() | Two-time-point change across items | start_col, end_col, highlight_label= |
funnel_waterfall() | Funnel drop-off; highlights the biggest drop | highlight_step= |
retention_heatmap() | Cohort retention as a blue-sequential table | keeps numbers in cells |
big_number() | One number as text (the no-chart default for 1-2 numbers) | value, label=, delta= |
bullet() | One metric vs target (gauge replacement) | value, target, ranges= |
end_label() | Direct end-of-line label (replaces a legend entry) | x, y, text, color= |
reference_line() | Goal/threshold line with an inline label | value, label=, orient= |
nyt (New York Times)NYT_THEME = {
"colors": {
"primary": "#000000",
"secondary": "#666666",
"accent": "#D03A2B",
"palette": ["#D03A2B", "#1A6B54", "#3D6CA3", "#E8912D", "#8B5E3C", "#6B4C9A"],
"background": "#FFFFFF",
"grid": "#E5E5E5",
},
"fonts": {
"title": {"family": "Georgia", "size": 18, "weight": "bold"},
"subtitle": {"family": "Arial", "size": 12, "weight": "normal", "color": "#666666"},
"axis_label": {"family": "Arial", "size": 10},
"annotation": {"family": "Arial", "size": 9, "style": "italic"},
},
"grid": {"show": True, "axis": "y", "style": "--", "alpha": 0.3},
"annotations": {"style": "minimal", "callout_arrows": True},
"title": {"position": "left-aligned", "include_subtitle": True},
}economist (The Economist)ECONOMIST_THEME = {
"colors": {
"primary": "#1F2E3C",
"secondary": "#7C8A96",
"accent": "#E3120B",
"palette": ["#E3120B", "#1F6ED4", "#36B37E", "#F5A623", "#6554C0", "#00B8D9"],
"background": "#D7E4E8",
"grid": "#FFFFFF",
},
"fonts": {
"title": {"family": "Helvetica", "size": 16, "weight": "bold"},
"subtitle": {"family": "Helvetica", "size": 11, "weight": "normal"},
"axis_label": {"family": "Helvetica", "size": 9},
"annotation": {"family": "Helvetica", "size": 8},
},
"grid": {"show": True, "axis": "y", "style": "-", "alpha": 0.5, "color": "#FFFFFF"},
"annotations": {"style": "inline", "red_highlight": True},
"title": {"position": "left-aligned", "red_bar_top": True},
}minimalMINIMAL_THEME = {
"colors": {
"primary": "#1F2937",
"secondary": "#4B5563",
"accent": "#0072B2",
"palette": ["#0072B2", "#D55E00", "#009E73", "#CC79A7", "#404040"],
"background": "#F7F6F2",
"grid": "#F0F0F0",
},
"fonts": {
"title": {"family": "Helvetica", "size": 14, "weight": "bold"},
"subtitle": {"family": "Helvetica", "size": 10, "weight": "normal", "color": "#666666"},
"axis_label": {"family": "Helvetica", "size": 9},
"annotation": {"family": "Helvetica", "size": 8},
},
"grid": {"show": True, "axis": "y", "style": "-", "alpha": 0.15},
"annotations": {"style": "minimal", "direct_labels": True},
"title": {"position": "left-aligned", "include_subtitle": True},
}corporateCORPORATE_THEME = {
"colors": {
"primary": "#1B2A4A",
"secondary": "#5A6B7F",
"accent": "#0066CC",
"palette": ["#0066CC", "#00A651", "#FF6600", "#CC0000", "#9933CC", "#00CCCC"],
"background": "#FFFFFF",
"grid": "#E8E8E8",
},
"fonts": {
"title": {"family": "Arial", "size": 16, "weight": "bold"},
"subtitle": {"family": "Arial", "size": 11, "weight": "normal"},
"axis_label": {"family": "Arial", "size": 10},
"annotation": {"family": "Arial", "size": 9},
},
"grid": {"show": True, "axis": "both", "style": "-", "alpha": 0.2},
"annotations": {"style": "callout", "box_highlight": True},
"title": {"position": "center", "include_subtitle": True},
}import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
def apply_theme(fig, ax, theme):
"""Apply a named theme to a matplotlib figure."""
fig.patch.set_facecolor(theme["colors"]["background"])
ax.set_facecolor(theme["colors"]["background"])
# Title styling
ax.set_title(
ax.get_title(),
fontfamily=theme["fonts"]["title"]["family"],
fontsize=theme["fonts"]["title"]["size"],
fontweight=theme["fonts"]["title"]["weight"],
loc="left" if theme["title"]["position"] == "left-aligned" else "center",
pad=15,
)
# Grid
if theme["grid"]["show"]:
ax.grid(
axis=theme["grid"]["axis"],
linestyle=theme["grid"]["style"],
alpha=theme["grid"]["alpha"],
color=theme["colors"].get("grid", "#E0E0E0"),
)
ax.set_axisbelow(True)
# Clean spines
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
ax.spines["left"].set_alpha(0.3)
ax.spines["bottom"].set_alpha(0.3)
# Axis labels
ax.xaxis.label.set_fontfamily(theme["fonts"]["axis_label"]["family"])
ax.xaxis.label.set_fontsize(theme["fonts"]["axis_label"]["size"])
ax.yaxis.label.set_fontfamily(theme["fonts"]["axis_label"]["family"])
ax.yaxis.label.set_fontsize(theme["fonts"]["axis_label"]["size"])
plt.tight_layout()| Data Relationship | Chart Type | When to Use |
|---|---|---|
| Comparison (categories) | Bar chart (vertical) | Comparing ≤12 categories |
| Comparison (many categories) | Bar chart (horizontal) | Comparing >7 categories or long labels |
| Comparison (parts of whole) | Stacked bar | Showing composition across categories |
| Change over time | Line chart | Continuous time series, trends |
| Change over time (few periods) | Bar chart | Discrete periods (quarters, years) |
| Correlation | Scatter plot | Relationship between two continuous variables |
| Distribution | Histogram | Single variable distribution |
| Distribution (compare groups) | Box plot or violin | Distribution comparison across groups |
| Proportion / parts-to-whole | Single 100% stacked bar (share_bar()) | Replaces the pie/donut; direct-labeled shares |
| Flow/Process | Funnel chart | Conversion or drop-off rates |
| Intensity | Heatmap | Two categorical dimensions + one value |
| Cumulative | Area chart | Running totals over time |
| Ranking changes | Bump chart | Rank position changes over time |
| Waterfall | Waterfall chart | Additive/subtractive contributions |
Pick by intent, then encode by length or position, never area or angle. Cleveland and McGill's
graphical-perception ranking (position > length > angle > area) is why bars beat pies and why the
avoid-list below exists. One or two numbers are not a chart: use big_number(). Discouraged charts
(pie, donut, treemap, bubble, dual/secondary y-axis, 3D, radar, truncated bars, >5 series) are gated
behind an explicit user request, never a default.
Builder verdicts (helpers/viz/chart_helpers.py): horizontal bar is the default for long labels
(zero baseline enforced); multi-line-with-one-highlighted (highlight_line) is the default line
behavior (gray context + one accent, cap 4-5 lines); slope_chart is preferred for two-time-point
change; share_bar replaces the pie; retention_heatmap is a blue-sequential table (numbers kept in
cells); stacked bars are for when the TOTAL is the message, with the priority series on the baseline;
stacked/multi-series area is discouraged (redirect to a line or 100% stacked bar).
action_title() warns when a title reads as a topic ("... by X") or a question; rewrite it to state the so-what before shipping.def create_chart(data, chart_type, theme_name="minimal", title="", subtitle=""):
"""Standard chart creation pattern."""
theme = {"nyt": NYT_THEME, "economist": ECONOMIST_THEME,
"minimal": MINIMAL_THEME, "corporate": CORPORATE_THEME}[theme_name]
fig, ax = plt.subplots(figsize=(10, 6))
fig.patch.set_facecolor(theme["colors"]["background"])
ax.set_facecolor(theme["colors"]["background"])
# Plot data using theme colors
colors = theme["colors"]["palette"]
# Set title as takeaway
ax.set_title(title, fontfamily=theme["fonts"]["title"]["family"],
fontsize=theme["fonts"]["title"]["size"],
fontweight=theme["fonts"]["title"]["weight"],
loc="left", pad=20)
# Subtitle
if subtitle:
ax.text(0, 1.02, subtitle, transform=ax.transAxes,
fontfamily=theme["fonts"]["subtitle"]["family"],
fontsize=theme["fonts"]["subtitle"]["size"],
color=theme["fonts"]["subtitle"].get("color", "#666666"))
apply_theme(fig, ax, theme)
return fig, axfig, ax = plt.subplots(figsize=(10, 6))
colors = swd_style()
highlight_bar(ax, categories=["Mobile", "Desktop", "Tablet"], values=[45, 35, 20], highlight="Mobile")
action_title(ax, "Mobile drives nearly half of all sessions",
subtitle="Share of sessions, Jan–Dec 2025")
save_chart(fig, "outputs/charts/sessions_by_device_bar.png")fig, ax = plt.subplots(figsize=(10, 6))
colors = swd_style()
highlight_line(ax, x=months, y_dict={"Revenue": revenue}, highlight="Revenue")
annotate_point(ax, x=launch_month, y=launch_value, text="Feature launch\n+23% MoM")
action_title(ax, "Revenue grew 23% after feature launch",
subtitle="Monthly revenue, Jan–Dec 2025, in $M")
save_chart(fig, "outputs/charts/revenue_trend_line.png")# Use accent for the key finding, gray for everything else
colors = ["#E0E0E0"] * len(categories)
colors[key_index] = theme["colors"]["accent"] # Highlight the story| Anti-Pattern | Why It's Bad | Use Instead |
|---|---|---|
| Pie charts | Humans can't compare angles accurately | Horizontal bar chart |
| Rainbow palettes | No natural ordering, visual noise, not colorblind-safe | Gray + one highlight color (max 2 colors + gray) |
| Spaghetti lines | Too many colored lines, nothing stands out | highlight_line() — gray all, highlight one |
| Dual y-axes | Misleading — any two series can be made to "correlate" | Two separate charts, stacked vertically |
| 3D charts | Distorts proportions, adds no information | Flat 2D versions |
| Descriptive titles | Don't tell the reader what to think | Action titles via action_title() |
| Legend boxes | Force the reader to look away from the data | Direct labels on the data |
| Excessive gridlines | Create visual clutter | Light y-axis gridlines only, or none |
| Truncated y-axes | Exaggerate small differences (for bar charts) | Start at zero for bar charts |
| Cluttered annotations | Annotating every data point defeats the purpose | Annotate only the story |
| Default matplotlib styling | Looks generic, unprofessional | Always apply swd_style() first |
| Rainbow / red-green pairs | Visual noise; red-green is unreadable for ~8% of men | Gray + focus blue + optional orange (Okabe-Ito) |
Before including any chart in an analysis:
savefig() (not save_chart())© ai-analyst-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/visualization-patterns of ai-analyst-lab/ai-analyst.
Open the folder on GitHubat commit 52c0744
Visualization Patterns 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Visualization Patterns this skillai-analyst-lab/ai-analyst | 304 | — | ~5.5k | Automated safety check: Pass | MIT | |
| VisualizationFrankChen021/datastoria | 327 | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Redash Analytics Guidewentorai/research-plugins | 298 | 1 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Excel and CSV Data Analysisbytedance/deer-flow | 83k | 4 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Find Hypertable Candidatestimescale/pg-aiguide | 1.9k | 1 repos | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| SlKaelio/ktx | 1.6k | — | ~2.7k | Automated safety check: Pass | Apache-2.0 |
FrankChen021/datastoria
Rules for charts and visualization. An agent skill from FrankChen021/datastoria.
wentorai/research-plugins
Guide to Redash for SQL-driven research data dashboards and sharing
bytedance/deer-flow
Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.
timescale/pg-aiguide
A skill your agent uses to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables.
Kaelio/ktx
ktx's semantic layer - a structured catalog of sources (tables/views), measures, joins, and segments expressed as YAML.
mapcentia/geocloud2
Analyse GC2/Centia Parquet snapshots with DuckDB by walking the STAC catalog.json in the snapshot store — find datasets, decide whether a dataset has geometry (and in which CRS), read one snapshot…
ai-analyst-lab/ai-analyst
Never present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available.
ai-analyst-lab/ai-analyst
Retrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused.
ai-analyst-lab/ai-analyst
Save completed analyses to the knowledge system's analysis archive for future reference.
ai-analyst-lab/ai-analyst
Verify Google Workspace MCP authentication at the start of any session that needs Google APIs (Docs, Slides, Drive).
ai-analyst-lab/ai-analyst
Causal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats.
ai-analyst-lab/ai-analyst
Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.
Works with
Categories
Apply whenever you generate any chart, graph, or data visualization — from SQL results, in the chart-maker agent, in decks, or on "make a chart / visualize / plot / dashboard" requests. Visualization Patterns is an agent skill from ai-analyst-lab/ai-analyst. Apply whenever you generate any chart, graph, or data visualization — from SQL results, in the chart-maker agent, in decks, or on "make a chart / visualize / plot / dashboard" requests.
Visualization Patterns fits situations like: tasks that involve Data visualization; tasks that involve Storytelling; tasks that involve SQL.
Run `npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a claude-code`. Or copy the skill folder (.claude/skills/visualization-patterns in ai-analyst-lab/ai-analyst) into .claude/skills/visualization-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a codex`. Or copy the skill folder (.claude/skills/visualization-patterns in ai-analyst-lab/ai-analyst) into .agents/skills/visualization-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-analyst-lab/ai-analyst --skill visualization-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/visualization-patterns, .gemini/skills/visualization-patterns, .github/skills/visualization-patterns and .opencode/skills/visualization-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Visualization Patterns is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Visualization Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.5k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Visualization Patterns: Visualization (FrankChen021/datastoria, 327 stars), Redash Analytics Guide (wentorai/research-plugins, 298 stars), Excel and CSV Data Analysis (bytedance/deer-flow, 83k stars) and Find Hypertable Candidates (timescale/pg-aiguide, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ai-analyst-lab (a GitHub organization) maintains it in ai-analyst-lab/ai-analyst, which has 304 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 30, 2026.
Source: ai-analyst-lab/ai-analyst on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.