mcpbeat Sign in

Charting Skill for Claude

Select the right Python charting library (seaborn, matplotlib, graphviz) and produce publication-quality static visualizations. Use when creating charts, plots, graphs, diagrams, heatmaps, visualizations from data, or when choosing between matplotlib/seaborn/graphviz. Also triggers for network diagrams, flowcharts, dependency trees, state machines, and entity-relationship diagrams. For interactive browser-rendered charts or uploaded data exploration, defer to charting-vega-lite instead.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
137
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/oaustegard/claude-skills --skill charting

The instruction itself

13 sections, as written by the author

Charting: Python Static Visualizations

Select the optimal Python charting library and produce clean, publication-quality output.

Library Selection Framework

Choose the library based on what the visualization represents, not habit.

Seaborn — DEFAULT for statistical/analytical charts

Seaborn wraps matplotlib with better defaults, tighter pandas integration, and fewer lines of code. Reach for seaborn first when the data lives in a DataFrame and the goal is analytical.

Use for: distributions (histograms, KDEs, violin plots, ECDFs), categorical comparisons (box plots, swarm plots, strip plots, bar plots), correlation (heatmaps, pair plots, regression plots), grouped/faceted views (FacetGrid, catplot, relplot).

Why: Automatic axis labeling from column names, coherent color palettes, built-in aggregation with confidence intervals, and hue/col/row faceting with minimal code.

Practical rule: If the code would call plt.bar(), plt.hist(), plt.scatter(), or build a heatmap with plt.imshow() — use the seaborn equivalent instead. It will look better with less effort.

Matplotlib — fine-grained control and non-standard layouts

Drop to raw matplotlib only when seaborn doesn't support the chart type or when pixel-level layout control is required.

Use for: custom multi-panel figures mixing chart types, unusual annotations (arrows, shaded regions, custom legends), non-standard axes (polar, broken axes, insets), animations, image overlays, or any layout where the default seaborn API is insufficient.

Combine with seaborn: Seaborn plots return matplotlib Axes objects. Apply matplotlib customization on top of seaborn output rather than rebuilding from scratch.

Graphviz — graph/network structures

Graphviz operates in a fundamentally different domain: nodes and edges, not x/y data.

Use for: dependency trees, flowcharts, state machines, org charts, entity-relationship diagrams, DAGs, call graphs, any directed or undirected graph structure.

Python interface: Use the graphviz Python package (installed). Create graphviz.Digraph() or graphviz.Graph(), add nodes/edges, render to PNG/SVG/PDF.

import graphviz
g = graphviz.Digraph(format='png')
g.node('A', 'Start')
g.node('B', 'Process')
g.edge('A', 'B')
g.render('/home/claude/output', cleanup=True)

Layout engines: dot (hierarchical, default), neato (spring model), fdp (force-directed), circo (circular), twopi (radial). Set via g.engine = 'neato'.

Vega-Lite — interactive browser charts

When the user wants interactive, browser-rendered visualizations (tooltips, zoom, selection, filtering) or uploads data for exploratory charting, defer to the charting-vega-lite skill. That skill handles React artifact generation with inline data islands.

Decision shortcut: Static image file → this skill. Interactive artifact → charting-vega-lite.

Quick Reference: Chart Type → Library

| Need | Library | Function |

|---|---|---|

| Histogram / KDE | seaborn | sns.histplot(), sns.kdeplot() |

| Box / Violin / Swarm | seaborn | sns.boxplot(), sns.violinplot() |

| Bar (categorical) | seaborn | sns.barplot(), sns.countplot() |

| Correlation heatmap | seaborn | sns.heatmap() |

| Scatter + regression | seaborn | sns.scatterplot(), sns.regplot() |

| Pair plot (multi-var) | seaborn | sns.pairplot() |

| Faceted grid | seaborn | sns.FacetGrid, catplot, relplot |

| Time series line | seaborn | sns.lineplot() (handles CI bands) |

| Custom multi-panel | matplotlib | fig, axes = plt.subplots() |

| Polar / radar | matplotlib | projection='polar' |

| Annotated diagrams | matplotlib | ax.annotate(), arrows, patches |

| Dependency tree | graphviz | Digraph |

| Flowchart / FSM | graphviz | Digraph with shape attrs |

| ER diagram | graphviz | Graph with record shapes |

| Network graph | graphviz | Graph with layout engine |

Production Defaults

Apply these defaults to produce clean output without per-chart fiddling.

Seaborn Setup

import seaborn as sns
import matplotlib.pyplot as plt

sns.set_theme(style="whitegrid", palette="muted", font_scale=1.1)

Style options: whitegrid (default, good for most), white (cleaner for publications), darkgrid (data-dense plots), ticks (minimal).

Figure Sizing and DPI

fig, ax = plt.subplots(figsize=(10, 6))
# Or for seaborn figure-level functions:
g = sns.catplot(..., height=6, aspect=1.5)

# Save at publication quality
plt.savefig('/home/claude/chart.png', dpi=150, bbox_inches='tight', facecolor='white')

Use dpi=150 for screen/web output, dpi=300 for print. Always use bbox_inches='tight' to avoid clipped labels.

Color Guidance

  • Categorical: "muted", "Set2", "tab10" — distinct, accessible
  • Sequential: "viridis", "YlOrRd", "Blues" — ordered magnitude
  • Diverging: "RdBu", "coolwarm" — centered on zero/midpoint
  • Avoid: "jet", "rainbow" — perceptually non-uniform, colorblind-hostile

Common Refinements

# Rotate x-labels if overlapping
plt.xticks(rotation=45, ha='right')

# Remove top/right spines for cleaner look
sns.despine()

# Thousands separator for large numbers
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, _: f'{x:,.0f}'))

Output Workflow

  • Create chart in /home/claude/
  • Save as PNG (default) or SVG (if user needs vector)
  • Copy to /mnt/user-data/outputs/
  • Present via present_files

Always plt.close() after saving to free memory.

Other skills for the same job

different authors, same section of the catalogue
D3 Viz
by chrisvoncsefalvay
×3

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.

20k tokens
Astropy
by christophacham
×3

Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.

16k tokens
Instrument Data To Allotrope
by anthropics
vendor ×2

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.

33k tokens scripts
Qutip
by ComeOnOliver
×2

Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.

27k tokens
Copilot Usage Metrics
by github
vendor ×1

Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.

1k tokens scripts
Mentoring Juniors
by github
vendor ×1

Socratic mentoring for junior developers and AI newcomers. Guides through questions, never answers. Triggers: "help me understand", "explain this code", "I''m stuck", "Im stuck", "I''m confused", "Im confused", "I don''t understand", "I dont understand", "can you teach me", "teach me", "mentor me", "guide me", "what does this error mean", "why doesn''t this work", "why does not this work", "I''m a beginner", "Im a beginner", "I''m learning", "Im learning", "I''m new to this", "Im new to this", "walk me through", "how does this work", "what''s wrong with my code", "what''s wrong", "can you break this down", "ELI5", "step by step", "where do I start", "what am I missing", "newbie here", "junior dev", "first time using", "how do I", "what is", "is this right", "not sure", "need help", "struggling", "show me", "help me debug", "best practice", "too complex", "overwhelmed", "lost", "debug this", "/socratic", "/hint", "/concept", "/pseudocode". Progressive clue systems, teaching techniques, and success metrics.

4k tokens
Astropy
by K-Dense-AI
×1

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

18k tokens
Polars
by K-Dense-AI
×1

High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.

20k tokens

How to use it

Copy the folder

Take oaustegard/charting from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.