agentleFS
nisarthnisarth/claude-skills-store/skills/data/create-viz/SKILL.md

create-viz

Skill1 starsChanged 7 months agoMITView on GitHub

Create publication-quality visualizations with Python. Use when turning query results or a DataFrame into a chart, selecting the right chart type for a trend or comparison, generating a plot for a report or presentation, or needing an interactive chart with plotly. Trigger phrases: "create a chart", "visualize this data", "plot this", "make a graph", "bar chart of", "line chart showing", "heatmap of", "scatter plot", "histogram", "create a visualization", "chart for my presentation", "plotly chart"

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 14 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create publication-quality data visualizations using Python.

    line 12
  2. Distinctive:

    Before choosing a chart type, answer:

    line 18
  3. Distinctive:

    What is the message?: Every chart should make one point clearly.

    line 20
  4. Very specific:

    Use a colorblind-friendly palette (e.g., colorblind, Set2, or custom)

    line 126
  5. Distinctive:

    Use color intensity to encode magnitude

    line 128
  6. Distinctive:

    Use gray for context/baseline, color for the focus

    line 130
  7. Distinctive:

    Use sentence case, not ALL CAPS

    line 137
  8. Distinctive:

    Remove chart junk: unnecessary gridlines, borders, backgrounds

    line 140
  9. Distinctive:

    Add whitespace between elements

    line 143
  10. Very specific:

    Use tight_layout() or constrained_layout=True

    line 144
  11. Distinctive:

    Do not rely on color alone -- use patterns, markers, or labels

    line 147
  12. Distinctive:

    Ensure minimum contrast ratio of 4.5:1 for text

    line 148
  13. Distinctive:

    Add alt text when embedding in HTML or documents

    line 149
  14. Distinctive:

    Use at least 2pt line width for line charts

    line 150
  15. Distinctive:

    One message per chart: If you need to show two things, make two charts.

    line 192
  16. Very specific:

    Format numbers for humans: Use $1.2M not 1200000. Use thousands separators.

    line 196
  17. Distinctive:

    Include data source: Add a small footnote with the source and date range.

    line 201

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Visualization Skill

Create publication-quality data visualizations using Python. Select the right chart type, apply design principles, and produce clean, accessible figures ready for reports and presentations.

Workflow

Step 1: Understand the Data and Message

Before choosing a chart type, answer:

  1. What is the message? Every chart should make one point clearly.
  2. What type of data? Categorical, continuous, temporal, geospatial?
  3. What relationship? Trend, comparison, composition, distribution, correlation?
  4. How many variables? One, two, three or more dimensions?
  5. How many data points? 5 categories vs. 5,000 observations require different approaches.
  6. Where will it be displayed? Slide deck, printed report, web page, notebook?

Step 2: Select the Chart Type

RelationshipBest Chart TypesWhen to Use
Trend over timeLine chart, area chartContinuous time series, 1-5 series
ComparisonBar chart (horizontal for many categories)Comparing discrete categories
RankingHorizontal bar chartOrdered comparison, especially with labels
DistributionHistogram, box plot, violin plotUnderstanding spread and shape
CompositionStacked bar, donut (sparingly)Part-to-whole relationships
CorrelationScatter plot, bubble chartTwo continuous variables
Flow/ChangeWaterfall chart, Sankey diagramSequential changes or flows
HeatmapHeatmap, calendar heatmapPatterns across two dimensions
GeospatialChoropleth, point mapLocation-based data

Charts to avoid:

  • Pie charts with more than 5 slices
  • 3D charts (distort perception)
  • Dual y-axis charts (confuse readers) -- use two separate charts instead
  • Radar/spider charts (hard to read)

Step 3: Prepare the Data

import pandas as pd
import numpy as np

# Standard data preparation
df = pd.read_csv('data.csv', parse_dates=['date'])
df = df.sort_values('date')

# Aggregation for visualization
summary = df.groupby('category').agg(
    total=('revenue', 'sum'),
    count=('order_id', 'nunique')
).reset_index().sort_values('total', ascending=False)

Step 4: Build the Visualization

Matplotlib/Seaborn (Static, Publication-Quality)

import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import seaborn as sns

# Set global style
plt.style.use('seaborn-v0_8-whitegrid')
sns.set_palette('colorblind')

fig, ax = plt.subplots(figsize=(10, 6))

