Skip to content
Back to skills

170 Data2visualization

ASecurity

将结构化或半结构化数据转化为高质量 Markdown 可视化报告,适用于 Typora / Markor / PDF 导出

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
datapythonbash

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add winlem2024/workbuddy-skills --skill 170-data2visualization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 170 Data2visualization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 170 Data2visualization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/winlem2024-170-data2visualization/badge)](https://www.skillsdirectory.com/skills/winlem2024-170-data2visualization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-visualization-skill
description: 将结构化或半结构化数据转化为高质量 Markdown 可视化报告,适用于 Typora / Markor / PDF 导出
version: 1.0
author: 王维
---

# 📊 Data Visualization Skill

## 🧩 功能说明
该 Skill 用于:
- 数据整理
- 数据分析
- 数据可视化(Markdown + HTML + Mermaid)
- 输出高质量报告(适配 Typora / Markor / PDF)

---

## 🚀 使用方式

输入:
- 原始数据(表格 / 文本 / JSON)
- 分析目标(可选)
- 和AI的聊天内容

输出:
- 标准化 Markdown 报告
- 含图表(Mermaid / 表格 / 卡片)

---

## 📌 输出特性

- 从 CSV/JSON 文件加载数据,或使用内置示例数据集
- 使用 matplotlib 生成专业图表(柱状图、折线图、散点图)
- 生成带样式的报告,包括:
  - 蓝色主题配色(`#e3f2fd`、`#bbdefb`、`#2196f3`)
  - 弹性卡片布局展示关键指标
  - 带条纹行的样式化 HTML 表格
  - 用于数据处理流程的 Mermaid 流程图
  - 渐变总结框
- 输出内嵌 base64 图片的 Markdown(无需外部文件)
- 从 CSV/JSON 文件加载数据,或使用内置示例数据集
- 使用 matplotlib 生成专业图表(柱状图、折线图、散点图)
- 生成带样式的报告,包括:
  - 蓝色主题配色(`#e3f2fd`、`#bbdefb`、`#2196f3`)
  - 弹性卡片布局展示关键指标
  - 带条纹行的样式化 HTML 表格
  - 用于数据处理流程的 Mermaid 流程图
  - 渐变总结框
- 输出内嵌 base64 图片的 Markdown(无需外部文件)
- 通过 `config.yaml` 完全自定义
---

## 🎯 适用场景

- 市场调研
- 销售数据分析
- 食品行业分析(重点适配)
- 竞品对比
- 趋势预测
## 使用方法
1. 将数据文件(CSV/JSON)放入目录,或在 `config.yaml` 中修改数据源路径。
2. 在 `config.yaml` 中调整可视化参数(图表类型、列名、标题等)。
3. 运行技能:
   ```bash
   python run.py
   4.生成的报告将保存为 output.md(可配置)。在 Typora 或 Markor 中打开即可查看带样式的可视化结果。

## 输出格式规则(严格遵循)

本技能生成的报告完全遵循以下格式要求:

- 全文包裹在 `markdown ...`(四个反引号)内,防止外层提前闭合。
- 所有 CSS 均写在 `style` 属性中。
- 卡片布局:`display: flex`、`gap`、`border-radius`、`box-shadow`。
- 表格表头背景色 `#b3e5fc`,行间使用 `border-bottom` 分隔。
- 渐变总结框:`linear-gradient(145deg, #bbdefb, #b2dfdb)`。
- 标题和署名居中,并包含日期。
- 适当位置可包含 Mermaid 图表和任务列表。

## 依赖环境

- Python 3.8+
- pandas, matplotlib, pyyaml
- (可选)seaborn 用于高级图表

安装命令:

bash

```
pip install pandas matplotlib pyyaml
```

## 配置说明 (`config.yaml`)

| 参数              | 类型    | 描述                                    |
| :---------------- | :------ | :-------------------------------------- |
| `data_source`     | string  | CSV/JSON 文件路径(留空则使用示例数据) |
| `chart_type`      | string  | `bar`、`line` 或 `scatter`              |
| `x_column`        | string  | X 轴列名                                |
| `y_column`        | string  | Y 轴列名                                |
| `title`           | string  | 报告标题                                |
| `output_file`     | string  | 输出 Markdown 文件路径                  |
| `include_mermaid` | boolean | 是否包含处理流程图                      |

## 文件结构

- `skill.md` – 本说明文档
- `config.yaml` – 用户设置
- `run.py` – 主执行脚本
- `prompt.md` – 含内联 CSS 的 HTML/Markdown 模板
- `schema.json` – 配置文件 JSON 校验 schema

## 示例

yaml

```
# config.yaml
data_source: "sales.csv"
chart_type: "bar"
x_column: "Month"
y_column: "Revenue"
title: "月度销售报告"
output_file: "sales_report.md"
include_mermaid: true
```



运行 `python run.py` 即可生成报告。

Files in this skill

  • SKILL.md4.1 KB
  • _skillhub_meta.json582 B
  • config.yaml891 B
  • prompt.md942 B
  • run.py4.5 KB
  • schema.json572 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.