data-analysis
できること
このスキルは、アップロードされたスプレッドシートやCSVファイルを分析します。データから合計、要約、フィルター、ピボット風の表示がほしい人向けです。
使う場面
- ✓利用者がExcelやCSVのファイルをアップロードして、分析を求めたとき。
- ✓利用者がスプレッドシートの要約、ピボットテーブル、統計を求めたとき。
- ✓利用者が結果をCSV、JSON、Markdownで書き出したいとき。
スキルのリンク
https://github.com/bytedance/deer-flow/blob/main/skills/public/data-analysis/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“これは私の売上のスプレッドシートです。地域別と月別に要約してもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、スクリプトの中で動くデータベースエンジンであるDuckDBを使い、各シートをテーブルとして読み込みます。その後、クエリや要約統計を実行し、結果を選んだ形式で保存します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Data Analysis Skill
Overview
This skill analyzes user-uploaded Excel/CSV files using DuckDB — an in-process analytical SQL engine. It supports schema inspection, SQL-based querying, statistical summaries, and result export, all through a single Python script.
Environment setup
Prepare the Python environment before running analyses. Install the required packages explicitly using the same interpreter that will run the script:
python -m pip install duckdb openpyxl
If either package is missing, the script exits with a setup instruction; it does not invoke an installer or modify the environment. DuckDB's existing spatial-extension setup for loading files is unchanged.
Core Capabilities
- Inspect Excel/CSV file structure (sheets, columns, types, row counts)
- Execute arbitrary SQL queries against uploaded data
- Generate statistical summaries (mean, median, stddev, percentiles, nulls)
- Support multi-sheet Excel workbooks (each sheet becomes a table)
- Export query results to CSV, JSON, or Markdown
- Handle large files efficiently with DuckDB's columnar engine
Workflow
Step 1: Understand Requirements
When a user uploads data files and requests analysis, identify:
- File location: Path(s) to uploaded Excel/CSV files under
/mnt/user-data/uploads/ - Analysis goal: What insights the user wants (summary, filtering, aggregation, comparison, etc.)
- Output format: How results should be presented (table, CSV export, JSON, etc.)
- You don't need to check the folder under
/mnt/user-data
Step 2: Inspect File Structure
First, inspect the uploaded file to understand its schema:
python /mnt/skills/public/data-analysis/scripts/analyze.py \
--files /mnt/user-data/uploads/data.xlsx \
--action inspect
This returns:
- Sheet names (for Excel) or filename (for CSV)
- Column names, data types, and non-null counts
- Row count per sheet/file
- Sample data (first 5 rows)
Step 3: Perform Analysis
Based on the schema, construct SQL queries to answer the user's questions.
Run SQL Query
python /mnt/skills/public/data-analysis/scripts/analyze.py \
--files /mnt/user-data/uploads/data.xlsx \
--action query \
--sql "SELECT category, COUNT(*) as count, AVG(amount) as avg_amount FROM Sheet1 GROUP BY category ORDER BY count DESC"
Generate Statistical Summary
python /mnt/skills/public/data-analysis/scripts/analyze.py \
--files /mnt/user-data/uploads/data.xlsx \
--action summary \
--table Sheet1
This returns for each numeric column: count, mean, std, min, 25%, 50%, 75%, max, null_count. For string columns: count, unique, top value, frequency, null_count.
Export Results
python /mnt/skills/public/data-analysis/scripts/analyze.py \
--files /mnt/user-data/uploads/data.xlsx \
--action query \
--sql "SELECT * FROM Sheet1 WHERE amount > 1000" \
--output-file /mnt/user-data/outputs/filtered-results.csv
Supported output formats (auto-detected from extension):
.csv— Comma-separated values.json— JSON array of records.md— Markdown table
Relative output paths are resolved from the current working directory. A bare
filename such as report.csv writes there directly; missing parent directories
in paths such as reports/report.csv are created automatically.
An existing file at the target path is overwritten without warning.
JSON result column names must be unique. Use explicit SQL aliases for repeated
names, for example SELECT a.id AS left_id, b.id AS right_id FROM ....
Duplicate names cause an error and leave any existing output file untouched.
The error lists the repeated names so you can alias them directly. The CLI prints
a short Error: ... message to stderr and exits nonzero for this rejection.
JSON exports also reject non-finite numbers (NaN, Infinity, and -Infinity),
including values inside lists or structs, before opening the output file. Filter
or replace them in SQL, for example CASE WHEN isfinite(ratio) THEN ratio ELSE NULL END AS ratio. Finite numbers, nulls, and text such as 'NaN' remain valid.
Parameters
| Parameter | Required | Description |
|---|---|---|
--files |
Yes | Space-separated paths to Excel/CSV files |
--action |
Yes | One of: inspect, query, summary |
--sql |
For query |
SQL query to execute |
--table |
For summary |
Table/sheet name to summarize |
--output-file |
No | Path to export result |
よくある質問
どのファイルを受け付けますか?
複数のシートを持つExcelのブックと、CSVファイルを受け付けます。
追加のソフトウェアが必要ですか?
はい。duckdbとopenpyxlのPythonパッケージが必要です。不足している場合は、セットアップの注意を示して止まります。
大きなファイルも扱えますか?
スキルは、DuckDBの列指向エンジンが大きなファイルを効率よく扱えると述べています。
詳細
作者による元の説明
Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to CSV/JSON/Markdown.
repo: bytedance/deer-flow
人気
- GitHubのスター
- 85k
- ランキング
- #1380
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
engineer-system-change
85kエージェントが、ソフトウェアの変更を作る前に、問題、利用者、リスクを確認して、本当に必要かを判断できるよう支援します。
academic-paper-review
85kエージェントが、研究論文を査読者のように、方法、強み、弱み、次のステップを含めてレビューできるよう支援します。
bootstrap
85kエージェントが、あなたの人格を形作るSOUL.mdファイルを作る、親しみやすいオンボーディングのチャットを導きます。AIのパートナーが誰で、どう振る舞うかを定義します。
chart-visualization
85kエージェントが、数字を、折れ線、棒、円、地図、ファネルなど26種類のグラフから選んで、グラフ画像に変えられるよう支援します。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。