Jump to related tools in the same category or review the original source on GitHub.

PDF & Documents @wanng-ide Updated 6/28/2026 1,422 downloads 0 stars Security: Pass

Json Repair Kit OpenClaw Plugin & Skill | ClawHub

Looking to integrate Json Repair Kit into your AI workflows? This free OpenClaw plugin from ClawHub helps you automate pdf & documents tasks instantly, without having to write custom tools from scratch.

What this skill does

Repair malformed JSON files by normalizing them through Node.js evaluation. Use this to fix trailing commas, single quotes, unquoted keys, or other common syntax errors in JSON files (e.g. config files, manually edited data).

Install

ClawHub CLI
openclaw skills install @wanng-ide/json-repair-kit
Node.js (npx)
npx clawhub@latest install json-repair-kit

Full SKILL.md

Open original
Metadata table.
namedescription
json-repair-kitRepair malformed JSON files by normalizing them through Node.js evaluation. Use this to fix trailing commas, single quotes, unquoted keys, or other common syntax errors in JSON files (e.g. config files, manually edited data).

SKILL.md content below is scrollable.

JSON Repair Kit

A utility to repair broken or "loose" JSON files (like those with trailing commas, single quotes, or unquoted keys) by parsing them as JavaScript objects and re-serializing as valid JSON.

Usage

# Repair a file in place (creates .bak backup)
node skills/json-repair-kit/index.js --file path/to/broken.json

# Repair and save to a new file
node skills/json-repair-kit/index.js --file broken.json --out fixed.json

# Scan directory and repair all .json files (recursive)
node skills/json-repair-kit/index.js --dir config/ --recursive

Supported Repairs

  • Trailing Commas: {"a": 1,} -> {"a": 1}
  • Single Quotes: {'a': 'b'} -> {"a": "b"}
  • Unquoted Keys: {key: "value"} -> {"key": "value"}
  • Comments: Removes JS-style comments // (if parser supports it, standard Node eval may strip them if they are line comments outside of strings).
  • Hex/Octal Numbers: 0xFF -> 255

Safety

  • Backup: Always creates a .bak file before overwriting (unless --no-backup is used, but default is safe).
  • Validation: Verifies the repaired content is valid JSON before writing.
  • Eval Sandbox: Uses vm.runInNewContext to parse, ensuring no access to global scope or process. It is safer than eval().
ClawHub Registry URL: https://clawhub.ai/wanng-ide/skills/json-repair-kit

Related skills

If this matches your use case, these are close alternatives in the same category.