Agent Skills0xranx/golembot › data-analysis

data-analysis

GitHub

用于加载CSV/Excel/JSON数据,执行清洗、统计分析及可视化,并生成图表与Markdown报告。适用于数据分析、趋势发现及报表制作场景。

templates/data-analyst/skills/data-analysis/SKILL.md 0xranx/golembot

Trigger Scenarios

分析数据集 计算统计数据 创建可视化图表 查找数据趋势 生成数据报告

Install

npx skills add 0xranx/golembot --skill data-analysis -g -y
More Options

Non-standard path

npx skills add https://github.com/0xranx/golembot/tree/main/templates/data-analyst/skills/data-analysis -g -y

Use without installing

npx skills use 0xranx/golembot@data-analysis

指定 Agent (Claude Code)

npx skills add 0xranx/golembot --skill data-analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add 0xranx/golembot --all -g -y

预览 repo 内 skill

npx skills add 0xranx/golembot --list

SKILL.md

Frontmatter
{
    "name": "data-analysis",
    "description": "Loads CSV, Excel, and JSON data files, performs statistical analysis, and generates charts and reports. Use when the user asks to analyze a dataset, compute statistics, create visualizations, find trends, or produce a data report."
}

Data Analysis Skill

Process data files in the data/ directory, perform analysis, and output reports to reports/.

Step-by-Step Workflow

  1. Identify the data source — List available files and confirm with the user which to analyze:
ls data/
  1. Load and inspect the data — Use Python to read the file and show a summary:
import pandas as pd

df = pd.read_csv("data/sales.csv")  # or read_excel / read_json
print(f"Shape: {df.shape}")
print(f"Columns: {list(df.columns)}")
print(df.dtypes)
print(df.describe())
print(f"Missing values:\n{df.isnull().sum()}")
  1. Clean the data — Handle missing values, fix types, remove duplicates:
df = df.drop_duplicates()
df["date"] = pd.to_datetime(df["date"], errors="coerce")
df["amount"] = pd.to_numeric(df["amount"], errors="coerce")
df = df.dropna(subset=["date", "amount"])
print(f"Clean shape: {df.shape}")
  1. Analyze — Compute the requested statistics or aggregations:
# Example: monthly revenue trend
monthly = df.groupby(df["date"].dt.to_period("M"))["amount"].sum()
print(monthly)

# Example: correlation matrix
print(df[["amount", "quantity", "discount"]].corr())
  1. Visualize — Generate charts and save to reports/:
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt

monthly.plot(kind="bar", title="Monthly Revenue")
plt.tight_layout()
plt.savefig("reports/monthly_revenue.png", dpi=150)
plt.close()
print("Chart saved to reports/monthly_revenue.png")
  1. Write the report — Save a Markdown report to reports/:
with open("reports/analysis_report.md", "w") as f:
    f.write("# Analysis Report\n\n")
    f.write("## Summary\n")
    f.write(f"- Total records: {len(df)}\n")
    f.write(f"- Date range: {df['date'].min()} to {df['date'].max()}\n")
    f.write(f"- Total revenue: {df['amount'].sum():,.2f}\n\n")
    f.write("## Charts\n")
    f.write("![Monthly Revenue](monthly_revenue.png)\n")
print("Report saved to reports/analysis_report.md")

Validation Checkpoints

After each step, verify before proceeding:

  • After loading: confirm row count and column names are plausible
  • After cleaning: check that no critical data was dropped unexpectedly (compare row counts)
  • After analysis: sanity-check totals and aggregations (e.g., no negative counts)
  • After saving: confirm output files exist with ls reports/

Using calc.py

For complex or specialized calculations, use the calc.py helper script:

python calc.py --input data/sales.csv --operation regression --output reports/regression.json

Output Format

Analysis reports should follow this structure:

# [Analysis Topic] Report

## Summary
- Key finding 1
- Key finding 2

## Data Overview
- Records: N rows
- Time range: ...

## Detailed Analysis
...

## Recommendations
...

Version History

  • 04635ad Current 2026-07-25 08:59

Same Skill Collection

examples/multi-bot-group/bot-a/skills/researcher/SKILL.md
examples/multi-bot-group/bot-b/skills/coder/SKILL.md
skills/escalation/SKILL.md
skills/general/SKILL.md
skills/im-adapter/SKILL.md
skills/kb-guide/SKILL.md
skills/message-push/SKILL.md
skills/multi-bot/SKILL.md
skills/task-manager/SKILL.md
templates/code-reviewer/skills/code-review/SKILL.md
templates/customer-support/skills/faq-support/SKILL.md
templates/meeting-notes/skills/meeting/SKILL.md
templates/ops-assistant/skills/ops/SKILL.md
templates/research/skills/research/SKILL.md

Metadata

Files
0
Version
ce48b37
Hash
61d8800b
Indexed
2026-07-25 08:59

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 08:31
浙ICP备14020137号-1 $mapa de visitantes$