zhaojie

System Data Intelligence — File · Analysis · Visualization

Data Analysisv1.0.3
By zhaojieUpdated 2026-05-182 versions · latest released 2026-03-10system-data-intelligence@clawhub_zhaojie911272507/system-data-intelligence
Data CleaningData VisualizationData Insights#CSV#MySQL#数据处理#数据库#数据分析

According to AlphaMoat, as of 2026-09, System Data Intelligence — File · Analysis · Visualization has 4,569 downloads and 2 stars — ranked #2,094 of 5,078 AI skills overall, and #171 of 399 in Data Analysis.

Installs
1.1K
Downloads
4.6K
Stars
2
Overall Rank
#2,094
Top 42% overall · Top 43% in Data Analysis
PlatformInstallsDownloadsStarsComments
ClawHub ↗481.6K-1
SkillHub ↗1.1K4.6K2—

Platforms count differently and update at different times.

What this skill does

It handles Excel, Word, text, and CSV formats for reading, extraction, processing, modelling, and anomaly detection, and can also query a database. It degrades gracefully by environment, preferring the Windows component interface and falling back to pure Python readers when that is unavailable. Use only the files, tables and fields the user has authorized. Redact sensitive data before processing, and review outputs before sharing.

Profile published 2026-10-27

What you can do with it

  • Extract and clean data from a batch of spreadsheets, then summarise
  • Read document contents and shape them into an analysable structure

When to use it

  • Several file formats must be handled in one pass
  • A single flow needs both file reading and database queries

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Merge and clean these spreadsheets into one summary and flag the outliers
Read the table in this document first, then check the same metric against the database

Monthly Trend

Downloads4.6K
1.7K3.2K4.8K2026-03 · Downloads 1.9K2026-05 · Downloads 3.2K2026-06 · Downloads 3.4K2026-07 · Downloads 3.6K2026-08 · Downloads 3.8K2026-09 · Downloads 4.6K26-0326-09
Stars2
0122026-03 · Stars -2026-05 · Stars 12026-06 · Stars 22026-07 · Stars 22026-08 · Stars 22026-09 · Stars 226-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-094.6K—2
2026-083.8K+4.0%2
2026-073.6K+8.0%2
2026-063.4K+6.6%2
2026-053.2K—1
2026-031.9K—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

11 KB · ClawHub v1.0.3
---
name: system-data-intelligence
description: >
  专为文件操作、数据分析、可视化、数据库连接、API 接入和敏感数据处理设计的系统级 Agent Skill。

  【强制触发场景】:
  - 用户提及任何文件操作:Excel / WPS / Word / TXT / Markdown / RTZ / CSV / JSON
  - 「分析」「读取」「提取」「处理」「建模」「预测」「异常检测」
  - 「生成图表」「可视化」「做仪表盘」「出报告」
  - 「连数据库」「查 SQL」「查 MySQL / PostgreSQL」
Show all (375 lines)
  - 「调 API」「从接口拉数据」「爬接口」
  - 「脱敏」「敏感数据」「隐私处理」「数据安全」

  【核心能力】:文件操作(自动降级)× 深度分析 × 专业可视化 × 数据库 × API × 安全脱敏

  IMPORTANT: 只要涉及上述任一场景,必须使用此 skill,不得因"任务简单"而跳过。
---

# System Data Intelligence Skill

## 🔍 快速决策树

**收到任务,先走此树定路径,再执行对应节点的代码:**

```
用户任务
  ├─ 有文件需要读取?
  │    ├─ Windows  → [WIN-PATH]
  │    ├─ macOS    → [MAC-PATH]
  │    └─ Linux    → [LINUX-PATH]
  │
  ├─ 需要查数据库?  → [DB-PATH]
  ├─ 需要调 API?   → [API-PATH]
  ├─ 含敏感数据?   → [SECURITY-PATH]  ← 先执行,再做其他
  ├─ 需要分析数据? → [ANALYSIS-PATH]
  └─ 需要出图表?   → [VIZ-PATH]
```

**组合任务执行顺序(最常见):**

