# JSON patch

> JSON patch is an open-source agent skill for developer tools. Lets the agent apply and describe JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7396). It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/json-patch
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** json-patch
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill guides the agent through applying changes to JSON documents using either JSON Patch, a list of add, remove, replace, move, copy and test operations, or JSON Merge Patch, a simpler object-shaped update where null removes a key. It walks the agent through the requirements of each RFC, such as the rule that a test operation must match before a patch succeeds, and the rule that a failed operation means the whole patch is not applied.

The workflow has the agent first choose the target specification line, then check the implementation against the quoted normative requirements from the pinned RFC texts. Upgrade steps for moving between spec versions are covered in a reference file, and a verification checklist is included before the work is considered done. The skill is written as instructions only and does not ship scripts.

The skill works with any JSON document and needs no external services or tools beyond whatever language the agent uses to manipulate JSON. It is published under the MIT license as part of the better-supabase repository.

## When your agent uses it

> JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7396): describe and apply changes to JSON documents. Covers RFC 6902 JavaScript Object Notation (JSON) Patch, RFC 7396 JSON Merge Patch. Use when applying a JSON Patch or a merge patch. Triggers: JSON Patch, RFC 6902, RFC 7396.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/json-patch)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/json-patch)

## Features

- **JSON Patch operations:** Covers the add, remove, replace, move, copy and test operations defined in RFC 6902.
- **JSON Merge Patch rules:** Explains how RFC 7396 merges objects and treats null as a removal instruction.
- **Requirement checklist:** Lists the normative RFC requirements the agent should check against its output.
- **Pinned spec versions:** Records the RFC revisions used so results cite a fixed source.
- **Failure handling:** States that a patch is not successful if any operation fails or a requirement is violated.

## Good for

- Apply a JSON Patch document to a configuration file
- Convert a set of object changes into a merge patch
- Check whether a JSON Patch document follows RFC 6902
- Explain how a null value behaves in a JSON Merge Patch
- Write a test operation that guards a JSON Patch update

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/json-patch`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/json-patch &&
cp -R "$tmp/.agents/skills/json-patch" ~/.claude/skills/json-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/json-patch` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/json-patch` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/json-patch &&
cp -R "$tmp/.agents/skills/json-patch" ~/.agents/skills/json-patch &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/json-patch` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/json-patch` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/json-patch &&
cp -R "$tmp/.agents/skills/json-patch" ~/.cursor/skills/json-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/json-patch` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/json-patch
```

Or copy the folder to `~/.gemini/skills/json-patch` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/json-patch`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/json-patch &&
cp -R "$tmp/.agents/skills/json-patch" ~/.copilot/skills/json-patch &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/json-patch` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/json-patch` into your agent's skills folder as `json-patch`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does the skill trigger?

It is meant for applying a JSON Patch or a merge patch, with triggers including JSON Patch, RFC 6902 and RFC 7396.

### Does JSON patch run any scripts?

No, the skill has no scripts. It consists of instructions and reference files.

### What does a merge patch do with null values?

According to RFC 7396, null values in the merge patch indicate removal of existing values in the target.

### What happens if one operation in a JSON Patch fails?

Per RFC 6902, evaluation should stop and the entire patch is not considered successful.

### How do I install JSON patch in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/json-patch to use it in all your projects, or to .claude/skills/json-patch in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does JSON patch run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use JSON patch?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to JSON patch?

The closest alternatives to JSON patch are JSON rpc, Jsonpath, Using knowledge patch, JSON pointer and Patching bugs.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [JSON rpc](https://ai-powered.com/skills/json-rpc): JSON rpc is an open-source agent skill for developer tools.
- [Jsonpath](https://ai-powered.com/skills/jsonpath): Jsonpath is an open-source agent skill for developer tools.
- [Using knowledge patch](https://ai-powered.com/skills/using-knowledge-patch): Using knowledge patch is an open-source agent skill for developer tools.
- [JSON pointer](https://ai-powered.com/skills/json-pointer): JSON pointer is an open-source agent skill for developer tools.
- [Patching bugs](https://ai-powered.com/skills/patching-bugs): Patching bugs is an open-source agent skill for developer tools.
- [Implement patch](https://ai-powered.com/skills/implement-patch): Implement patch is an open-source agent skill for developer tools.
- [JSON schema](https://ai-powered.com/skills/json-schema): JSON schema is an open-source agent skill for developer tools.
- [Post patch validation](https://ai-powered.com/skills/post-patch-validation): Post patch validation is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/json-patch
