home / skills / ntaksh42 / agents / data-converter
This skill converts data between JSON, YAML, XML, CSV, TOML and more, with validation, formatting, and simple transformations to ease data migration.
npx playbooks add skill ntaksh42/agents --skill data-converterReview the files below or copy the command above to add this skill to your agents.
---
name: data-converter
description: Convert data between formats (JSON, XML, CSV, YAML, TOML). Use when transforming data structures or migrating between data formats.
---
# Data Converter Skill
データ形式を変換するスキルです。
## 概要
JSON、YAML、XML、CSV、TOML等の各種データ形式を相互変換します。
## 主な機能
- **多様な形式**: JSON ↔ YAML ↔ XML ↔ CSV ↔ TOML ↔ INI
- **データ検証**: スキーマバリデーション
- **整形**: インデント、ソート、圧縮
- **フィルタリング**: 特定フィールドの抽出
- **変換**: キャメルケース ↔ スネークケース
- **マージ**: 複数ファイルの統合
## 使用方法
```
以下のJSONをYAMLに変換:
{
"name": "John",
"age": 30
}
```
## 変換例
### JSON → YAML
```json
{
"database": {
"host": "localhost",
"port": 5432,
"credentials": {
"username": "admin",
"password": "secret"
}
}
}
```
↓
```yaml
database:
host: localhost
port: 5432
credentials:
username: admin
password: secret
```
### CSV → JSON
```csv
name,age,city
John,30,Tokyo
Jane,25,Osaka
```
↓
```json
[
{"name": "John", "age": 30, "city": "Tokyo"},
{"name": "Jane", "age": 25, "city": "Osaka"}
]
```
### XML → JSON
```xml
<user>
<name>John</name>
<age>30</age>
<email>[email protected]</email>
</user>
```
↓
```json
{
"user": {
"name": "John",
"age": 30,
"email": "[email protected]"
}
}
```
## バージョン情報
- スキルバージョン: 1.0.0
- 最終更新: 2025-01-22
This skill converts data between common formats: JSON, YAML, XML, CSV, TOML (and INI). It helps preserve structure, validate schemas, and apply formatting rules so data can move reliably between systems. Use it for migrations, integrations, or quick format changes.
The skill parses the input format into an internal data model, applies optional transformations (field filtering, case conversion, merging), validates against a provided schema, and serializes the result to the target format. It supports pretty-printing, compact output, key sorting, and basic error reporting for malformed inputs. Batch conversions and merging of multiple files are supported.
Can it validate data against a schema?
Yes. Provide a JSON Schema (or compatible schema) to validate input before conversion; errors are reported with locations.
How does CSV type inference work?
CSV conversion can infer types (numbers, booleans) or accept explicit column type hints. You can also force all values to strings.
Does it preserve ordering of keys?
You can choose to preserve original key order or sort keys alphabetically during serialization.