# Plot
ax.plot(df['date'], df['revenue'], linewidth=2, color='#2563eb')

# Formatting
ax.set_title('Monthly Revenue Trend', fontsize=16, fontweight='bold', pad=16)
ax.set_xlabel('')
ax.set_ylabel('Revenue ($)', fontsize=12)
ax.yaxis.set_major_formatter(mticker.FuncFormatter(lambda x, _: f'${x/1e6:.1f}M'))
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)

# Annotations
ax.annotate('Product Launch', xy=(launch_date, launch_value),
            xytext=(10, 20), textcoords='offset points',
            arrowprops=dict(arrowstyle='->', color='gray'),
            fontsize=10, color='gray')

plt.tight_layout()
plt.savefig('revenue_trend.png', dpi=150, bbox_inches='tight')
plt.show()

Plotly (Interactive)

import plotly.express as px
import plotly.graph_objects as go

fig = px.line(df, x='date', y='revenue', color='segment',
              title='Revenue by Segment',
              labels={'revenue': 'Revenue ($)', 'date': ''},
              template='plotly_white')

fig.update_layout(
    font=dict(family='Inter, sans-serif', size=12),
    legend=dict(orientation='h', yanchor='bottom', y=1.02),
    hovermode='x unified'
)

fig.update_yaxes(tickprefix='$', tickformat=',.0f')
fig.write_html('revenue_interactive.html')
fig.show()

Step 5: Apply Design Principles

Color:

  • Use a colorblind-friendly palette (e.g., colorblind, Set2, or custom)
  • Limit to 5-7 colors maximum
  • Use color intensity to encode magnitude
  • Reserve red/green for clear positive/negative semantics
  • Use gray for context/baseline, color for the focus

Typography:

  • Title: 14-18pt, bold
  • Axis labels: 11-13pt
  • Tick labels: 9-11pt
  • Annotations: 9-11pt, lighter color
  • Use sentence case, not ALL CAPS

Layout:

  • Remove chart junk: unnecessary gridlines, borders, backgrounds
  • Maximize data-ink ratio
  • Left-align text elements
  • Add whitespace between elements
  • Use tight_layout() or constrained_layout=True

Accessibility:

  • Do not rely on color alone -- use patterns, markers, or labels
  • Ensure minimum contrast ratio of 4.5:1 for text
  • Add alt text when embedding in HTML or documents
  • Use at least 2pt line width for line charts

Step 6: Save and Export

# High-resolution PNG for reports
fig.savefig('chart.png', dpi=300, bbox_inches='tight', facecolor='white')

# SVG for presentations (scalable)
fig.savefig('chart.svg', bbox_inches='tight')

# PDF for print
fig.savefig('chart.pdf', bbox_inches='tight')

# Interactive HTML (plotly)
fig.write_html('chart.html', include_plotlyjs='cdn')

Output Format

Deliver:

  1. The Python code that generates the visualization (reproducible)
  2. The rendered image or HTML file
  3. A brief note on chart type selection rationale
  4. Suggestions for alternative views if relevant

Examples

Example 1: Time Series Trend

Line chart with confidence bands, annotated events, formatted axis labels, reference line for target.

Example 2: Category Comparison

Horizontal bar chart sorted by value, value labels on bars, highlighted top-N, muted colors for the rest.

Example 3: Distribution Analysis

Histogram with KDE overlay, vertical lines for mean/median, quartile annotations, sample size noted.

Example 4: Correlation

Scatter plot with regression line, R-squared annotation, marginal histograms, color-coded by segment.

Best Practices

  1. One message per chart. If you need to show two things, make two charts.
  2. Title states the insight, not the data. "Revenue grew 23% in Q4" is better than "Q4 Revenue."
  3. Sort meaningfully. Sort bars by value, not alphabetically. Sort time series chronologically.
  4. Start y-axis at zero for bar charts. Line charts may use a non-zero baseline if justified.
  5. Format numbers for humans. Use $1.2M not 1200000. Use thousands separators.
  6. Remove legends when possible. Label data directly on the chart instead.
  7. Use consistent scales when comparing. Side-by-side charts should share the same axis range.
  8. Test in grayscale. Print a black-and-white version to ensure the chart still works.
  9. Size charts for the medium. Slides need larger text than notebooks. Print needs higher DPI than screens.
  10. Include data source. Add a small footnote with the source and date range.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.