Skip to content
Back to skills

Json Pretty

ASecurity

Pretty-print a JSON file with sorted keys and 2-space indent. Use when the user asks to format, prettify, or "make this JSON readable".

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 19, 2026
ai-agents

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add hsaghir/looplet --skill json-pretty --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Json Pretty?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Json Pretty
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hsaghir-json-pretty/badge)](https://www.skillsdirectory.com/skills/hsaghir-json-pretty)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: json-pretty
description: Pretty-print a JSON file with sorted keys and 2-space indent. Use when the user asks to format, prettify, or "make this JSON readable".
tags: [json, formatting]
---

# JSON pretty-printer

Use this skill when the user wants a JSON file formatted for human
reading.

## Steps

1. Use `read_text(path=<json>)` to load the file.
2. Parse it with `json.loads`. If parsing fails, write the parse
   error to `<stem>.parse_error.txt` and stop - do not write a
   partial output.
3. Re-emit with `json.dumps(obj, indent=2, sort_keys=True,
   ensure_ascii=False)`.
4. Write the result back to `<stem>.pretty.json` next to the
   original. Do NOT modify the original.

## Output contract

The user expects a `<stem>.pretty.json` file. The `done(answer=...)`
summary should report the new file's path.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.