AGENT SKILL
enact-formatter
Formats and prettifies JSON with configurable indentation
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
01 前言 Front Matter
- from
- node:20-alpine
- name
- enact-formatter
- enact
- 2.0.0
- command
- node /workspace/format.js ${json} ${indent}
- version
- 1.0.0
- description
- Formats and prettifies JSON with configurable indentation
- inputSchema
- { "type": "object", "required": [ "json" ], "properties": { "json": { "type": "string", "description": "JSON string to format" }, "indent": { "type": "integer", "default": 2, "description": "Number of spaces for indentation" } } }
02 资源文件 2
- 脚本format.js434 B
- 参考文档skill-report.json6.7 KB
03 SKILL.md 正文
JSON Formatter
A simple tool that formats and prettifies JSON strings.
Usage
enact run enact/json-formatter --args '{"json": "{\"name\":\"test\",\"value\":123}", "indent": 2}'
Features
- Validates JSON input
- Configurable indentation (default: 2 spaces)
- Returns structured output with validation status
- Handles errors gracefully
Example Output
{
"formatted": "{\n \"name\": \"test\",\n \"value\": 123\n}",
"valid": true
}