data-analysis
Skill này làm gì
Skill này phân tích các file bảng tính và CSV bạn tải lên. Skill dành cho những ai muốn có tổng, tóm tắt, bộ lọc hoặc các góc nhìn kiểu pivot từ dữ liệu của mình.
Khi nào nên dùng
- ✓Khi người dùng tải lên file Excel hoặc CSV và muốn phân tích.
- ✓Khi người dùng yêu cầu tóm tắt, bảng pivot hoặc thống kê từ một bảng tính.
- ✓Khi người dùng muốn xuất kết quả ra CSV, JSON hoặc Markdown.
Liên kết skill
https://github.com/bytedance/deer-flow/blob/main/skills/public/data-analysis/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Đây là bảng tính doanh số của tôi. Bạn có thể tóm tắt theo khu vực và theo tháng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill dùng DuckDB, một công cụ cơ sở dữ liệu chạy ngay bên trong script, để tải mỗi sheet thành một bảng. Sau đó nó chạy truy vấn hoặc thống kê tóm tắt và lưu kết quả theo định dạng bạn chọn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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 |
Câu hỏi thường gặp
Skill nhận những file nào?
Skill nhận file Excel nhiều sheet cũng như file CSV.
Có cần phần mềm bổ sung không?
Có. Skill cần các gói Python duckdb và openpyxl, và sẽ dừng lại với một ghi chú cài đặt nếu thiếu chúng.
Skill có xử lý được file lớn không?
Skill nói bộ máy lưu trữ theo cột của DuckDB xử lý file lớn một cách hiệu quả.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 85k
- Vị trí xếp hạng
- #1380
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
engineer-system-change
85kGiúp agent của bạn đánh giá xem một thay đổi phần mềm có thật sự cần thiết trước khi xây dựng, bằng cách kiểm tra vấn đề, người dùng và rủi ro.
academic-paper-review
85kGiúp agent của bạn đánh giá một bài báo khoa học như một người phản biện, gồm phương pháp, điểm mạnh, điểm yếu và các bước tiếp theo.
bootstrap
85kHướng dẫn một cuộc trò chuyện làm quen thân thiện để tạo file SOUL.md cá nhân, xác định đối tác AI của bạn là ai và cách nó hành xử.
chart-visualization
85kBiến số liệu của bạn thành ảnh biểu đồ, chọn từ 26 loại biểu đồ như đường, cột, tròn, bản đồ và phễu.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.