AGENT SKILL
data-transformer
Transform data between CSV and JSON formats with filtering and column selection
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-18
- Stars
- ★ 19
- Forks
- 3
01 前言 Front Matter
- name
- data-transformer
- description
- Transform data between CSV and JSON formats with filtering and column selection
02 资源文件 7
- 参考文档package.json500 B
- 参考文档skill.package.yml244 B
- 脚本src/csv-parser.ts838 B
- 脚本src/index.ts3.5 KB
- 脚本src/json-handler.ts717 B
- 脚本src/types.ts415 B
- 参考文档tsconfig.json445 B
03 SKILL.md 正文
Data Transformer
A TypeScript-based tool that transforms data between CSV and JSON formats with advanced filtering and column selection capabilities.
Features
- Format Conversion: Convert between CSV and JSON formats
- Filtering: Filter rows based on column values
- Column Selection: Select specific columns to include in output
- Type Safety: Built with TypeScript for robust data handling
- Error Handling: Comprehensive error reporting
Usage Examples
CSV to JSON
enact run enact/data/transformer -a '{
"input": "name,age,city\nAlice,30,NYC\nBob,25,LA",
"input_format": "csv",
"output_format": "json"
}'
JSON to CSV
enact run enact/data/transformer -a '{
"input": "[{\"name\":\"Alice\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]",
"input_format": "json",
"output_format": "csv"
}'
Filter Data
enact run enact/data/transformer -a '{
"input": "[{\"name\":\"Alice\",\"age\":30,\"city\":\"NYC\"},{\"name\":\"Bob\",\"age\":25,\"city\":\"LA\"}]",
"input_format": "json",
"output_format": "json",
"filter_column": "city",
"filter_value": "NYC"
}'
Select Specific Columns
enact run enact/data/transformer -a '{
"input": "[{\"name\":\"Alice\",\"age\":30,\"city\":\"NYC\"}]",
"input_format": "json",
"output_format": "json",
"select_columns": "name,age"
}'
Output Format
Success response:
{
"status": "success",
"data": "<transformed data>",
"rowCount": 2,
"columnCount": 3,
"columns": ["name", "age", "city"]
}
Error response:
{
"status": "error",
"error": "Error message describing what went wrong"
}
04 同仓库更多 Skills
whatweb
Web scanner that identifies websites, CMS, frameworks, web servers, and embedded devices
★ 19
playwright
Browser automation tool using Playwright - captures screenshots and extracts content from web pages
★ 19
hello-rust
A simple Rust greeting tool
★ 19
hello-ruby
A simple Ruby greeting tool
★ 19
hello-js
A simple JavaScript greeting tool
★ 19
hello-go
A simple Go greeting tool
★ 19