chart-image
Generate publication-quality chart images from data. Supports line, bar, area, point, histogram, candlestick, pie/donut, heatmap, multi-series, and stacked…
от lxyeternal★ 68 звёзд на GitHub
Установить chart-image в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Chart Image Generator
Generate PNG chart images from data using Vega-Lite. Perfect for headless server environments.
Why This Skill?
Built for Fly.io / VPS / Docker deployments:
- ✅ No native compilation - Uses Sharp with prebuilt binaries (unlike
canvaswhich requires build tools) - ✅ No Puppeteer/browser - Pure Node.js, no Chrome download, no headless browser overhead
- ✅ Lightweight - ~15MB total dependencies vs 400MB+ for Puppeteer-based solutions
- ✅ Fast cold starts - No browser spinup delay, generates charts in <500ms
- ✅ Works offline - No external API calls (unlike QuickChart.io)
Setup (one-time)
cd /data/clawd/skills/chart-image/scripts && npm install
Quick Usage
node /data/clawd/skills/chart-image/scripts/chart.mjs \
--type line \
--data '[{"x":"10:00","y":25},{"x":"10:30","y":27},{"x":"11:00","y":31}]' \
--title "Price Over Time" \
--output chart.png
Chart Types
Line Chart (default)
node chart.mjs --type line --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output line.png
Quantitative X-domain clamp
Useful when you want a fixed numeric or temporal window without editing Vega-Lite by hand:
node chart.mjs --type line \
--data '[{"minute":0,"value":12},{"minute":1,"value":18},{"minute":2,"value":14},{"minute":3,"value":20}]' \
--x-field minute --y-field value --x-type quantitative \
--x-domain 0,2 --title "First 3 Minutes" \
--output x-domain.png
Bar Chart
node chart.mjs --type bar --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output bar.png
Area Chart
node chart.mjs --type area --data '[{"x":"A","y":10},{"x":"B","y":15}]' --output area.png
Histogram
Use this for numeric distributions instead of pre-binned bar charts:
node chart.mjs --type histogram \
--data '[{"value":12},{"value":18},{"value":19},{"value":24},{"value":31}]' \
--x-field value --x-title "Response Time (ms)" --y-title "Count" \
--bins 8 --tick-min-step-y 1 --x-label-angle -30 \
--output hist.png
Pie / Donut Chart
# Pie
node chart.mjs --type pie --data '[{"category":"A","value":30},{"category":"B","value":70}]' \
--category-field category --y-field value --output pie.png
# Donut (with hole)
node chart.mjs --type donut --data '[{"category":"A","value":30},{"category":"B","value":70}]' \
--category-field category --y-field value --output donut.png
Candlestick Chart (OHLC)
node chart.mjs --type candlestick \
--data '[{"x":"Mon","open":100,"high":110,"low":95,"close":105}]' \
--open-field open --high-field high --low-field low --close-field close \
--title "Stock Price" --output candle.png
Heatmap
node chart.mjs --type heatmap \
--data '[{"x":"Mon","y":"Week1","value":5},{"x":"Tue","y":"Week1","value":8}]' \
--color-value-field value --color-scheme viridis \
--y-label-overlap greedy \
--title "Activity Heatmap" --output heatmap.png
Multi-Series Line Chart
Compare multiple trends on one chart:
node chart.mjs --type line --series-field "market" \
--data '[{"x":"Jan","y":10,"market":"A"},{"x":"Jan","y":15,"market":"B"}]' \
--title "Comparison" --output multi.png
Stacked Bar Chart
node chart.mjs --type bar --stacked --color-field "category" \
--data '[{"x":"Mon","y":10,"category":"Work"},{"x":"Mon","y":5,"category":"Personal"}]' \
--title "Hours by Category" --output stacked.png
Volume Overlay (Dual Y-axis)
Price line with volume bars:
node chart.mjs --type line --volume-field volume \
--data '[{"x":"10:00","y":100,"volume":5000},{"x":"11:00","y":105,"volume":3000}]' \
--title "Price + Volume" --output volume.png
Sparkline (mini inline chart)
node chart.mjs --sparkline --data '[{"x":"1","y":10},{"x":"2","y":15}]' --output spark.png
Sparklines are 80x20 by default, transparent, no axes.
Options Reference
Basic Options
| Option | Description | Default |
|---|---|---|
--type |
Chart type: line, bar, area, point, histogram, pie, donut, candlestick, heatmap | line |
--data |
JSON array of data points | - |
--output |
Output file path | chart.png |
--title |
Chart title | - |
--width |
Width in pixels | 600 |
--height |
Height in pixels | 300 |
Axis Options
| Option | Description | Default |
|---|---|---|
--x-field |
Field name for X axis | x |
--y-field |
Field name for Y axis | y |
--x-title |
X axis label | field name |
--y-title |
Y axis label | field name |
--x-type |
X axis type: ordinal, temporal, quantitative | ordinal |
--x-domain |
Clamp/zoom the X scale with min,max bounds for quantitative or temporal charts |
auto |
--x-format |
Temporal X axis label format (d3-time-format, e.g. %b %d, %H:%M) |
auto |
--x-sort |
X axis order: ascending, descending, or none (preserve input order) | auto |
| `--se |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _meta.json
FAQ
Что делает скилл chart-image?
Generate publication-quality chart images from data. Supports line, bar, area, point, histogram, candlestick, pie/donut, heatmap, multi-series, and stacked charts. Use when visualizing data, creating graphs, plotting time series, showing distributions, or generating chart images for reports/alerts. Designed for Fly.io/VPS deployments - no native compilation, no Puppeteer, no browser required. Pure Node.js with prebuilt binaries.
Как установить скилл chart-image?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл chart-image запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…