Xpersona
爱

爱图表 桑基图

CLAWHUB · Unverified

AI桑基图(流向图)生成。用户上传数据或粘贴表格,自动生成流向可视化图表,展示数据在环节间的流动关系。触发词:桑基图、流向图、sankey、流量图、数据流向、关系图、转化路径、用户流转、资金流向、create sankey、flow diagram、sankey chart。 Skill: 爱图表 桑基图 Owner: aitubiao Summary: AI桑基图(流向图)生成。用户上传数据或粘贴表格,自动生成流向可视化图表,展示数据在环节间的流动关系。触发词:桑基图、流向图、sankey、流量图、数据流向、关系图、转化路径、用户流转、资金流向、create sankey、flow diagram、sankey chart。 Tags: latest:1.2.5 Version history: v1.2.5 | 2026-06-22T09:13:17.500Z | auto Version 1.2.5 Changelog for "爱图表-桑基图" (aitubiao-sankey): - Updated documentation in SKILL.md to clarify mandatory workflow, API-only restrictions, and strict error

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17bfd6atd8sje15j8ehx6j4bn83zz7g:aitubiao-sankey
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-aitubiao-aitubiao-sankey/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

49,775 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: 爱图表-桑基图
description: AI桑基图(流向图)生成。用户上传数据或粘贴表格,自动生成流向可视化图表,展示数据在环节间的流动关系。触发词:桑基图、流向图、sankey、流量图、数据流向、关系图、转化路径、用户流转、资金流向、create sankey、flow diagram、sankey chart。
license: MIT
compatibility: Requires network access to api.aitubiao.com, Bash shell, curl, and jq
metadata:
  author: aitubiao
  version: "1.2.3"
allowed-tools: Bash Read
---

# AI 桑基图生成

根据用户提供的数据,自动整理为桑基图(Sankey Diagram)流向格式并创建可视化项目。

## 强制规则

**以下规则必须严格执行,不得跳过、变通或使用替代方案:**

