Skip to content
Back to skills

Repair Malformed Json Before Parsing Downstream Automations Jsonrepair

ASecurity

Use jsonrepair when an agent receives JSON-like output that is almost valid but still breaks parsers, such as trailing commas, missing quotes, or concatenated fragments. The agent’s role is to normalize the payload before validation or routing, not to replace real schema design.

  • 36 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 2, 2026
ai-agentspythongonodegitapisecuritydocumentation

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned June 2, 2026

npx -y skills add agentskillexchange/skills --skill repair-malformed-json-before-parsing-downstream-automations-jsonrepair --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Repair Malformed Json Before Parsing Downstream Automations Jsonrepair?

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

Security grade badge for Repair Malformed Json Before Parsing Downstream Automations Jsonrepair
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentskillexchange-repair-malformed-json-before-parsing-downstream-au/badge)](https://www.skillsdirectory.com/skills/agentskillexchange-repair-malformed-json-before-parsing-downstream-au)

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: "Repair malformed JSON before parsing downstream automations with jsonrepair"
slug: "repair-malformed-json-before-parsing-downstream-automations-jsonrepair"
description: "Use jsonrepair when an agent receives JSON-like output that is almost valid but still breaks parsers, such as trailing commas, missing quotes, or concatenated fragments. The agent’s role is to normalize the payload before validation or routing, not to replace real schema design."
github_stars: 2297
verification: "security_reviewed"
source: "https://github.com/josdejong/jsonrepair"
author: "josdejong"
category: "Developer Tools"
framework: "Multi-Framework"
tool_ecosystem:
  github_repo: "josdejong/jsonrepair"
  github_stars: 2297
  npm_package: "jsonrepair"
  npm_weekly_downloads: 7314614
---

# Repair malformed JSON before parsing downstream automations with jsonrepair

Use jsonrepair when an agent receives JSON-like output that is almost valid but still breaks parsers, such as trailing commas, missing quotes, or concatenated fragments. The agent’s role is to normalize the payload before validation or routing, not to replace real schema design.

## Prerequisites

Node.js or CLI, JSON-like input data

## Installation

Use the upstream install or setup path that matches your environment:
- $ npm install jsonrepair
- $ npm install -g jsonrepair
- npm install | Install the dependencies once
- npm run build | Build the library (ESM, CommonJs, and UMD output in the folder lib)

Requirements and caveats from upstream:
- Replace Python constants None, True, and False with null, true, and false
- Use the streaming API in Node.js:
- import { createReadStream, createWriteStream } from 'node:fs'

Basic usage or getting-started notes:
- Turn newline delimited JSON into a valid JSON array, for example:
- Note that in the lib folder, there are builds for ESM, UMD, and CommonJs.
- ## Use

- Source: https://github.com/josdejong/jsonrepair
- Extracted from upstream docs: https://raw.githubusercontent.com/josdejong/jsonrepair/HEAD/README.md

## Documentation

- https://github.com/josdejong/jsonrepair

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/repair-malformed-json-before-parsing-downstream-automations-jsonrepair/)

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.

Comments

Loading comments…

Newsletter

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