data-analysis
БесплатноБез исполняемых скриптовНе проверенAnalyze data (e.g. an uploaded CSV/Excel) with pandas and produce a chart or report file, returned to the user as an attachment.
от richardhe-fundamenta★ 68 звёзд на GitHubОб этом скилле
data-analysis
Use this skill when the user wants to analyze data and/or get a chart or report — especially when they uploaded a data file.
Steps:
- Load the uploaded data by filename (it's in the working directory), e.g.
df = pandas.read_csv("data.csv")(orread_excel). Inspect columns/dtypes as needed. - Compute the requested aggregation/analysis with pandas (group-by, resample, etc.).
- Produce output files — they are returned to the user as attachments:
- Chart → save an image:
matplotlib/seabornfig.savefig("chart.png", dpi=150, bbox_inches="tight"). - Tabular report → write
report.xlsx(df.to_excel) orreport.csv. - Do not print raw bytes or a giant table to stdout — write a file instead.
- Chart → save an image:
- Print a short text summary (the headline finding) to stdout alongside the file(s).
- Call
run_codewith the full script.
Displaying charts in the UI:
- After run_code returns, any image you saved is reported back as a short placeholder token,
e.g.
chart.png -> {{chart:ab12}}. To show it, make ONEsend_a2ui_json_to_clientcall whosea2ui_jsonis a JSON list with BOTH abeginRenderingand asurfaceUpdate— neverbeginRenderingalone (that's an empty surface). Lay the surface out top-to-bottom: atitleText, athinkingText (2–4 short sentences explaining how you approached the task and what the data shows — your reasoning, in plain language), then the chart in anImagewhoseurlis the token copied EXACTLY (it resolves to the real image).Column.childrenuses{"explicitList": [<ids>]}:[ {"beginRendering": {"surfaceId": "report", "root": "root", "styles": {}}}, {"surfaceUpdate": {"surfaceId": "report", "components": [ {"id": "root", "component": {"Column": {"children": {"explicitList": ["title", "thinking", "chart"]}}}}, {"id": "title", "component": {"Text": {"text": {"literalString": "<headline>"}, "usageHint": "h3"}}}, {"id": "thinking", "component": {"Text": {"text": {"literalString": "<2-4 sentences: how you analyzed it + what the data shows>"}}}}, {"id": "chart", "component": {"Image": {"url": {"literalString": "{{chart:ab12}}"}}}} ]}} ]
Guidance:
- Available packages include pandas, numpy, polars, pyarrow, duckdb, scipy, scikit-learn, statsmodels, matplotlib, seaborn, altair, plotly, openpyxl.
- Prefer matplotlib
savefig("chart.png", ...)so the user gets a rendered image. - One clear chart per request unless asked otherwise; label axes and give it a title.
- No network access; work only from the uploaded data.
- Never hardcode, reconstruct, or invent the dataset. Analyze only the actual file in the working directory (open it by name). If the file isn't there, do NOT recreate it from memory — ask the user to attach it and stop.
- If run_code returns an error, fix the script and retry.
Установить data-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл data-analysis?
Analyze data (e.g. an uploaded CSV/Excel) with pandas and produce a chart or report file, returned to the user as an attachment.
Как установить скилл data-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic