- name
SKILL.md
Tệp skill vẫn nằm trong kho mã của nhà phát hành.
Dán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add oaustegard/claude-skills --skill charting-vega-lite -a cursor -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add oaustegard/claude-skills --skill charting-vega-lite -a claude-code -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add oaustegard/claude-skills --skill charting-vega-lite -a codex -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add oaustegard/claude-skills --skill charting-vega-lite -a grok -yGửi tin nhắn đã sao chép trong cuộc trò chuyện Grok Bot. Bot sẽ lấy tệp SKILL.md này từ GitHub và thêm vào bộ skill mà mọi Bot của bạn dùng chung.
Install this skill: https://github.com/oaustegard/claude-skills/tree/HEAD/charting-vega-liteTừ nhà phát hành
This skill creates interactive Vega-Lite visualizations from uploaded data. The workflow:
Claude artifacts cannot use fetch() for computer:// URLs.
All data must be embedded as an inline JavaScript constant:
const DATA = [ /* embedded data array */ ];
// Later in chart specs:
spec.data = { values: DATA };
DO NOT:
This is the only pattern that works in Claude's artifact environment.
Execute this sequence when user uploads data without specifying chart type:
python /mnt/skills/user/charting-vega-lite/scripts/analyze_data.py /mnt/user-data/uploads/<filename>
Extract from output:
fields[] (with types and statistics)suggested_charts[] (suggested chart types with encodings)sample_data (first 10 rows for understanding context)If script fails: Use manual pandas analysis
import pandas as pd
df = pd.read_csv('/mnt/user-data/uploads/<filename>')
# Classify: numeric→quantitative, datetime→temporal, <20 unique→nominal
Read sample data and column names to infer what the data represents:
Ask: What questions would someone analyzing this data want answered?
Examples:
Filter analyze_data.py suggestions based on context and readability:
Apply readability filters:
Prioritize charts that answer domain questions:
Don't suggest charts just because data types match - choose charts that reveal insights.
Build specs programmatically using analyze_data.py encodings:
For each suggested chart type, construct spec using:
assets/templates/ for basic types (bar, line, scatter, pie, heatmap, area)references/spec-builder-patterns.md for variations (histogram, boxplot, grouped-bar, etc.)references/vega-lite-examples-inventory.md for uncommon typesStructure each chart as:
{"type": "Chart Name", "reason": "Why this chart", "spec": {/* vega-lite spec */}}
Load data, read template, replace __DATA__ and __CHART_SPECS__ placeholders, write using bash heredoc.
[View chart explorer](computer:///mnt/user-data/outputs/ChartExplorer.jsx)
Created 7 contextually relevant charts for your data.
When user specifies chart type (e.g., "make a bar chart"):
python /mnt/skills/user/charting-vega-lite/scripts/analyze_data.py /mnt/user-data/uploads/<filename>
Check requirements:
If data doesn't fit:
Use templates or programmatic builders based on chart type complexity.
Same pattern as Primary Workflow step 5, but with single chart.
Common failures:
Using fetch() in artifacts
Chart doesn't render
spec.data = {values: DATA}Generic/random chart suggestions
Scripts:
scripts/analyze_data.py - analyze structure, suggest 8-12 chart typesComponents:
assets/components/ChartExplorer.jsx - multi-chart explorer templateTemplates:
assets/templates/*.json - 6 basic chart templates (bar, line, scatter, pie, heatmap, area)References - Progressive Disclosure:
Read spec-builder-patterns.md when building charts programmatically (histogram, boxplot, grouped/stacked bars, multi-line, etc.)
Read vega-lite-examples-inventory.md when user requests uncommon chart type not in spec-builder-patterns
Read chart-types.md when validating specific chart requirements or user asks "what chart should I use for..."
Read advanced-charts.md for complete specs of specialized charts (sankey, waterfall, violin plots, complex layered compositions)
Read contextual-chart-selection.md for extended domain examples if unfamiliar with data domain (biomedical, financial, IoT, etc.)
Read online-resources.md to fetch Vega-Lite docs for advanced features (custom selections, transforms, conditional encoding)
User uploads assay data CSV (51 assays, 74 samples)
# 1. Analyze
python /mnt/skills/user/charting-vega-lite/scripts/analyze_data.py /mnt/user-data/uploads/assay_data.csv
# 2. Understand context: Multi-analyte immunoassay
# Questions: Which biomarkers strongest? Patterns across samples? Variability?
# 3. Build contextual charts (5-7 specs)
# Bar: Mean signal by assay
# Heatmap: Sample × Assay
# Box plot: Signal distribution by assay
# Histogram: Overall signal distribution
# etc.
# 4. Load data and template
df = pd.read_csv('/mnt/user-data/uploads/assay_data.csv')
data = df.to_dict(orient='records')
template = open('/mnt/skills/user/charting-vega-lite/assets/components/ChartExplorer.jsx').read()
# 5. Replace placeholders and write
artifact = template.replace('__DATA__', json.dumps(data)).replace('__CHART_SPECS__', json.dumps(charts))
# Use bash heredoc to avoid XML conflicts in tool parameters
# 6. Provide link
View chart explorer
Created 7 charts for your assay data - bar charts show biomarker signals, heatmap reveals sample patterns, box plots display variability.
Create interactive data visualizations using Vega-Lite declarative JSON grammar. Supports 20+ chart types (bar, line, scatter, histogram, boxplot, grouped/stacked variations, etc.) via templates and p
---name: charting-vega-litedescription: Create interactive data visualizations using Vega-Lite declarative JSON grammar. Supports 20+ chart types…---# charting-vega-lite/SKILL.mdTổng quan
Create interactive data visualizations using Vega-Lite declarative JSON grammar. Supports 20+ chart types (bar, line, scatter, histogram, boxplot, grouped/stacked variations, etc.) via templates and programmatic builders. Use when users upload data for charting, request specific chart types, or mention visualizations. Produces portable JSON specs with inline data islands that work in Claude artifacts and can be adapted for production.
Câu hỏi thường gặp
Tải charting-vega-lite/SKILL.md từ nhà phát hành, hoặc sao chép đường dẫn và mở kho mã. PlugMCP chỉ liệt kê skill và không lưu trữ tệp này.
Nhà phát hành duy trì nó tại https://github.com/oaustegard/claude-skills.
Claude, Cursor, Codex và Grok Build có thể đọc tệp SKILL.md mà bạn thêm từ kho mã của nhà phát hành. Grok Bot cài đặt skill khi bạn gửi liên kết thư mục GitHub của skill trong cuộc trò chuyện.