# Format JSON Input Reliably

Raw JSON is hard to inspect when it arrives as one long string. This skill validates input and returns readable formatting with a chosen indentation size.

## Install

```bash
npx skillstore add enactprotocol/enact-formatter
```

## Metadata

- Status: approved
- Slug: enactprotocol-enact-formatter
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 573c8a9a708094020b438fbb5bbede0ac0ec4f74c20ac5a1096622cf189444ca
- Author: EnactProtocol
- GitHub username: EnactProtocol
- License: MIT
- Repository: https://github.com/EnactProtocol/enact/tree/main/examples/formatter
- Ref: 30c73eac2afe762f6aa9c4553158769369d47351
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 72
- Public page: https://skillstore.pages.dev/skills/enactprotocol-enact-formatter
- Manifest: https://skillstore.pages.dev/api/skills/enactprotocol-enact-formatter/manifest

## Capabilities

- Parses a JSON string and reports whether it is valid.
- Formats valid JSON with configurable space indentation.
- Returns formatted text together with a validation flag.
- Reports parser error messages for invalid JSON input.
- Runs through a small Node.js formatter script.

## Use Cases

- Inspect API Responses: Format compact API response bodies so fields and nesting are easier to review.
- Validate Configuration Snippets: Check whether a JSON configuration snippet parses before sharing it with a team.
- Prepare Documentation Examples: Convert minified JSON examples into readable text for docs, tickets, or support notes.

## Prompt Templates

### Format Basic JSON

```
Use this skill to format this JSON string with two-space indentation: [paste JSON string].
```

### Check Validity

```
Run the formatter on this JSON and tell me whether it is valid. Explain any parser error in plain language: [paste JSON string].
```

### Change Indentation

```
Format this JSON using four-space indentation and keep the original field values unchanged: [paste JSON string].
```

### Prepare Documentation Output

```
Format this compact JSON for a documentation example, then summarize the top-level fields without changing the data: [paste JSON string].
```

## Limitations

- It only accepts JSON supplied as a string argument.
- It does not repair invalid JSON automatically.
- It does not sort keys, filter fields, or transform values.
- Very large inputs may be limited by runtime argument size.

## Best Practices

- Pass complete JSON strings and escape quotes according to your calling environment.
- Use two spaces for general readability unless your project requires another indentation size.
- Review invalid output messages before assuming the source data is corrupt.

## Anti Patterns

- Do not use this skill to repair malformed JSON automatically.
- Do not pass secrets unless your runtime and logs are approved for sensitive data.
- Do not use it for non-JSON formats such as YAML, XML, or JavaScript objects.

## Security Audit

- Audited at: 2026-07-05T15:52:15.521\+00:00
- Summary: The reported backtick findings are Markdown code fences and are false positives, not executable Ruby or shell backticks. I found one contextual medium-risk issue: SKILL.md passes user-controlled inputs directly into a command template, which may be unsafe if the runtime shells out without escaping.

## Stats

- Views: 142
- Downloads: 8
- Favorites: 0
- Popularity score: 0
