data-charts
БесплатноБез исполняемых скриптовНе проверенAnalyze tabular data and render charts (bar, line, scatter, pie, histogram) to PNG/SVG with pandas + matplotlib. Use whenever the user wants to plot, chart…
от phuetz★ 53 звезды на GitHubОб этом скилле
Analyze data & render charts with pandas + matplotlib
Turn tabular data (CSV/JSON/Excel/inline) into a real chart image using the open-source pandas + matplotlib libraries. Work in visible steps and verify the image was written before reporting.
Getting the data when it's NOT in a file (e.g. "France GDP over 10 years")
When the user asks to chart something you must look up rather than read from a
file, gather the numbers FIRST with your normal tools — your own knowledge, or a
quick web_search — then hard-code them as inline Python lists. Do NOT
fetch from an external API inside the Python script (urllib/requests):
sandboxed network calls routinely time out (the 30 s command limit), which makes
you give up and fall back to a much worse ASCII/text "chart". Inline numbers →
matplotlib → a real PNG is fast and reliable. Only read from the network when the
user explicitly gives you a data URL and it's known-fast.
Preflight (extras-tier libs)
These libs are optional and not in the default build. Always check first:
python3 - <<'PY'
try:
import pandas, matplotlib # noqa: F401
except ModuleNotFoundError as e:
raise SystemExit(
f"{e.name} not installed. Run `npm run prepare:python:extras` in cowork/ "
"to enable the data-charts skill (pandas + matplotlib)."
)
print("data-charts deps OK")
PY
Workflow (one step at a time)
- Load the data with pandas (
read_csv/read_json/read_excel), or build aDataFramefrom inline numbers. - Inspect: print
df.head()anddf.describe()(or the shape) so the data is visibly understood before plotting. - Plot: use the non-interactive Agg backend (
matplotlib.use("Agg"), set before importing pyplot — there is no display), build the chart, add a title + axis labels, andsavefig(path, dpi=144, bbox_inches="tight"). - Verify:
assert os.path.getsize(path) > 0and print the path + size. - Report the saved image path and a one-line insight from the data.
Quality conventions
- Always set
matplotlib.use("Agg")beforeimport matplotlib.pyplot— the app has no X display; the interactive backend would crash. - Label axes and give every chart a title; use a legend when >1 series.
- Prefer
tight_layout()/bbox_inches="tight"so labels aren't clipped. - Save PNG by default (144 dpi); SVG when the user wants a vector.
Example
python3 - <<'PY'
import os
import pandas as pd
import matplotlib
matplotlib.use("Agg") # headless — set before pyplot
import matplotlib.pyplot as plt
df = pd.read_csv("sales.csv") # columns: month, revenue
print(df.head()); print(df.describe())
fig, ax = plt.subplots(figsize=(8, 4.5))
ax.bar(df["month"], df["revenue"], color="#3b82f6")
ax.set_title("Monthly revenue"); ax.set_xlabel("Month"); ax.set_ylabel("Revenue ($)")
fig.tight_layout()
out = "revenue.png"
fig.savefig(out, dpi=144, bbox_inches="tight")
assert os.path.getsize(out) > 0, "chart image is empty"
print(f"wrote {out} ({os.path.getsize(out)} bytes); peak month = "
f"{df.loc[df['revenue'].idxmax(), 'month']}")
PY
Notes
- The chart image is an artifact — surface its path so the GUI can preview it.
- For quick stats without a chart,
df.describe()/df.groupby(...).agg(...). - To put a chart into an Excel/Word/PowerPoint file, hand the saved PNG to the
xlsx/docx/pptxcreate skills.
Установить data-charts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл data-charts?
Analyze tabular data and render charts (bar, line, scatter, pie, histogram) to PNG/SVG with pandas + matplotlib. Use whenever the user wants to plot, chart, graph, or visualize data from a CSV/JSON/Excel file or inline numbers.
Как установить скилл data-charts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-charts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create 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…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic