← 返回 Skills 市场
tobewin

Data Analyzer

作者 ToBeWin · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
896
总下载
0
收藏
6
当前安装
11
版本数
在 OpenClaw 中安装
/install 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 f...
使用说明 (SKILL.md)

Data Analyzer

Analyze and summarize data from Excel, CSV, Word, and PDF files.

Features

  • 📊 Multi-Format Input: Excel, CSV, Word, PDF, TXT, Markdown
  • 📁 Folder Scan: Analyze entire folders
  • 📈 Statistics: Sum, average, trends
  • 🔄 Data Merge: Combine multiple files
  • 📉 Visualization: Generate charts
  • 📋 Multi-Format Output: Markdown, Excel, Word, PDF
  • 🌍 Multi-Language: English, Chinese output

Trigger Conditions

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

Python Code

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._scan_files()
    
    def _scan_files(self):
        """Scan folder for supported files"""
        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 analyze_excel(self, file_path):
        """Analyze Excel file"""
        df = pd.read_excel(file_path)
        return {'rows': len(df), 'columns': len(df.columns), 'data': df}
    
    def analyze_csv(self, file_path):
        """Analyze CSV file"""
        df = pd.read_csv(file_path)
        return {'rows': len(df), 'columns': len(df.columns), 'data': df}
    
    def analyze_word(self, file_path):
        """Analyze Word file"""
        doc = Document(file_path)
        text = '\
'.join([p.text for p in doc.paragraphs if p.text.strip()])
        return {'paragraphs': len(doc.paragraphs), 'text': text}
    
    def analyze_pdf(self, file_path):
        """Analyze PDF file"""
        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 analyze_txt(self, file_path):
        """Analyze TXT file"""
        with open(file_path, 'r', encoding='utf-8') as f:
            text = f.read()
        return {'lines': len(text.split('\
')), 'text': text}
    
    def analyze_markdown(self, file_path):
        """Analyze Markdown file"""
        with open(file_path, 'r', encoding='utf-8') as f:
            text = f.read()
        return {'lines': len(text.split('\
')), 'text': text}
    
    def analyze_file(self, file_path):
        """Auto-detect and analyze any supported file"""
        ext = Path(file_path).suffix.lower()
        
        if ext in ['.xlsx', '.xls']:
            return self.analyze_excel(file_path)
        elif ext == '.csv':
            return self.analyze_csv(file_path)
        elif ext == '.docx':
            return self.analyze_word(file_path)
        elif ext == '.pdf':
            return self.analyze_pdf(file_path)
        elif ext == '.txt':
            return self.analyze_txt(file_path)
        elif ext in ['.md', '.markdown']:
            return self.analyze_markdown(file_path)
        else:
            return {'error': f'Unsupported format: {ext}'}
    
    def generate_summary(self):
        """Generate analysis summary"""
        summary = {'total_files': 0, 'file_details': []}
        
        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

Usage

User: "Analyze all Excel files in this folder"
Agent: 使用 DataAnalyzer 扫描并分析

User: "Compare these CSV files"
Agent: 读取并对比数据

User: "Generate a data report"
Agent: 生成分析报告

Notes

  • Supports .xlsx, .csv, .docx, .pdf
  • Local processing, no data uploaded
  • Cross-platform compatible
安全使用建议
This skill appears coherent for local file analysis. Before using it: (1) only point the analyzer at folders you trust (it recursively reads all files in the folder), (2) be prepared to install Python packages it lists (pip installs can pull native wheels and run setup code), and (3) if you have sensitive files in your home or system paths, run the skill in a sandboxed environment or a copy of the data. If you need network isolation, verify your agent environment prevents outbound connections even though the provided code does not perform any network I/O.
功能分析
Type: OpenClaw Skill Name: data-analyzer Version: 1.1.0 The data-analyzer skill is a standard utility for parsing and summarizing various file formats (Excel, CSV, Word, PDF, TXT, Markdown) using well-known libraries like pandas and PyMuPDF. The Python code in SKILL.md performs local file operations restricted to a user-provided directory, lacks any network communication or data exfiltration logic, and contains no evidence of prompt injection or malicious intent.
能力评估
Purpose & Capability
Name/description match the provided Python code: the skill scans folders, reads Excel/CSV/Word/PDF/TXT/Markdown files, and summarizes them. Requiring python3 and libraries (pandas, openpyxl, python-docx, PyMuPDF, matplotlib) is proportionate to the described features.
Instruction Scope
SKILL.md provides local-only analysis and contains the full Python implementation. The analyzer recursively scans the provided folder (Path.rglob('*')) and opens/reads file contents — which is expected for folder-level analysis but means the agent will read any files under the supplied path (including potentially sensitive files if the user points it at a broad location). The instructions do not reference environment variables or external endpoints.
Install Mechanism
This is an instruction-only skill with no install spec. The SKILL.md lists a pip install command for dependencies (pip install pandas openpyxl python-docx pymupdf matplotlib). Because there is no enforced install step, nothing is written by the skill itself. Installing dependencies via pip is a normal step but carries the usual PyPI risks (package supply-chain, native build deps for some wheels).
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets.
Persistence & Privilege
always is false and the skill does not request persistent system presence or modify other skills or system-wide configuration. Agent autonomous invocation is allowed (default) but is not combined with other concerning privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install data-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /data-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
清理测试文件,重新发布
v1.0.9
详细分析报告:包含完整数据内容、详细统计、文件分析,Markdown/Word/PDF内容一致
v1.0.8
统一报告内容:Markdown/Word/PDF使用完全相同的文本内容,只是格式不同
v1.0.7
统一报告内容:Markdown/Word/PDF内容一致,Excel仅输出统计汇总
v1.0.6
支持多格式详细报告:Markdown/Word/PDF/Excel全部支持详细内容分析
v1.0.5
完善报告内容:生成详细的文件内容分析报告,包含完整数据和统计
v1.0.4
完善代码实现:添加完整的多格式分析代码(Excel/CSV/Word/PDF/TXT/Markdown)
v1.0.3
添加Word输出支持和多语言:支持中英文报告输出
v1.0.2
添加TXT和Markdown支持:完善文件格式支持
v1.0.1
完善PDF支持:支持PDF文件分析,生成PDF格式报告
v1.0.0
数据分析工具:支持Excel/CSV/Word/PDF,文件夹扫描,数据汇总
元数据
Slug data-analyzer
版本 1.1.0
许可证 MIT-0
累计安装 7
当前安装数 6
历史版本数 11
常见问题

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 f... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 896 次。

如何安装 Data Analyzer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install data-analyzer」即可一键安装,无需额外配置。

Data Analyzer 是免费的吗?

是的,Data Analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Data Analyzer 支持哪些平台?

Data Analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Data Analyzer?

由 ToBeWin(@tobewin)开发并维护,当前版本 v1.1.0。

💬 留言讨论