← 返回 Skills 市场
harrylabsj

json-formatter-pro

作者 haidong · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
203
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install json-formatter-pro
功能描述
Format and validate JSON files with options for pretty-printing, indentation, key sorting, and output to files or stdout.
使用说明 (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-pro/json_formatter.py format input.json

# Format and save to a new file
python ~/.openclaw/skills/json-formatter-pro/json_formatter.py format input.json -o output.json

# Validate JSON syntax without formatting
python ~/.openclaw/skills/json-formatter-pro/json_formatter.py validate input.json

# Read from stdin, format and output to stdout
cat input.json | python ~/.openclaw/skills/json-formatter-pro/json_formatter.py format -

# Validate JSON from stdin
cat input.json | python ~/.openclaw/skills/json-formatter-pro/json_formatter.py validate -

Options

  • format: Pretty-print JSON with proper indentation
  • validate: 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-pro/json_formatter.py format data.json -i 4

# Format and sort keys
python ~/.openclaw/skills/json-formatter-pro/json_formatter.py format data.json --sort-keys

# Validate a JSON file
python ~/.openclaw/skills/json-formatter-pro/json_formatter.py validate config.json
# Output: Valid JSON or error message with line number

Exit Codes

  • 0: Success
  • 1: Invalid JSON syntax
  • 2: File not found or permission error
  • 3: Other error
安全使用建议
This skill appears to be a simple, coherent JSON formatter/validator. Before installing or running it: (1) review the included json_formatter.py (which is short and readable) if you don't trust the source, (2) be aware it reads files or stdin and will write to any output path you provide (so avoid passing sensitive files or output paths you don't want overwritten), (3) ensure you run it with a standard Python runtime (no external network activity or credentials are required). There are no red flags in the code or SKILL.md.
功能分析
Type: OpenClaw Skill Name: json-formatter-pro Version: 1.0.2 The skill is a straightforward JSON formatting and validation utility. The Python script (json_formatter.py) uses standard libraries to process JSON data and lacks any suspicious behaviors such as network access, credential theft, or command execution. The instructions in SKILL.md and README.md are consistent with the tool's stated purpose.
能力评估
Purpose & Capability
Name, description, SKILL.md examples, and the included python script all match: a CLI tool to validate and pretty-print JSON. Required capabilities (none) are proportional to the stated purpose.
Instruction Scope
SKILL.md instructs running the included python script from the skill directory or via stdin/files. The runtime instructions reference only file I/O and stdin/stdout consistent with formatting/validation; there are no steps that read unrelated system files, environment variables, or transmit data externally.
Install Mechanism
No install spec is provided (instruction-only), and the package includes a small Python script. No downloads, external package installs, or archive extraction are performed by the skill itself.
Credentials
The skill declares no environment variables, no credentials, and the code does not access environment or credential stores. The level of requested access is minimal and appropriate for a formatter.
Persistence & Privilege
The skill is not always-enabled, does not modify other skills or global agent settings, and does not request persistent privileges. It simply reads and writes files as dictated by the CLI arguments.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install json-formatter-pro
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /json-formatter-pro 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Version 1.0.2 of json-formatter-pro - No changes detected in this version.
v1.0.0
Initial release of json-formatter-pro. - Format JSON files with pretty-printing and customizable indentation. - Validate JSON syntax from files or stdin. - Support reading from stdin and outputting to files or stdout. - Options for sorting keys and specifying output files. - Clear exit codes for success and common error states.
v1.0.1
Rename skill to json-formatter-pro and republish
元数据
Slug json-formatter-pro
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

json-formatter-pro 是什么?

Format and validate JSON files with options for pretty-printing, indentation, key sorting, and output to files or stdout. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 203 次。

如何安装 json-formatter-pro?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install json-formatter-pro」即可一键安装,无需额外配置。

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.2。

💬 留言讨论