一键导入
data-type-converter
Convert between data formats (JSON, CSV, XML, YAML, TOML). Handles nested structures, arrays, and preserves data types where possible.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert between data formats (JSON, CSV, XML, YAML, TOML). Handles nested structures, arrays, and preserves data types where possible.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide for adding new AI provider documentation. Use when adding documentation for a new AI provider (like OpenAI, Anthropic, etc.), including usage docs, environment variables, Docker config, and image resources. Triggers on provider documentation tasks.
Analyzes, generates, and enhances CLAUDE.md files for any project type using best practices, modular architecture support, and tech stack customization. Use when setting up new projects, improving existing CLAUDE.md files, or establishing AI-assisted development standards.
Create, review, and iterate on Claude Code skills using Anthropic's official best practices and latest API documentation. Use when creating skills, reviewing existing skills, writing skill descriptions, designing skill architecture, or when user says "create a skill", "review my skill", "skill best practices", "skill description help". Do NOT use for creating plugins, commands, agents, or hooks - use plugin-dev skills for those.
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
Install a pre-commit hook that scans .specstory/history for secrets before commits. Run when user says "set up secret scanning", "install specstory guard", "protect my history", or "check for secrets".
Analyze your SpecStory AI coding sessions in .specstory/history for yak shaving - when your initial goal got derailed into rabbit holes. Run when user says "analyze my yak shaving", "check for rabbit holes", "how distracted was I", or "yak shave score".
| name | data-type-converter |
| description | Convert between data formats (JSON, CSV, XML, YAML, TOML). Handles nested structures, arrays, and preserves data types where possible. |
Convert data between JSON, CSV, XML, YAML, and TOML formats. Handles nested structures, arrays, and complex data with intelligent flattening options.
from scripts.data_converter import DataTypeConverter
# JSON to CSV
converter = DataTypeConverter()
converter.convert("data.json", "data.csv")
# YAML to JSON
converter.convert("config.yaml", "config.json")
# With options
converter.convert("data.json", "data.csv", flatten=True)
converter = DataTypeConverter()
# Auto-detect format from extension
converter.convert("input.json", "output.csv")
converter.convert("input.xml", "output.json")
converter.convert("input.yaml", "output.toml")
# Flatten nested structures for CSV
converter.convert("nested.json", "flat.csv", flatten=True)
# Pretty print output
converter.convert("data.json", "pretty.json", indent=4)
# Specify root element for XML
converter.convert("data.json", "data.xml", root="records")
# Load and convert in memory
data = converter.load("data.json")
converter.save(data, "data.yaml")
# String conversion
json_str = '{"name": "John", "age": 30}'
yaml_str = converter.convert_string(json_str, "json", "yaml")
# Convert all JSON files to CSV
converter.batch_convert(
input_dir="./json_files",
output_dir="./csv_files",
output_format="csv"
)
# Basic conversion
python data_converter.py --input data.json --output data.csv
# With flattening
python data_converter.py --input nested.json --output flat.csv --flatten
# Batch convert
python data_converter.py --input-dir ./json --output-dir ./csv --format csv
# Pretty print
python data_converter.py --input data.json --output pretty.json --indent 4
| Argument | Description | Default |
|---|---|---|
--input | Input file | Required |
--output | Output file | Required |
--input-dir | Input directory for batch | - |
--output-dir | Output directory | - |
--format | Output format | From extension |
--flatten | Flatten nested data | False |
--indent | Indentation spaces | 2 |
--root | XML root element | root |
| From/To | JSON | CSV | XML | YAML | TOML |
|---|---|---|---|---|---|
| JSON | - | Yes | Yes | Yes | Yes |
| CSV | Yes | - | Yes | Yes | Yes |
| XML | Yes | Yes | - | Yes | Yes |
| YAML | Yes | Yes | Yes | - | Yes |
| TOML | Yes | Yes | Yes | Yes | - |
converter = DataTypeConverter()
# Input: data.json
# [{"name": "John", "age": 30}, {"name": "Jane", "age": 25}]
converter.convert("data.json", "data.csv")
# Output: data.csv
# name,age
# John,30
# Jane,25
# Input: nested.json
# [{"user": {"name": "John", "email": "j@test.com"}, "orders": 5}]
converter.convert("nested.json", "flat.csv", flatten=True)
# Output: flat.csv
# user.name,user.email,orders
# John,j@test.com,5
# Input: config.yaml
# database:
# host: localhost
# port: 5432
# debug: true
converter.convert("config.yaml", "config.json")
# Output: config.json
# {"database": {"host": "localhost", "port": 5432}, "debug": true}
# Input: data.xml
# <users>
# <user><name>John</name><age>30</age></user>
# </users>
converter.convert("data.xml", "data.json")
# Output: data.json
# {"users": {"user": {"name": "John", "age": "30"}}}
pyyaml>=6.0
toml>=0.10.0
xmltodict>=0.13.0
pandas>=2.0.0