본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트85k · #1380

data-analysis

하는 일

이 스킬은 업로드한 엑셀과 CSV 스프레드시트 파일을 분석합니다. 데이터에서 합계, 요약, 필터, 피벗 형태의 보기를 얻고 싶은 사람을 위한 기능입니다.

사용하는 경우

  • ✓사용자가 엑셀이나 CSV 파일을 업로드하고 분석을 원할 때.
  • ✓사용자가 스프레드시트에서 요약, 피벗 테이블, 통계를 요청할 때.
  • ✓사용자가 결과를 CSV, JSON, Markdown으로 내보내려는 경우.

스킬 링크

https://github.com/bytedance/deer-flow/blob/main/skills/public/data-analysis/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/bytedance/deer-flow/blob/main/skills/public/data-analysis/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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
자주 묻는 질문

어떤 파일을 받나요?

여러 시트가 있는 엑셀 통합 문서와 CSV 파일을 받습니다.

추가 소프트웨어가 필요한가요?

네. duckdb와 openpyxl 파이썬 패키지가 필요하며, 없으면 설치 안내와 함께 중단됩니다.

큰 파일도 처리할 수 있나요?

스킬은 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