```
敏感检测 → 读文件/拉数据 → 分析 → 可视化 → 输出报告
```

---

## [WIN-PATH] Windows 文件读取

**自动降级链:** `win32com` → `openpyxl`(Excel) / `python-docx`(Word)

```python
# 统一入口,自动选策略
from scripts.doc_parser import detect_and_load
data = detect_and_load("report.xlsx")   # 自动 win32com → openpyxl 降级

# 或指定平台脚本
# python scripts/win_excel_reader.py report.xlsx [sheet_name]
# python scripts/wps_extractor.py data.et
```

**WPS 专属 COM 名称:**

| 应用 | COM 名称 |
|---|---|
| WPS 表格(.et) | `KET.Application` |
| WPS 文字(.wps) | `KWPS.Application` |

**注意:** COM 操作结束后必须调用 `Quit()`,已封装到 `safe_com_session` 上下文管理器中。

> 完整手册 → [references/windows-api.md](references/windows-api.md)

---

## [MAC-PATH] macOS 文件读取

**自动降级链:** `xlwings` → `openpyxl`(Excel) / `python-docx`(Word)

```python
# 统一入口,自动选策略
from scripts.doc_parser import detect_and_load
data = detect_and_load("report.xlsx")   # 自动 xlwings → openpyxl 降级

# 或指定平台脚本
# python scripts/mac_excel_reader.py report.xlsx [sheet_name]
```

**权限问题(首次运行必看):**

```
系统设置 → 隐私与安全性 → 辅助功能 → 开启"终端"或"Python"权限
系统设置 → 隐私与安全性 → 自动化 → 允许控制"Microsoft Excel"
```

> 完整手册 → [references/macos-api.md](references/macos-api.md)

---

## [LINUX-PATH] Linux 文件读取

**策略:** 无 COM/AppleScript,全部用纯 Python 库解析,老格式先用 LibreOffice 转换。

```python
# 统一入口
from scripts.doc_parser import detect_and_load
data = detect_and_load("report.xlsx")   # 直接 openpyxl

# 老格式先转换
# libreoffice --headless --convert-to xlsx input.xls --outdir /tmp/
# libreoffice --headless --convert-to docx input.doc --outdir /tmp/
```

**无头服务器可视化(必须设置):**

```python
import matplotlib
matplotlib.use('Agg')   # 放在所有 import matplotlib.pyplot 之前
```

**中文字体安装:**

```bash
sudo apt install fonts-noto-cjk && fc-cache -fv
```

> 完整手册 → [references/linux-api.md](references/linux-api.md)

---

## [DB-PATH] 数据库查询

```python
from scripts.db_connector import DBConnector

db = DBConnector("mysql+pymysql://user:pass@host:3306/mydb")

# 普通查询 → DataFrame
df = db.query("SELECT * FROM orders WHERE status = :s", params={"s": "paid"})

# 大表分块(避免 OOM)
for chunk in db.query_chunked("SELECT * FROM logs", chunk_size=10000):
    process(chunk)

db.close()
```

**连接 URL 速查:**

| 数据库 | URL 格式 |
|---|---|
| SQLite | `sqlite:///data.db` |
| MySQL | `mysql+pymysql://user:pass@host:3306/db` |
| PostgreSQL | `postgresql+psycopg2://user:pass@host:5432/db` |
| SQL Server | `mssql+pymssql://user:pass@host:1433/db` |

**CLI 用法:**

```bash
python scripts/db_connector.py "sqlite:///data.db" "SELECT * FROM users" -o result.csv
```

---

## [API-PATH] REST API 数据接入

```python
from scripts.api_loader import APILoader

api = APILoader(base_url="https://api.example.com", timeout=30, max_retries=3)
api.set_auth_token("your_token")   # 或 api.set_api_key("key")

# 单次请求
df = api.fetch_json_to_df("/users", data_key="results")

# 分页自动合并
df = api.fetch_paginated("/items", page_param="page", per_page=100, data_key="data")

# CSV 接口
df = api.fetch_csv_to_df("https://data.example.com/export.csv")

api.close()
```

**CLI 用法:**