1. **认证优先**:在执行任何操作之前,必须先检查凭证状态。认证未通过时,禁止执行任何后续步骤。
2. **按顺序执行**:工作流程的 5 个步骤必须按顺序执行,禁止跳步。
3. **确认后才能创建**:必须成功查询配额(确认项目数未满)、并获得用户确认后,才能调用创建接口。
4. **仅通过 API 创建桑基图**:禁止使用本地工具(D3.js、ECharts、matplotlib、Plotly 等)生成图表。无论 API 因何种原因失败,都**绝对禁止使用本地工具**,没有任何例外。API 失败时正确做法是停止并告知用户,不是寻找替代方案。
5. **401/403 立即停止**:任何步骤中收到 HTTP 401/403(CLI exit 1),立即停止并引导用户前往 [API Key 管理页面](https://app.aitubiao.com/setting/api-keys?utm_source=skill_skill-clawhub&channel=skill-clawhub) 检查或重新创建 API Key。401/403 不是超时,禁止重试。
6. **超时/500 不自动重试创建接口**:创建接口不可重试(可能重复创建项目)。告知用户失败原因,由用户决定是否重新发起。

**⚠️ 以下想法是错误的,如果你发现自己在这样想,请立即停止:**
- ❌ "API 不可用,我可以用本地工具生成桑基图作为替代" → 违反规则 4
- ❌ "至少让用户看到一些可视化结果" → 本技能唯一输出方式是 aitubiao API
- ❌ "401 可能是暂时性的,重试几次" → 401 是认证失败,重试无意义,按规则 5 处理

## 认证

在调用任何 API 之前,先检查凭证状态。

### 检查凭证

```bash
bash scripts/aitubiao-cli.sh check-auth
```

- **Exit 0** → 认证通过
- **Exit 1** → 凭证问题,按 stderr 提示处理:
  - 文件不存在/API_KEY 为空 → 执行下方"配置凭证"流程
  - API_KEY 格式无效 → 告知用户"当前 API Key 已失效,请前往 [API Key 管理页面](https://app.aitubiao.com/setting/api-keys?utm_source=skill_skill-clawhub&channel=skill-clawhub) 重新创建一个 API Key"
  - BASE_URL 与当前技能包环境不一致 → 说明凭证中残留了旧环境地址;向用户索要当前仍有效的 API Key,并执行下方"配置凭证"流程重写凭证(通常不需要重新创建 API Key)

### 配置凭证

1. 向用户索要 API Key(格式:`sk_v1_...`)。如果没有,引导用户前往 [API Key 管理页面](https://app.aitubiao.com/setting/api-keys?utm_source=skill_skill-clawhub&channel=skill-clawhub) 创建一个新的 API Key,然后将创建好的 Key 粘贴回来。
2. 保存凭证:
```bash
bash scripts/aitubiao-cli.sh auth <用户提供的key>
```
3. 验证:再次运行 `bash scripts/aitubiao-cli.sh check-auth` 确认配置成功。

凭证保存在 `~/.aitubiao/credentials`,跨会话持久生效。

## Windows 编码注意事项(仅 Windows 用户需要关注)

在 Windows 上,**禁止用 PowerShell / Python / heredoc / echo / Set-Content / shell 重定向来生成含中文等非 ASCII 字符的 JSON 请求体**。这些方式容易经过 Windows 系统代码页(常为 GBK/CP936)或 MSYS argv 转换,导致传到后端的中文乱码。

正确做法:先用 Write 工具把完整 UTF-8 JSON 写到临时文件,然后用 `--body-file` 让 CLI 从文件读取,绕过 argv/控制台编码转换。

Windows 调用:

```bat
scripts\aitubiao-cli.cmd --body-file C:\Users\%USERNAME%\AppData\Local\Temp\aitubiao-payload.json create-chart
```

Git Bash 调用:

```bash
bash scripts/aitubiao-cli.sh --body-file /tmp/aitubiao-payload.json create-chart
```

`--body-file` 可用于所有读取 stdin JSON 的命令:`create-chart` / `create-ppt` / `create-sankey` / `create-3d` / `download-project`。CLI 会自动剥离 UTF-8 BOM 和 CRLF。

CSV/TXT 文件也只用 Read 工具读取。不要写 Python/PowerShell 脚本做本地解析、转码或聚合;如果 Read 出来的文本已经明显乱码,要求用户提供 UTF-8 文件或直接粘贴数据。

macOS / Linux 上仍可使用 heredoc,但包含中文的请求体也优先使用 `--body-file`。

## 桑基图数据要求

桑基图用于展示数据的**流向关系**,要求输入数据至少包含:
- **两个分类列**(文本类型):作为"来源"和"目标"节点
- **一个数值列**:表示流向的值/权重

示例数据结构:
```
| 来源部门 | 目标项目 | 预算金额 |
|---------|--

_meta.json

{
  "ownerId": "kn7d874ecrqhxc83h3aejwz0t983nh12",
  "slug": "aitubiao-sankey",
  "version": "1.2.5",
  "publishedAt": 1782119597500
}

skill-card.md

## Description:

Generates AI-assisted Sankey flow diagrams from pasted or uploaded tabular data through the Aitubiao API.

This skill is ready for commercial/non-commercial use.

## Publisher:

[aitubiao](https://clawhub.ai/user/aitubiao)

### License/Terms of Use:

MIT-0

## Use Case:

External users and developers use this skill to turn tabular flow data into Aitubiao Sankey chart projects, then view or export supported formats after authentication, quota checks, and user confirmation.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Chart data is sent to Aitubiao's API and an API key is stored locally.

Mitigation: Install only if sending chart data to Aitubiao is acceptable, use an API key copied from the official Aitubiao console, and remove ~/.aitubiao/credentials when it is no longer needed.

Risk: The security evidence reports that credential handling can execute injected shell code.

Mitigation: Avoid credential content from untrusted messages, recreate credentials from the official console if there is any doubt, and review the local credentials file before use.

Risk: The bundled CLI exposes broader actions than the Sankey-specific workflow.

Mitigation: Use only the documented authentication, quota, create-sankey, and project-download commands needed for the requested Sankey workflow.

Risk: The security guidance calls out export/download path and attachment URL caution.

Mitigation: Use explicit writable output paths, avoid source directories, and report the saved path returned by the CLI after file integrity checks pass.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/aitubiao/skills/aitubiao-sankey)
- [Aitubiao API key management](https://app.aitubiao.com/setting/api-keys?utm_source=skill_skill-clawhub&channel=skill-clawhub)
- [Aitubiao workspace](https://app.aitubiao.com/workspace)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, files, guidance]

**Output Format:** [Markdown with inline shell commands, JSON API results, project links, and optional downloaded export files]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires network access to api.aitubiao.com, local Aitubiao API credentials, curl, jq, and explicit user confirmation before creating projects.]

## Skill Version(s):

1.2.5 (source: server release metadata; artifact metadata version 1.2.3)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to 爱图表 桑基图 and adjacent AI workflows.