memcord: Command for Claude Code

.claude/commands/toon-encode.md

toon-encode is a command for Claude Code from ukkit/memcord. It costs 0 tokens per session (1,035 once invoked), scanned A, original, MIT.

A command that converts JSON data into TOON version 2.0 format using a Zig-based encoder. JSON is a common structured data format, while TOON is the output format used by this command.

In plain words
What is it for?
Use it to convert a JSON file, select comma, tab, or pipe separators, enable or disable key folding, or inspect whether the data is suitable without converting it.
Why use it?
It avoids manually rewriting structured data and lets you choose delimiters or key-folding behavior during conversion.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is ukkit/memcord's own configuration. It tells Claude Code how to work on memcord itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything memcord configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ukkit/memcord. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ukkit/memcord/main/.claude/commands/toon-encode.md
Clone the repo
git clone --depth 1 https://github.com/ukkit/memcord

Made for: Claude Code.

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 toon-encode

README.md
[![agentmods](https://agentmods.dev/badge/commands/ukkit/memcord/toon-encode/github.svg)](https://agentmods.dev/commands/ukkit/memcord/toon-encode)
Your own site
<a href="https://agentmods.dev/commands/ukkit/memcord/toon-encode"><img src="https://agentmods.dev/badge/commands/ukkit/memcord/toon-encode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for toon-encode

Your own site · 80×15
<a href="https://agentmods.dev/commands/ukkit/memcord/toon-encode"><img src="https://agentmods.dev/badge/commands/ukkit/memcord/toon-encode.svg" alt="Reviewed on agentmods" width="80" 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,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01035
Opus 5.5 $0.00000 $0.00414
Sonnet 5.5 $0.00000 $0.00207
Haiku 4.5 $0.00000 $0.00103

Measured 2mo ago against content hash 36cc393d720d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

toon-encode 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 2mo 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.

.claude/commands/toon-encode.md · 170 lines

How it starts

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

TOON Encode

Convert JSON to TOON v2.0 format using the Zig encoder.

Usage: /toon-encode <file> [options]

Options:

  • --delimiter comma|tab|pipe - Delimiter choice (default: comma)
  • --key-folding - Enable key folding (default: on)
  • --no-key-folding - Disable key folding
  • --check-only - Just analyze, don't convert

Execute the following workflow:

1. Validate Input

FILE="$1"

if [[ -z "$FILE" ]]; then
  echo "Usage: /toon-encode <file> [options]"
  echo "Example: /toon-encode data.json --delimiter tab"
  exit 1
fi

if [[ ! -f "$FILE" ]]; then
  echo "❌ Error: File not found: $FILE"
  exit 1
fi

if [[ ! "$FILE" =~ \.json$ ]]; then
  echo "⚠️  Warning: File doesn't have .json extension"
  read -p "Continue? (y/n) " -n 1 -r
  echo
  if [[ ! $REPLY =~ ^[Yy]$ ]]; then
    exit 0
  fi
fi

echo "✓ Input: $FILE"

2. Check Suitability (if --check-only)

if [[ "$2" == "--check-only" ]]; then
  echo "Analyzing data..."
  .claude/utils/toon/zig-out/bin/toon check "$FILE"
  exit $?
fi

3. Parse Options

DELIMITER="comma"
KEY_FOLDING="--key-folding"
OUTPUT="${FILE%.json}.toon"

while [[ $# -gt 1 ]]; do
  case "$2" in
    --delimiter)
      DELIMITER="$3"
      shift 2
      ;;
    --no-key-folding)
      KEY_FOLDING=""
      shift
      ;;
    --key-folding)
      KEY_FOLDING="--key-folding"
      shift
      ;;
    *)
      shift
      ;;
  esac
done

echo "⚙️  Configuration:"
echo "  Delimiter: $DELIMITER"
echo "  Key folding: ${KEY_FOLDING:-disabled}"
echo "  Output: $OUTPUT"

4. Check Zig Binary

TOON_BIN=".claude/utils/toon/zig-out/bin/toon"

if [[ ! -f "$TOON_BIN" ]]; then
  echo "❌ Zig binary not found. Building..."
  echo ""
  cd .claude/utils/toon
  zig build -Doptimize=ReleaseFast
  cd -
  echo ""
  echo "✓ Build complete"
fi

5. Convert

echo ""
echo "Converting..."

$TOON_BIN encode "$FILE" \
  --delimiter "$DELIMITER" \
  $KEY_FOLDING \
  > "$OUTPUT"

if [[ $? -eq 0 ]]; then
  echo "✓ Conversion successful"
else
  echo "❌ Conversion failed"
  exit 1
fi

Read the full file on GitHub · 170 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. 2mo ago First seen · 170 lines · 0 tokens per session scan A 36cc393d720d

Subscribe to this mod's changes

toon-encode is a command published in the GitHub repository ukkit/memcord (74 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,035 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.

Related

toon-encode compared with commands from other repositories

toon-encode next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
toon-encodeukkit/memcordCommand743mo agoMITA0Claude Code
searchdatacore-one/datacoreCommand4yesterdayMITA22Claude Code
structural-integritydatacore-one/datacoreCommand4yesterdayMITA19Claude Code
digestBizuayeu/Plugins-WeaveCommand111mo agononeA24Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code