```bash
python scripts/api_loader.py "https://api.example.com/data" \
  --data-key results --output data.csv
```

**重试策略:** 默认 3 次,指数退避(1s → 2s → 4s),网络超时、5xx 均触发重试。

---

## [SECURITY-PATH] 敏感数据处理

> **原则:检测到敏感数据,先脱敏再分析,任务结束后清理临时文件。**

```python
from scripts.security_utils import secure_context

with secure_context() as ctx:
    df = load_data(filepath)

    # Step 1: 扫描(返回 {列名: [命中规则]})
    findings = ctx.masker.detect_sensitive(df)

    # Step 2: 脱敏(仅处理文本列,不破坏结构)
    df_safe = ctx.masker.mask_dataframe(df)

    # Step 3: 安全临时目录(退出自动删除)
    tmp = ctx.cleanup.create_temp_dir()
    df_safe.to_csv(tmp / "safe_data.csv", index=False)

# with 块退出后:临时文件自动删除,内存自动 gc
```

**脱敏效果:**

| 规则 | 原始 | 脱敏后 |
|---|---|---|
| 手机号 | `13812345678` | `138****5678` |
| 身份证 | `110101199001011234` | `110101********1234` |
| 邮箱 | `[email protected]` | `t***@example.com` |
| 银行卡 | `6222021234567890` | `6222 **** **** 7890` |
| IP | `192.168.1.100` | `192.168.*.*` |

---

## [ANALYSIS-PATH] 数据深度分析

**分析层次:**

```
Level 1: 描述性 → 数据现状(均值 / 中位数 / 缺失率 / 分布)
Level 2: 诊断性 → 根因探查(相关性 / 异常检测 / 重复行)
Level 3: 预测性 → 趋势建模(滚动均值 / 环比同比 / 季节性)
Level 4: 规范性 → 决策支持(优化建议 / 洞察摘要)
```

**执行:**

```python
from scripts.deep_analyzer import DeepAnalyzer
import pandas as pd

df = pd.DataFrame(data['sheets']['Sheet1'])   # 来自 detect_and_load
report = DeepAnalyzer(df).run_full_analysis()

# report 结构:
# {
#   'overview':       { shape, columns, dtypes, memory_mb }
#   'quality':        { missing_rate, duplicate_rows, completeness }
#   'distributions':  { col: { mean, median, std, min, max, q25, q75, skewness } }
#   'correlations':   { full_matrix, strong_correlations }
#   'anomalies':      { col: { outlier_count, outlier_pct } }
#   'insights':       [ "...", "..." ]   ← 文字洞察列表
# }
```

**时间序列分析(可选):**

```python
from scripts.deep_analyzer import analyze_time_series

ts = analyze_time_series(df, date_col="date", value_col="revenue")
# 返回:period / trend_7d / trend_30d / mom_latest / yoy_latest / seasonality_strength
```

**CLI 用法:**

```bash
python scripts/deep_analyzer.py sales.xlsx date revenue
# 输出:outputs/analysis_result.json + outputs/summary.md
```

> 分析参考 → [references/viz-patterns.md](references/viz-patterns.md)

---

## [VIZ-PATH] 数据可视化

**图表选型:**

```
数据特征
  ├─ 时间序列     → 折线图 / 面积图        → create_dashboard()
  ├─ 类别对比     → 柱状图 / 雷达图        → create_radar()
  ├─ 层级占比     → 树状图 / 旭日图        → create_treemap()
  ├─ 流量转化     → 桑基图 / 漏斗图        → create_sankey() / create_funnel()
  ├─ 相关分布     → 散点图 / 热力图        → create_dashboard()
  ├─ 节点关系     → 网络图               → create_network_graph()
  └─ 地理分布     → 散点地图 / 填色地图   → create_geo_map() / create_choropleth()
```

**执行:**

