闲社服务运行正常AI智能体自动化平台
d

数据分析工具

技能标识:data-analyzer

Data analysis tool for Excel, CSV, Word, PDF, TXT, Markdown files. Use when user needs to analyze, summarize, or compare data from multiple files. Supports folder scanning, data aggregation, statistics, report generation in Markdown/Excel/Word/PDF. Multi-language support. 数据分析、文件夹分析、Excel分析。

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

数据分析工具

数据分析器

分析并汇总来自Excel、CSV、Word和PDF文件的数据。

功能特性

  • - 📊 多格式输入:Excel、CSV、Word、PDF、TXT、Markdown
  • 📁 文件夹扫描:分析整个文件夹
  • 📈 统计功能:求和、平均值、趋势分析
  • 🔄 数据合并:合并多个文件
  • 📉 可视化:生成图表
  • 📋 多格式输出:Markdown、Excel、Word、PDF
  • 🌍 多语言支持:英文、中文输出

触发条件

  • - 分析这个文件夹 / Analyze this folder
  • 对比这些Excel / Compare these Excel files
  • 汇总数据 / Summarize the data
  • data-analyzer

Python代码

python
import os
import pandas as pd
from pathlib import Path
from docx import Document
import fitz # PyMuPDF

class DataAnalyzer:
def init(self, folder_path):
self.folder = Path(folder_path)
self.files = self.scanfiles()

def scanfiles(self):
扫描文件夹中的支持文件
files = {
excel: [], csv: [], word: [],
pdf: [], txt: [], markdown: []
}

for f in self.folder.rglob(*):
ext = f.suffix.lower()
if ext in [.xlsx, .xls]:
files[excel].append(str(f))
elif ext == .csv:
files[csv].append(str(f))
elif ext == .docx:
files[word].append(str(f))
elif ext == .pdf:
files[pdf].append(str(f))
elif ext == .txt:
files[txt].append(str(f))
elif ext in [.md, .markdown]:
files[markdown].append(str(f))

return files

def analyzeexcel(self, filepath):
分析Excel文件
df = pd.readexcel(filepath)
return {rows: len(df), columns: len(df.columns), data: df}

def analyzecsv(self, filepath):
分析CSV文件
df = pd.readcsv(filepath)
return {rows: len(df), columns: len(df.columns), data: df}

def analyzeword(self, filepath):
分析Word文件
doc = Document(file_path)
text = \n.join([p.text for p in doc.paragraphs if p.text.strip()])
return {paragraphs: len(doc.paragraphs), text: text}

def analyzepdf(self, filepath):
分析PDF文件
doc = fitz.open(file_path)
text =
for page in doc:
text += page.get_text()
result = {pages: len(doc), text: text}
doc.close()
return result

def analyzetxt(self, filepath):
分析TXT文件
with open(file_path, r, encoding=utf-8) as f:
text = f.read()
return {lines: len(text.split(\n)), text: text}

def analyzemarkdown(self, filepath):
分析Markdown文件
with open(file_path, r, encoding=utf-8) as f:
text = f.read()
return {lines: len(text.split(\n)), text: text}

def analyzefile(self, filepath):
自动检测并分析任何支持的文件
ext = Path(file_path).suffix.lower()

if ext in [.xlsx, .xls]:
return self.analyzeexcel(filepath)
elif ext == .csv:
return self.analyzecsv(filepath)
elif ext == .docx:
return self.analyzeword(filepath)
elif ext == .pdf:
return self.analyzepdf(filepath)
elif ext == .txt:
return self.analyzetxt(filepath)
elif ext in [.md, .markdown]:
return self.analyzemarkdown(filepath)
else:
return {error: f不支持的格式:{ext}}

def generate_summary(self):
生成分析摘要
summary = {totalfiles: 0, filedetails: []}

for ftype, flist in self.files.items():
for fpath in flist:
try:
analysis = self.analyze_file(fpath)
summary[file_details].append({
name: os.path.basename(fpath),
type: ftype,
analysis: analysis
})
summary[total_files] += 1
except Exception as e:
summary[file_details].append({
name: os.path.basename(fpath),
type: ftype,
error: str(e)
})

return summary



使用示例

用户:分析此文件夹中的所有Excel文件
代理:使用DataAnalyzer扫描并分析

用户:对比这些CSV文件
代理:读取并对比数据

用户:生成数据报告
代理:生成分析报告



注意事项

  • - 支持.xlsx、.csv、.docx、.pdf格式
  • 本地处理,不上传数据
  • 跨平台兼容

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 data-analyzer-1776051498 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 data-analyzer-1776051498 技能

通过命令行安装

skillhub install data-analyzer-1776051498

下载

⬇ 下载 data-analyzer v1.1.0(免费)

文件大小: 3.06 KB | 发布时间: 2026-4-14 11:58

v1.1.0 最新 2026-4-14 11:58
清理测试文件,重新发布
返回顶部