json-formatter
Validate, format, and minify JSON files when users request JSON validation, formatting, or ask to validate their JSONs
- License 许可
- Unlicense
- 最近更新
- 2026-11-07
- Stars
- ★ 21
- Forks
- 9
01 前言 Front Matter
- name
- json-formatter
- description
- Validate, format, and minify JSON files when users request JSON validation, formatting, or ask to validate their JSONs
- allowed-tools
- [ "Read", "Bash" ]
02 资源文件 3
- 脚本format.py1.4 KB
- 参考文档README.md904 B
- 脚本validate.py758 B
03 SKILL.md 正文
JSON Formatter Skill
Format, validate, and minify JSON files with precision and safety.
Capabilities
This skill provides comprehensive JSON processing:
- Validation: Parse and validate JSON syntax, reporting errors with line numbers
- Formatting: Pretty-print JSON with configurable indentation (default 2 spaces)
- Minification: Remove all unnecessary whitespace for production use
- Safety: Always show diffs before writing changes
- Metrics: Report file size before and after operations
Usage
When a user requests JSON processing, this skill:
- Reads the target JSON file
- Validates the syntax
- Asks user preference: format or minify
- Shows the proposed changes
- Reports size difference
- Writes the result
Instructions
For any JSON file operation:
- Always validate before processing
- Use 2-space indentation for formatting
- Preserve UTF-8 encoding
- Show clear error messages with line numbers for invalid JSON
- Never modify files without showing diffs first
- Handle nested objects and arrays correctly
- Support both single files and batch operations
04 同仓库更多 Skills
word-count
Counts the words, lines and characters of a text or a file.
slugify
Turns a title or a sentence into a URL slug, lowercase words joined by hyphens with accents removed.
json-format
Validates a JSON file and pretty prints it with two space indentation, or reports where the JSON is invalid.
commit-message
Writes a conventional commit message for the staged git changes.
skills-gateway
Gateway and router to a catalog of skills that are not registered directly. Use it before any task a specialized skill could handle, such as text, JSON or git chores. It finds the right skill and loads its instructions.
decision-log
Record, list, show and supersede architecture decisions that persist across sessions in the shared agent infra state store. Use when the user says "record this decision", "log an ADR", "what did we decide about", "list decisions", or "supersede decision".