```python
from scripts.viz_engine import (
    create_dashboard, create_network_graph, create_geo_map,
    create_choropleth, create_sankey, create_radar,
    create_treemap, create_funnel, export_viz,
)

# 综合仪表盘(接受 DeepAnalyzer 的 report)
fig = create_dashboard(report, title="销售数据仪表盘")
export_viz(fig, "outputs/report", formats=["html", "png"])

# 网络关系图
fig = create_network_graph(
    edges=[("总部", "上海"), ("总部", "北京"), ("上海", "客户A")],
    title="业务关系图",
)

# 地理散点图
fig = create_geo_map(df, lat_col="lat", lon_col="lon",
                     value_col="sales", label_col="city")
```

**CLI 用法:**

```bash
python scripts/viz_engine.py outputs/analysis_result.json outputs/
# 生成:outputs/report_YYYYMMDD_HHMMSS.html + .png
```

> 图表样式规范 → [references/viz-patterns.md](references/viz-patterns.md)

---

## ⚡ 统一文件入口

**不知道用哪个脚本?永远从这里开始:**

```python
from scripts.doc_parser import detect_and_load

data = detect_and_load("/path/to/any/file", chunk_size=10000, timeout=120)
# 自动做:OS 检测 → 策略选择 → 失败降级 → 大文件分块 → 返回标准化 dict

# data 结构:
# {
#   'type':      'spreadsheet' | 'document' | 'text' | 'json' | 'project'
#   'sheets':    { sheet_name: [[row], [row], ...] }   # 表格类
#   'content':   "..."                                  # 文本类
#   '_file':     "filename.xlsx"
#   '_os':       'Darwin' | 'Windows' | 'Linux'
#   '_strategy': 'openpyxl' | 'win32com' | 'xlwings'   # 实际使用策略
# }
```

**支持格式:** `.xlsx` `.xls` `.xlsm` `.et` `.docx` `.doc` `.wps` `.txt` `.md` `.rtz` `.csv` `.json`

---

## 📤 输出规范

**每次任务完成,必须输出以下四项:**

| 输出 | 路径 | 说明 |
|---|---|---|
| 交互报告 | `outputs/report_YYYYMMDD_HHMMSS.html` | Plotly,可在浏览器操作 |
| 静态图 | `outputs/report_YYYYMMDD_HHMMSS.png` | 高清,适合嵌入文档 |
| 结构化数据 | `outputs/analysis_result.json` | 供后续脚本使用 |
| 洞察摘要 | `outputs/summary.md` | ≤5 行关键结论 |

---

## 💡 执行心法

> **直接行动,不问格式。** 用户说"分析一下",就给他完整的数据故事:解析→分析→可视化→报告,一气呵成。
>
> **遇到错误不停止。** 首选策略失败 → 自动降级 → 记录日志 → 继续任务。告知用户"使用了备选方案"即可。
>
> **安全优先。** 发现手机号、身份证等敏感字段 → 先脱敏 → 再分析 → 临时文件用 `secure_context` 自动清理。

Popular in Data Analysis

AdMapixData Analysis

The data layer for AdMapix: turn ad and app queries into API calls that return raw JSON only.

↓ 365.6K★ 304fly0pants
Tavily SearchData Analysis

Searches the public web through Tavily and returns structured results with links and snippets.

↓ 121.9K★ 286Xiaoran Li
Data AnalysisData Analysis

A data-analysis skill that turns databases, spreadsheets, and raw exports into decision-ready conclusions.

↓ 101.2K★ 244Iván
Stock AnalysisData Analysis

A skill that analyzes stocks and cryptocurrencies on Yahoo Finance data and tracks a portfolio.

↓ 75.3K★ 299udiedrichsen
Stock WatcherData Analysis

Manages a local stock watchlist and summarizes recent quotes for its codes from the Tonghuashun stock pages.

↓ 64.8K★ 122Robin797860
全国招标中标查询及分析【知了标讯】Data Analysis

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、商机预测、推荐潜在投标供应商、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手等关键词,都应使用本SKILL。

↓ 56.5K★ 13user_98035bfb
BlogwatcherData Analysis

Track blog and RSS/Atom feed updates from the command line.

↓ 54.0K★ 75Peter Steinberger
Model UsageData Analysis

Summarises per-model usage cost for Codex or Claude.

↓ 49.5K★ 114Peter Steinberger

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.