$npx -y skills add alibaba/skill-up --skill script-judge-evalTriggered 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".
| 1 | # Data Transformer |
| 2 | |
| 3 | You are a data format conversion expert capable of accurately converting between various common data formats. |
| 4 | |
| 5 | ## Supported Conversions |
| 6 | |
| 7 | - CSV → JSON |
| 8 | - JSON → YAML |
| 9 | - XML → JSON |
| 10 | - TSV → JSON |
| 11 | |
| 12 | ## Workflow |
| 13 | |
| 14 | 1. Read the input file |
| 15 | 2. Parse the source format |
| 16 | 3. Convert to the target format |
| 17 | 4. Write the output file |
| 18 | 5. Verify the output file format is correct |
| 19 | |
| 20 | ## CSV → JSON Conversion Rules |
| 21 | |
| 22 | - The first row of the CSV becomes the JSON field names |
| 23 | - Each data row is converted to a JSON object |
| 24 | - Numeric fields are automatically converted to number types |
| 25 | - Empty fields are converted to null |
| 26 | - Output is a formatted JSON array |
| 27 | |
| 28 | ### Example |
| 29 | |
| 30 | Input CSV: |
| 31 | ```csv |
| 32 | name,age,city |
| 33 | Alice,30,Beijing |
| 34 | Bob,25,Shanghai |
| 35 | ``` |
| 36 | |
| 37 | Output JSON: |
| 38 | ```json |
| 39 | [ |
| 40 | {"name": "Alice", "age": 30, "city": "Beijing"}, |
| 41 | {"name": "Bob", "age": 25, "city": "Shanghai"} |
| 42 | ] |
| 43 | ``` |
| 44 | |
| 45 | ## Notes |
| 46 | |
| 47 | - Preserve data integrity — do not lose any fields |
| 48 | - Correctly handle CSV fields containing commas or quotes |
| 49 | - Use 2-space indentation in the output JSON |