Produce a report-ready data analysis document from data tables — either all data files in the current folder, or specific files the user provides/attaches. The report is structured so the user can take it directly to a presentation: a one-screen conclusion summary, followed by detail tables and a "needs manual confirmation" list.
Core principles:
本技能來自小蔥技能站7w4.net。
Trigger this skill when the user wants to:
Typical user phrasings:
The skill accepts data from either:
Determine the data source at the start of Phase 1:
Determine the data source (see "Data Source" section above):
Run the scan script to get a comprehensive overview of all data files:
# Scan a directory
"<managed-python>" "C:\Users\86176\.workbuddy\skills\data-analysis-report\scripts\scan_tables.py" "<directory>"
# Scan specific files
"<managed-python>" "C:\Users\86176\.workbuddy\skills\data-analysis-report\scripts\scan_tables.py" "<file1>" "<file2>"
# Mixed: directory + files
"<managed-python>" "C:\Users\86176\.workbuddy\skills\data-analysis-report\scripts\scan_tables.py" "<directory>" "<file1>"
Replace <managed-python> with the managed Python path. Replace the path
arguments with the actual directory or file paths identified in step 1.
If pandas is not installed, install it first:
"<managed-python>" -m pip install pandas openpyxl xlrd
Read the scan output carefully. Understand:
If the scan script fails or data is complex, manually read key files to supplement understanding. Use the Read tool for JSON, or run Python snippets for Excel/CSV.
Before any analysis, present findings to the user and confirm:
Present this as a clear summary and wait for user confirmation. Use AskUserQuestion if multiple options need to be selected. Do not proceed to Phase 3 until the user confirms the scope.
Example confirmation message:
我掃描了資料檔案,發現以下資料表:
1. 銷售明細.xlsx — 3個Sheet,共12,450行,時間範圍 2024-01-01 ~ 2024-09-30
2. 客戶清單.csv — 320行
3. 退貨記錄.csv — 156行,時間範圍 2024-06-01 ~ 2024-09-30
可分析的指標:營收、訂單數、客單價、退貨率
可拆解的維度:地區、品類、渠道、客戶
請確認:
1. 分析時間範圍是否為 2024-07-01 ~ 2024-09-30(Q3)?
2. 重點關注的指標是什麼?
3. 報告受眾是誰?
After scope confirmation:
Calculate changes: compute period-over-period (環比) or year-over-year (同比) changes for all key metrics. Use Python/pandas for accuracy.
Rank fluctuations: sort by absolute change magnitude (percentage or absolute, whichever is more meaningful for the metric). Pick the top 3.
For each of the top 3 fluctuations, determine:
Record data sources for every number: file name, sheet name, column, row range. This is mandatory for traceability.
Quality check: if any number cannot be traced to a specific data point, or if data is missing/ambiguous, add it to the "需人工確認" list. Do not include untraceable numbers in the main conclusions.
Ask the user for output format if not already clear from context:
Generate the report following the structure in references/output_format.md.
Load that reference file for the detailed format specification.
The report has four sections:
Verify traceability: before finalizing, check that every number in Sections 1 and 2 has a source citation. Move any unverifiable numbers to Section 4.
One-screen check: ensure Section 1 fits on one screen (approximately 15-20 lines). If it doesn't, condense — merge similar points, remove redundant detail.
Save the report to the workspace directory and present it to the user.
Automated data table scanner. Accepts one or more paths — directories (scanned recursively) or individual files. Run it at the start of Phase 1 to get a structured overview of all data files. Outputs: file names, formats, sheet names, columns, row counts, data types, date ranges, numeric column statistics, and sample rows.
Detailed specification for the report document structure. Load this file before generating the report in Phase 4. Contains: section structure, formatting rules, number formatting, traceability requirements, and examples.
這個Skill質量中等偏上,能從Excel、CSV等表格資料中自動生成分析報告,包含關鍵波動分析和資料明細表,並會標註需要人工核實的資料項。但它依賴資料格式規範,路徑配置可能存在問題,且沒有經過充分測試。建議先用簡單資料檔案試用,確認能正常執行後再用於正式場景。