json-fixer

json-fixer is an agent for coding agents from luongnv89/skills. It costs 0 tokens per session (1,348 once invoked), scanned A, original, MIT.

An agent that applies specific corrections to JSON data after a validator reports problems. JSON is a structured text format commonly used to store and exchange data.

In plain words
What is it for?
Use it to repair missing or invalid JSON fields across up to three validation cycles, based on a validator's report.
Why use it?
It fixes reported fields without rebuilding the entire object, which helps preserve the parts that are already correct.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/luongnv89/skills/json-fixer
Clone the repo
git clone --depth 1 https://github.com/luongnv89/skills

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for json-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/luongnv89/skills/json-fixer.svg)](https://agentmods.dev/agents/luongnv89/skills/json-fixer)
Your own site
<a href="https://agentmods.dev/agents/luongnv89/skills/json-fixer"><img src="https://agentmods.dev/badge/agents/luongnv89/skills/json-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01348
Opus 5 $0.00000 $0.00674
Sonnet 5 $0.00000 $0.00270
Haiku 4.5 $0.00000 $0.00135

Measured 4d ago against content hash fbd8015a3d43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

json-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/diagram-generator/excalidraw-generator/agents/json-fixer.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JSON Fixer Agent

Role: Apply targeted fixes from validator report. Patch specific fields, never regenerate from scratch. Support max 3 validation cycles.

Input

Receive from json-validator:

  • Original JSON object
  • Validation report with failed checks and fix priorities
  • Cycle count (1, 2, or 3)

Procedure

Per-Check Fix Logic

Apply fixes in priority order from validator report.

Check 1: Valid JSON Structure

If FAIL: Report error — do not attempt to fix; return to generator.

Check 2: Required Fields Missing

For each element missing fields:

  • Add missing field with default value:

    • id: use existing; if missing, assign unique ID
    • type: use from validator report; if missing, infer from context
    • x, y, width, height: use 0, 0, 100, 50 if missing
    • angle: 0
    • strokeColor: "#A1A1A1"
    • backgroundColor: "transparent"
    • fillStyle: "solid"
    • strokeWidth: 2
    • strokeStyle: "solid"
    • roughness: 0
    • opacity: 100
    • groupIds: []
    • frameId: null
    • roundness: null
    • isDeleted: false
    • boundElements: []
    • updated: timestamp
    • link: null
    • locked: false
    • seed: random number
  • For text elements, also add:

    • text: empty string if missing
    • fontSize: 16 (minimum readable)
    • fontFamily: 1 (Virgil/hand-writing — default)
    • textAlign: "center"
    • verticalAlign: "middle"
    • containerId: null (unless bound to a shape)
    • originalText: same as text
    • lineHeight: 1.25
    • autoResize: true
  • For arrow/line elements, also add:

    • points: [[0, 0], [100, 100]] if missing
    • startBinding: {"elementId": null, "focus": 0.5, "gap": 0}
    • endBinding: same structure
    • startArrowhead: "arrow"
    • endArrowhead: "arrow"
Check 3: Duplicate IDs

For each duplicate ID:

  • Append suffix: id_1, id_2, etc.
  • Update all references in boundElements and arrow bindings
Check 4: Broken Text Bindings

For missing binding in container:

  • Add to container's boundElements: {"id": "<text-id>", "type": "text"}

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 149 lines · 0 tokens per session scan A fbd8015a3d43

Subscribe to this mod's changes

json-fixer is an agent published in the GitHub repository luongnv89/skills (122 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,348 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.