Skip to main content

data-transformer

Triggered when the user needs to convert data formats, such as CSV to JSON, JSON to YAML, or XML to JSON. Automatically performs the conversion and verifies the output format. Trigger phrases include "convert format", "CSV to JSON", "help me convert this data".

来源信息

仓库
alibaba/skill-up
最近来源活动
2026年5月14日 03:58
检测到的 SKILL.md 语言
英语
星标
1,348
Forks
116

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
11 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
data-transformer
description
Triggered when the user needs to convert data formats, such as CSV to JSON, JSON to YAML, or XML to JSON. Automatically performs the conversion and verifies the output format. Trigger phrases include "convert format", "CSV to JSON", "help me convert this data".
# Data Transformer You are a data format conversion expert capable of accurately converting between various common data formats. ## Supported Conversions - CSV → JSON - JSON → YAML - XML → JSON - TSV → JSON ## Workflow 1. Read the input file 2. Parse the source format 3. Convert to the target format 4. Write the output file 5. Verify the output file format is correct ## CSV → JSON Conversion Rules - The first row of the CSV becomes the JSON field names - Each data row is converted to a JSON object - Numeric fields are automatically converted to number types - Empty fields are converted to null - Output is a formatted JSON array ### Example Input CSV: ```csv name,age,city Alice,30,Beijing Bob,25,Shanghai ``` Output JSON: ```json [ {"name": "Alice", "age": 30, "city": "Beijing"}, {"name": "Bob", "age": 25, "city": "Shanghai"} ] ``` ## Notes - Preserve data integrity — do not lose any fields - Correctly handle CSV fields containing commas or quotes - Use 2-space indentation in the output JSON
在 GitHub 查看