
JSON canonicalization
Canonicalizes JSON per RFC 8785 so signed and hashed data stays repeatable
JSON canonicalization is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 5
- Last commit
- License
- MIT
- Listing updated
Similar skills
About JSON canonicalization
This skill guides an agent through producing a canonical form of JSON using the JSON Canonicalization Scheme defined in RFC 8785, so that hashing and signing produce consistent results across producers and consumers. It walks through the requirements of the RFC one by one: I-JSON compatibility, rejection of duplicate property names, no whitespace between tokens, specific escaping rules for control characters, sorting of object properties recursively while leaving array order intact, and UTF-8 encoding of the result.
The workflow asks the agent to first settle whether it is acting as producer or consumer, then to apply each applicable requirement, and to make implementations fail with an error on lone surrogates, NaN or Infinity instead of emitting broken output. A references folder holds the pinned requirement quotes and version notes, and the skill tracks the RFC revision it was written from.
The skill contains no scripts. It expects the agent to write the canonicalization logic itself in whatever language the project uses, and it is meant for cases where JSON is canonicalized before signing.
When your agent uses it
JSON Canonicalization Scheme (JCS): Cryptographic operations like hashing and signing need the data to be expressed in an invariant format so that the operations are reliably repeatable. Covers RFC 8785 JSON Canonicalization Scheme (JCS). Use when canonicalizing JSON for signing. Triggers: RFC 8785, JCS.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 4 files (12 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the better-supabase plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabaseOr copy only this skill to ~/.claude/skills/json-canonicalization:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/json-canonicalization &&
cp -R "$tmp/.agents/skills/json-canonicalization" ~/.claude/skills/json-canonicalization &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/json-canonicalization inside it instead.
Copy the skill folder to ~/.agents/skills/json-canonicalization to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/json-canonicalization &&
cp -R "$tmp/.agents/skills/json-canonicalization" ~/.agents/skills/json-canonicalization &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/json-canonicalization inside it instead.
Copy the skill folder to ~/.cursor/skills/json-canonicalization to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/json-canonicalization &&
cp -R "$tmp/.agents/skills/json-canonicalization" ~/.cursor/skills/json-canonicalization &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/json-canonicalization inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/json-canonicalizationOr copy the folder to ~/.gemini/skills/json-canonicalization yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/json-canonicalization:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/json-canonicalization &&
cp -R "$tmp/.agents/skills/json-canonicalization" ~/.copilot/skills/json-canonicalization &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/json-canonicalization inside it instead.
Get the folder:
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.gitThen copy better-supabase/.agents/skills/json-canonicalization into your agent's skills folder as json-canonicalization. Agents that support SKILL.md read one folder per skill.
What it does
- RFC 8785 requirements
- Walks the agent through the canonicalization rules of RFC 8785 section by section.
- Property sorting
- Recursively sorts object properties while keeping array element order unchanged.
- String escaping rules
- Covers which control characters use short escapes and which use lowercase hex notation.
- Invalid input errors
- Requires implementations to fail on lone surrogates, NaN and Infinity rather than output them.
- Pinned source tracking
- Records the RFC revision it follows and includes steps for checking for updates.
Good for
- Canonicalize a JSON payload before computing its hash
- Prepare JSON for a digital signature so verification stays repeatable
- Check that a JSON serializer meets RFC 8785 rules
- Review existing JSON signing code for duplicate keys or whitespace issues
JSON canonicalization FAQ
When does the skill trigger?
It is meant for canonicalizing JSON for signing and is triggered by mentions of RFC 8785 or JCS.
Does JSON canonicalization run any scripts?
No. The skill contains no scripts and relies on the agent to write the canonicalization logic.
Which RFC does JSON canonicalization follow?
It follows RFC 8785, the JSON Canonicalization Scheme, published in June 2020 as informational.
How is JSON canonicalization installed?
The README gives the command npx skills add ScaleDockHQ/scaledock-skills --skill json-canonicalization.
How do I install JSON canonicalization in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/json-canonicalization to use it in all your projects, or to .claude/skills/json-canonicalization 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 canonicalization 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 canonicalization?
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 canonicalization?
The closest alternatives to JSON canonicalization are JWT, HTTP cookies, Gnap, Sh kb auth and Axiom security.
Where this comes from
- Description: from the skill's own SKILL.md.
More from ScaleDockHQ/better-supabase

Apply the CommonMark 0.31.2 spec when parsing or rendering Markdown
- Open source
- 5 GitHub stars
- Files and documents

Publish Agent Cards and run agent-to-agent calls over the A2A 1.0 protocol
- Open source
- 5 GitHub stars
- Developer tools

Lets an agent stream runs, tool calls and shared state to user-facing apps over AG-UI 1.0
- Open source
- 5 GitHub stars
- Developer tools

Lets an AI agent drive Chrome or Chromium through a fast browser automation CLI
- Open source
- 5 GitHub stars
- Browser automation

Guides an agent to write, review and validate SKILL.md skills against the Agent Skills
- Open source
- 5 GitHub stars
- Developer tools

Write, place, migrate and review AGENTS.md instruction files for coding agents
- Open source
- 5 GitHub stars
- Developer tools




