跳到正文
cccskills
免费在 GitHub 公开

chart-image

Turn data into PNG or SVG charts, including line, bar, area, and point charts. Customize titles, themes, labels, and highlighted changes, or compare multiple series and create compact sparklines for reports and alerts. It runs with Node.js using Vega-Lite.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Generate publication-quality chart images from data. Supports line, bar, area, and point charts. Use when visualizing data, creating graphs, plotting time series, 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.

sundial-org/awesome-openclaw-skills星标 671(GitHub 671 + cccskills 0)
集成工具Docker

实测评分 未实测

查看安装方法

适用场景

  • Creating charts for reports from data
  • Plotting and comparing time series
  • Highlighting recent changes in monitoring alerts
  • Generating small sparklines for text summaries

包含的文件(5)

  • SKILL.md5.1 KB
  • CAPABILITY.md2.5 KB
  • scripts/chart.mjs28.6 KB
  • scripts/package-lock.json51.3 KB
  • scripts/package.json155 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 canvas which 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)

Alternatives and why they don't work well on Fly:

  • canvas npm - Requires native compilation, fails on minimal Docker images
  • Puppeteer + Chart.js - 400MB+ Chrome download, slow cold starts, memory heavy
  • QuickChart API - External dependency, rate limits, privacy concerns
  • Plotly - Needs Puppeteer for static image export

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

Alert-Style Chart (recommended for monitors)

# Full data with zoomed Y-axis
node /data/clawd/skills/chart-image/scripts/chart.mjs \
  --type line \
  --data '[...]' \
  --title "Elon Posts 34 Tweets This Week" \
  --show-change \
  --focus-change \
  --show-values \
  --dark \
  --output alert.png

# Focus on recent action (last 4 points)
node /data/clawd/skills/chart-image/scripts/chart.mjs \
  --type line \
  --data '[hourly data...]' \
  --title "Elon Tweet Odds (24h)" \
  --show-change \
  --focus-change \
  --focus-recent 4 \
  --show-values \
  --dark \
  --output alert-recent.png

Options

OptionDescriptionDefault
--typeChart type: line, bar, area, pointline
--dataJSON array of data points-
--specPath to full Vega-Lite spec file-
--outputOutput PNG pathchart.png
--titleChart title-
--widthWidth in pixels600
--heightHeight in pixels300
--x-fieldField name for X axisx
--y-fieldField name for Y axisy
--x-titleX axis labelfield name
--y-titleY axis labelfield name
--colorLine/bar color#e63946
--y-domainY scale as "min,max"auto
--show-changeShow +/-% change annotationfalse
--focus-changeZoom Y-axis to 2x data rangefalse
--focus-recent NShow only last N data pointsall
--show-valuesLabel min/max peak pointsfalse
--darkDark mode themefalse
--svgOutput SVG instead of PNGfalse
--sparklineTiny inline chart (80x20, no axes)false
--stackedStacked bar chart (requires --color-field)false
--color-fieldField name for stack categories-
--series-fieldField for multi-series line charts-

Multi-Series Line Charts

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"},{"x":"Feb","y":12,"market":"A"},{"x":"Feb","y":18,"market":"B"}]' \
  --title "Comparison" \
  --output multi.png

Each unique value in --series-field becomes a separate colored line with legend.

Stacked Bar Charts

Visualize breakdowns by category:

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

Data needs three fields: x (groups), y (values), and the color-field (stack categories).

Sparklines (inline mini-charts)

Tiny charts for embedding in text summaries:

node chart.mjs \
  --sparkline \
  --data '[{"x":"1","y":10},{"x":"2","y":15},{"x":"3","y":12}]' \
  --output spark.png

Sparklines are 80x20 by default (override with --width / --height), transparent background, no axes.

Theme Selection

Use --dark for dark mode. Recommended to auto-select based on time:

  • Night (20:00-07:00 local): --dark
  • Day (07:00-20:00 local): no flag (light mode)

Piping Data

echo '[{"x":"A","y":1},{"x":"B","y":2}]' | node chart.mjs --output out.png

Custom Vega-Lite Spec

For advanced charts, pass a full Vega-Lite spec:

node chart.mjs --spec my-spec.json --output custom.png

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费

Set up and use the 1Password command-line tool `op` to sign in, verify account access, and work with vault data. The skill covers single or multiple accounts and shows how to run commands or fill templates with secrets while limiting exposure in logs and files.

中文简介正在准备中。当前显示英语简介。

  • Set up the `op` command-line tool
  • Sign in and verify access to an account
  • Run a command with vault secrets
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Check live prices, price changes, and trading volume for Shanghai, Shenzhen, and Beijing stocks. Review intraday volume patterns and possible large-investor activity, and manage holdings with cost, quantity, and profit or loss summaries.

中文简介正在准备中。当前显示英语简介。

  • Checking current prices for A-share stocks
  • Reviewing intraday volume and large-investor signals
  • Managing a stock portfolio and checking profit or loss
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Scan HTML or JSX files and directories for accessibility issues such as missing image descriptions, form labels, and keyboard access problems. The skill identifies WCAG guideline failures and provides suggested code fixes alongside its findings.

中文简介正在准备中。当前显示英语简介。

  • Checking a new component before release
  • Auditing an inherited codebase
  • Preparing for an accessibility compliance review
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Plan A/B tests that compare page or product changes, with clear hypotheses, sample sizes, success metrics, and traffic allocation. Get a structured test plan and guidance for interpreting results and deciding what to try next.

中文简介正在准备中。当前显示英语简介。

  • Comparing signup button copy
  • Planning a pricing page experiment
  • Estimating sample size and test duration
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Turn LinkedIn profile URLs into coordinated account-based outreach. The workflow gathers profile details, enriches contacts with email and phone data, looks up mailing addresses, and prepares email, LinkedIn, and handwritten-letter touches with the specified services.

中文简介正在准备中。当前显示英语简介。

  • Building a multichannel campaign from LinkedIn prospect URLs
  • Enriching prospect records with work contact details
  • Coordinating email, LinkedIn, and handwritten mail outreach
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

accli

免费

Work with Apple Calendar on macOS to list calendars, find and view events, and check busy time slots across calendars. Create, update, or delete events with details such as dates, locations, and descriptions.

中文简介正在准备中。当前显示英语简介。

  • Reviewing events on a work or personal calendar
  • Checking availability before scheduling a meeting
  • Creating or updating a calendar event
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

查看 sundial-org 的全部技能

报告此技能的问题