Official agent skill

Kimojio JSON Decoder

by Azure in Azure/kimojio-rs

Write or update an allocation-free JSON decoder over the kimojio-json tokenizer.

OfficialMITAuto-check passed

Install Kimojio JSON Decoder

skills CLI
$ npx skills add Azure/kimojio-rs --skill kimojio-json-decoder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Azure/kimojio-rs kimojio-json-decoder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Azure/kimojio-rs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/kimojio-json-decoder .claude/skills/kimojio-json-decoder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kimojio-json-decoder
GitHub stars
264
Token cost
~3k tokens
SKILL.md length
1,623 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Write or update an allocation-free JSON decoder over the kimojio-json tokenizer.

  • Works in 4 steps: What work or failure mode does it avoid? → Does that cost apply to this schema and… → What is the smallest representation that… → …
  • Change code that turns JSON into a struct
  • SKILL.md covers Start with the problem, Read the tokenizer, Choose the output shape from… and Build the smallest safe machine, plus 4 more sections
  • Calls cargo

What it does

Kimojio JSON Decoder is an agent skill from Azure/kimojio-rs, published by the product's own GitHub organization. Write or update an allocation-free JSON decoder over the kimojio-json tokenizer. Use when asked to build, finish, or change code that turns JSON into a struct, an enum, or an iterator without heap allocation - especially when the answer is a state machine that would be tedious to write by hand.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A thread-per-core Linux iouring async runtime for Rust optimized for latency. The licence is MIT.

When your agent uses it

  • Change code that turns JSON into a struct
  • An iterator without heap allocation - especially when the answer is a state machine that would be tedious to write by hand

Example prompts

  • “/kimojio-json-decoder”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. What work or failure mode does it avoid?
  2. Does that cost apply to this schema and interface?
  3. What is the smallest representation that satisfies the contract?
  4. What measurement or test would distinguish the choices?

What it can do on your machine

Read from SKILL.md and the folder at commit 05aa18f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kimojio JSON Decoder loads about 3k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 1,623 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Azure/kimojio-rs at commit 05aa18f, republished under its MIT licence (© Azure). 1,623 words, ~2,970 tokens.

