json-formatter-pro

v1.0.2

Format and validate JSON files with options for pretty-printing, indentation, key sorting, and output to files or stdout.

0· 18·0 current·0 all-time
byhaidong@harrylabsj
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dz78z6takyewvhjzxsbmxts840er4

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

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

Files

3 total
Select a file
Select a file to preview.

Comments

Loading comments…