← 返回 Skills 市场
293
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install harrylabsj-json-formatter
功能描述
Format and validate JSON files with options for indentation, key sorting, input/output from files or stdin, and detailed error reporting.
使用说明 (SKILL.md)
json-formatter-pro
Format and validate JSON files with pretty-printing and validation modes.
Description
A utility skill for formatting JSON files with proper indentation and validating JSON syntax. Supports reading from files or stdin, outputting to files or stdout.
Usage
# Format a JSON file (pretty-print to stdout)
python ~/.openclaw/skills/json-formatter/json_formatter.py format input.json
# Format and save to a new file
python ~/.openclaw/skills/json-formatter/json_formatter.py format input.json -o output.json
# Validate JSON syntax without formatting
python ~/.openclaw/skills/json-formatter/json_formatter.py validate input.json
# Read from stdin, format and output to stdout
cat input.json | python ~/.openclaw/skills/json-formatter/json_formatter.py format -
# Validate JSON from stdin
cat input.json | python ~/.openclaw/skills/json-formatter/json_formatter.py validate -
Options
format: Pretty-print JSON with proper indentationvalidate: Check if JSON is valid without formatting output-o, --output: Specify output file (default: stdout)-i, --indent: Number of spaces for indentation (default: 2)--sort-keys: Sort JSON keys alphabetically
Examples
# Format with 4-space indentation
python ~/.openclaw/skills/json-formatter/json_formatter.py format data.json -i 4
# Format and sort keys
python ~/.openclaw/skills/json-formatter/json_formatter.py format data.json --sort-keys
# Validate a JSON file
python ~/.openclaw/skills/json-formatter/json_formatter.py validate config.json
# Output: Valid JSON or error message with line number
Exit Codes
0: Success1: Invalid JSON syntax2: File not found or permission error3: Other error
安全使用建议
The skill is internally consistent and low-risk: it runs locally, uses only Python stdlib json, and does not call the network or request secrets. Still exercise normal caution: the source and homepage are unknown — consider reviewing the included json_formatter.py yourself (it is short and readable) before installing, avoid running it on sensitive system files, and be careful with output paths (it will overwrite files you point it at). If you want extra safety, run it in a restricted/sandboxed environment or with non-privileged user permissions.
功能分析
Type: OpenClaw Skill
Name: harrylabsj-json-formatter
Version: 1.0.3
The skill is a standard JSON formatting and validation utility. The Python script (json_formatter.py) uses built-in libraries (json, argparse, pathlib) to perform its stated tasks without any network access, shell execution, or suspicious data handling. The documentation (SKILL.md and README.md) contains clear usage instructions and lacks any prompt-injection attempts or malicious commands.
能力评估
Purpose & Capability
Name/description match the included code and instructions. The script implements formatting and validation, and the SKILL.md usage examples align with the code's CLI.
Instruction Scope
SKILL.md instructs running the included Python script against user-specified files or stdin; it does not ask the agent to read unrelated files, environment variables, or transmit data externally. The script only reads the provided input path or stdin and writes to the specified output or stdout.
Install Mechanism
No install spec — instruction-only with an included Python script. Nothing is downloaded or extracted from external URLs and no packages are installed.
Credentials
No environment variables, credentials, or config paths are requested. The script uses only standard library json and filesystem access for user-specified paths.
Persistence & Privilege
always is false and the skill does not request elevated or persistent privileges, nor does it modify other skills or global agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install harrylabsj-json-formatter - 安装完成后,直接呼叫该 Skill 的名称或使用
/harrylabsj-json-formatter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
Fix wrong package upload caused by ambiguous publish path; republish correct JSON formatter content.
v1.0.2
Republish clean package for json-formatter-pro with correct files only
v1.0.1
Rename skill to json-formatter-pro
v1.0.0
Initial release: Format and validate JSON files
元数据
常见问题
json-formatter-pro 是什么?
Format and validate JSON files with options for indentation, key sorting, input/output from files or stdin, and detailed error reporting. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。
如何安装 json-formatter-pro?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install harrylabsj-json-formatter」即可一键安装,无需额外配置。
json-formatter-pro 是免费的吗?
是的,json-formatter-pro 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
json-formatter-pro 支持哪些平台?
json-formatter-pro 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 json-formatter-pro?
由 haidong(@harrylabsj)开发并维护,当前版本 v1.0.3。
推荐 Skills