Download SKILL.mdSave it as .claude/skills/kimojio-json-decoder/SKILL.md (or your agent's skills folder).
name
kimojio-json-decoder
description
Write or update an allocation-free JSON decoder over the kimojio-json tokenizer. Use when asked to build, finish, or change code that turns JSON into a struct, an enum, or an iterator without heap allocation - especially when the answer is a state machine that would be tedious to write by hand.
license
MIT

kimojio-json decoders

kimojio-json tokenizes JSON. It reports borrowed input to a visitor. A decoder maps those events to a typed Rust value.

This skill is for direct, allocation-free decoders. It gives the agent the constraints and the reasons for them. It does not prescribe one state layout for every schema. A previous implementation is evidence, not a specification. If a task gives a type or an interface, treat that interface as a contract unless the task also asks to change it.

Start with the problem

Before writing code, identify:

  • the input source and schema;
  • the required public interface and input lifetime;
  • whether the result is one value, a sequence, or a callback stream;
  • the policy for unknown members and optional members;
  • maximum sizes and nesting depth;
  • error kinds, byte offsets, and completion behavior;
  • the expected performance and trust boundary.

Then compare possible designs. For each design, ask:

  1. What work or failure mode does it avoid?
  2. Does that cost apply to this schema and interface?
  3. What is the smallest representation that satisfies the contract?
  4. What measurement or test would distinguish the choices?

State the reason for a choice in the module documentation or change summary. Do not copy a detailed technique from an earlier decoder without checking why it was used. A different schema may make another technique better.

Read the tokenizer

Read these files from the repository root before relying on an API detail:

  • kimojio-json/src/lib.rs
  • kimojio-json/src/tokenizer.rs
  • kimojio-json/src/escape_string.rs
  • kimojio-json/src/error.rs

Confirm names, lifetimes, return values, and error behavior in the source. Do not invent a pull-token API or assume that a callback has access to the tokenizer.

Prefer the tokenizer's visitor protocol when it fits

The tokenizer already owns the scan loop and calls a Visitor. Prefer this protocol when the decoder can consume events as they arrive. This avoids an extra token iterator and an extra dispatch layer.

This recommendation has a measured reason. In this repository, iterator overhead has dominated tokenization for some workloads. A visitor can provide the same streaming behavior while paying the suspension and output cost only for events that complete an item: return no output for other events and return an output at an item boundary. Use an iterator adapter only when the caller's interface needs one, and compare its cost with the direct visitor design.

The visitor methods return Option<Self::Output>. In the normal case, None means that scanning continues. Some returns control to drive; a later call resumes the same decoder state. This is the mechanism for streaming results. If a decoder never suspends, an uninhabited output such as core::convert::Infallible can make the impossible output path removable. Confirm the exact drive contract in the tokenizer before depending on this.

Other tokenizer facts affect the design:

  • A visitor method cannot read the tokenizer offset. Return an error kind from the visitor and let the driver attach the offset.
  • Escaped and unescaped strings use different callbacks. Keep escaped text borrowed. If a known member name must be compared, use the tokenizer's allocation-free unescaped comparison operation when available.
  • Numbers arrive as validated JSON number text. Convert them only when the schema requires a value.
  • The member separator is consumed by the tokenizer. A key callback is followed by the callback for its value.
  • Confirm how complete input, trailing input, and sticky tokenizer errors are reported. Do not add a second completion model without a reason.

Choose the output shape from the interface

Streaming sequence. Let the consumer handle an item when the item is complete. This keeps peak memory near one item and avoids an intermediate document. A visitor or callback is often the best fit. An iterator adapter is useful when the caller requires the standard Iterator interface, but it should not add per-token work without a benefit.

Single struct. Keep only the fields needed to construct the value. Check required fields at the object boundary or another unambiguous completion point. Borrow fields from the input when their lifetime permits.

Enum or several document shapes. Use the earliest safe discriminator. If member order is not fixed, retain only the data needed to decide the variant. Do not build a full intermediate tree to postpone a decision.

Callback bridge. A generic bridge can borrow the caller's visitor while the decoder remains a concrete type. This can keep the public API simple and avoid storing a type parameter in decoder state. It is a useful option, not a rule. If profiling shows that a borrowed decoder adds repeated state indirection, test moving small plain decoder state by value across one drive call. One measurement in this repository found about a 7 percent difference on a small document. Treat that result as a clue, not a universal threshold. Keep the consumer borrow if it is touched less often than the decoder state.

Build the smallest safe machine

Use explicit states and a loop when the input can control nesting. Recursive descent turns input depth into call-stack depth and can exhaust the stack. Track only the context needed by the schema:

  • a depth counter when only depth matters;
  • compact fixed context when the container kind matters;
  • a fixed capacity derived from a schema limit when a bound exists.

Unknown values may be skipped by counting nested containers in the decoder. Apply depth and size limits while skipping too. An unknown member must not provide an unbounded path around an input limit.

Emit a value as soon as it is complete. Keep a record only until its fields can be validated. Do not parse, unescape, copy, or store data that the result does not use. Use fixed-size inline storage for data with a real maximum. Reject values over that maximum; do not truncate or grow storage.

Name states after input positions, such as Parameters, AddressOctets, or Skip. A reviewer must be able to relate a state to a position in the input.

Show full SKILL.md (649 more words)Show less

Correctness and cost rules

These are defaults because they preserve the tokenizer's properties. Change one only when the task changes the contract and the trade-off is explicit.

  1. Do not allocate in non-test code. Avoid Vec, String, Box, collect, and to_owned. Borrow &str and other input data to the end of the call. Heap storage hides bounds and adds work that the tokenizer avoids.
  2. Do not add broad decoding machinery by default. Avoid serde, runtime schemas, trait objects, and generic plumbing that is not required by the interface. They can add dispatch, compile time, binary size, or hidden allocation. Plain Rust keeps the hot path and its invariants visible.
  3. Do not recurse. Input depth is external input, not a safe call-stack bound.
  4. Handle input errors explicitly and do not use unsafe. Do not use unwrap, expect, panic!, todo!, unreachable!, unchecked indexing, or arithmetic that can overflow for input-derived conditions. A panic is appropriate only when reaching it would prove that an internal invariant is false, the invariant is known to hold in practice, and Rust cannot enforce it. Document that invariant and keep input validation before it. Use checked conversions, checked arithmetic, and bounds-aware access elsewhere.
  5. Reject invalid data. Reject wrong types, values outside the target range, missing required members, and malformed state transitions. Apply a default only when the schema declares the member optional and documents the default. Skip unknown members only when the protocol permits it.
  6. Make errors locatable. Preserve an error kind and pair it with the tokenizer byte offset at the driver boundary.

Document decisions in the generated module

Generated code needs its context in the file. Put this information in module documentation:

  • what the decoder reads and where it comes from;
  • the published schema;
  • representative real sample documents;
  • the public interface and why it has that shape;
  • bounds, defaults, unknown-member policy, and caller responsibilities;
  • the tests that verify the contract;
  • an Editing this file section.

Start generated modules with:

rust
//! GENERATED with the `kimojio-json-decoder` skill - prefer regenerating or
//! updating with that skill over hand-editing.

Document every public item. Comment only state transitions or invariants that are not clear from the code.

Separate the public surface from the machine

Public types, derives, accessors, error text, and documentation are ordinary source. A maintainer may edit them directly.

Mark the derived state machine, scratch values, visitor implementation, and entry-point or iterator bodies. Use markers like these:

rust
// ---------------------------------------------------------------------------
// STATE MACHINE - maintained by the `kimojio-json-decoder` skill.
//
// Everything above this line is ordinary source.
//
// This region is derived to keep the path allocation-free, non-recursive, and
// explicit. A local change can break a transition, a bound, or an error path.
// Prefer describing the required behavior and letting the skill derive it.
// If this region is edited by hand, record why and re-check those properties.
// ---------------------------------------------------------------------------
rust
// ------------------------- end of the state machine ------------------------

In Editing this file, say what is safe to edit by hand, what should be regenerated or updated by the skill, and which invariants must be checked after a machine edit.

Work modes

From scratch. Use the schema and interface as the source of truth. Design the smallest machine that meets them. Include the required module documentation and ownership markers.

Finish a sketch. Preserve the supplied public types and signatures unless the task says they are wrong. Complete the machine around that contract. Do not treat todo!() as permission to replace the interface.

Update. Read the module documentation and the machine markers first. Make the smallest change that satisfies the new contract. Do not regenerate a whole file for a local fix.

Assume that an existing file has hand edits. Preserve changes outside the machine. Read changes inside the machine before replacing them; an unusual branch or a fix comment records behavior that may be required. Carry that behavior forward or explain why it no longer applies. Summarize important design changes and any intentionally removed behavior.

Tests and validation

Keep hand-written acceptance tests independent. Do not edit or delete them to make the implementation pass. Tests inside the generated module may be added for local state-machine checks, but they do not replace the external contract.

Use the repository's existing validation commands. For a decoder package, the usual checks are:

sh
cargo fmt -p <package>
cargo clippy -p <package> --all-targets --all-features -- -D warnings
cargo test -p <package>

After validation, inspect the machine against the allocation, depth, bounds, error-offset, and panic rules. These properties are the reason for the design; the exact state names and bridge layout are implementation choices.

© Azure, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/kimojio-json-decoder of Azure/kimojio-rs.

Open the folder on GitHubat commit 05aa18f

Compare with similar skills

Kimojio JSON Decoder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kimojio JSON Decoder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kimojio JSON Decoder this skillAzure/kimojio-rs264—~3kAutomated safety check: PassMIT
Agent Resource Allocatorruvnet/ruflo74k2 repos~4.9kAutomated safety check: PassMIT
Speculative DecodingOrchestra-Research/AI-Research-SKILLs13k3 repos~3.5kAutomated safety check: PassMIT
Asset Allocation and OptimizersHKUDS/Vibe-Trading35k—~2.9kAutomated safety check: PassMIT
Defi Yield Strategy Allocatorsickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
Cipher Decoderarchestra-ai/archestra4.3k—~293Automated safety check: PassCustom licence

Similar skills

  • Agent skill for resource-allocator - invoke with $agent-resource-allocator

    74k GitHub starsUsed in 2 repos~4.9k tokens
    Auto-check passed
  • Speculative Decoding

    Orchestra-Research/AI-Research-SKILLs

    Explains three ways to speed up LLM inference: draft-model speculative decoding, Medusa heads and lookahead decoding with Jacobi iteration, and when each one fits.

    13k GitHub starsUsed in 3 repos~3.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Explains portfolio theory and the built-in optimizers: mean-variance (MPT), Black-Litterman, risk budgeting and all-weather allocation, plus rebalancing rules and config output.

    35k GitHub stars~2.9k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Defi Yield Strategy Allocator

    sickn33/agentic-awesome-skills

    Multi-vault automated yield strategy allocation register: APY benchmarks, impermanent loss risk tiers, and rebalancing triggers.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    Business, Finance & HRAuto-check passed
  • Cipher Decoder

    archestra-ai/archestra

    Decode an encoded message using the bundled cipher scripts. An agent skill from archestra-ai/archestra.

    4.3k GitHub stars~293 tokensUpdated today
    Auto-check passed
  • Official

    Add EAGLE-3 or draft-model speculative decoding to a Jetson vLLM server when TPOT is the bottleneck.

    3.5k GitHub starsUsed in 1 repo~1.2k tokens
    AI & LLM EngineeringAuto-check passed

Questions about Kimojio JSON Decoder

What does Kimojio JSON Decoder do?

Write or update an allocation-free JSON decoder over the kimojio-json tokenizer. Kimojio JSON Decoder is an agent skill from Azure/kimojio-rs, published by the product's own GitHub organization. Write or update an allocation-free JSON decoder over the kimojio-json tokenizer.

When should I use Kimojio JSON Decoder?

Kimojio JSON Decoder fits situations like: change code that turns JSON into a struct; an iterator without heap allocation - especially when the answer is a state machine that would be tedious to write by hand.

How do I install Kimojio JSON Decoder in Claude Code?

Run `npx skills add Azure/kimojio-rs --skill kimojio-json-decoder -a claude-code`. Or copy the skill folder (.github/skills/kimojio-json-decoder in Azure/kimojio-rs) into .claude/skills/kimojio-json-decoder in your project. Claude Code loads it when a task matches its description.

How do I install Kimojio JSON Decoder in Codex?

Run `npx skills add Azure/kimojio-rs --skill kimojio-json-decoder -a codex`. Or copy the skill folder (.github/skills/kimojio-json-decoder in Azure/kimojio-rs) into .agents/skills/kimojio-json-decoder in your project. Codex loads it when a task matches its description.

Can I use Kimojio JSON Decoder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Azure/kimojio-rs --skill kimojio-json-decoder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kimojio-json-decoder, .gemini/skills/kimojio-json-decoder, .github/skills/kimojio-json-decoder and .opencode/skills/kimojio-json-decoder in your project.

What does Kimojio JSON Decoder need to run?

Going by SKILL.md and its folder, Kimojio JSON Decoder needs the command-line tools its instructions call (cargo).

Does Kimojio JSON Decoder access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Kimojio JSON Decoder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kimojio JSON Decoder use?

Kimojio JSON Decoder is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kimojio JSON Decoder use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kimojio JSON Decoder?

Skills that share tags, products or a category with Kimojio JSON Decoder: Agent Resource Allocator (ruvnet/ruflo, 74k stars), Speculative Decoding (Orchestra-Research/AI-Research-SKILLs, 13k stars), Asset Allocation and Optimizers (HKUDS/Vibe-Trading, 35k stars) and Defi Yield Strategy Allocator (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kimojio JSON Decoder?

Azure (a GitHub organization, an official publisher) maintains it in Azure/kimojio-rs, which has 264 GitHub stars. The repository was last updated on September 29, 2026.

Source: Azure/kimojio-rs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.