memcord: Command for Claude Code

.claude/commands/toon-validate.md

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

A command that checks whether a TOON v2.0 file follows the required format. TOON is the file format being validated, and strict mode treats problems as errors while the default mode reports warnings.

In plain words
What is it for?
Validating a specified TOON file, running strict validation for production, and reporting whether the file is valid or needs attention.
Why use it?
It catches formatting and correctness problems before a TOON file is used elsewhere, with either lenient or production-style checking.

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-validate.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-validate

README.md
[![agentmods](https://agentmods.dev/badge/commands/ukkit/memcord/toon-validate/github.svg)](https://agentmods.dev/commands/ukkit/memcord/toon-validate)
Your own site
<a href="https://agentmods.dev/commands/ukkit/memcord/toon-validate"><img src="https://agentmods.dev/badge/commands/ukkit/memcord/toon-validate/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-validate

Your own site · 80×15
<a href="https://agentmods.dev/commands/ukkit/memcord/toon-validate"><img src="https://agentmods.dev/badge/commands/ukkit/memcord/toon-validate.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 761 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.00761
Opus 5.5 $0.00000 $0.00304
Sonnet 5.5 $0.00000 $0.00152
Haiku 4.5 $0.00000 $0.00076

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

Security

Grade A, and why

toon-validate 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-validate.md · 124 lines

How it starts

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

TOON Validate

Validate TOON v2.0 files for correctness.

Usage: /toon-validate <file> [--strict]

Options:

  • --strict - Enable strict mode validation (production)
  • Default - Lenient mode (warnings only)

Execute the following workflow:

1. Validate Input

FILE="$1"

if [[ -z "$FILE" ]]; then
  echo "Usage: /toon-validate <file> [--strict]"
  echo "Example: /toon-validate data.toon --strict"
  exit 1
fi

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

echo "Validating: $FILE"

2. Check Binary

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

if [[ ! -f "$TOON_BIN" ]]; then
  echo "❌ Zig binary not found"
  echo "Build it with:"
  echo "  cd .claude/utils/toon && zig build -Doptimize=ReleaseFast"
  exit 1
fi

3. Run Validation

STRICT_FLAG=""
if [[ "$2" == "--strict" ]]; then
  STRICT_FLAG="--strict"
  echo "Mode: Strict (errors block)"
else
  echo "Mode: Lenient (warnings only)"
fi

echo ""
$TOON_BIN validate "$FILE" $STRICT_FLAG
EXIT_CODE=$?

4. Report Results

echo ""

if [[ $EXIT_CODE -eq 0 ]]; then
  echo "✅ File is valid TOON v2.0"
  exit 0
elif [[ $EXIT_CODE -eq 2 ]]; then
  echo "⚠️  File has warnings (see above)"
  echo ""
  echo "To enforce strict validation:"
  echo "  /toon-validate $FILE --strict"
  exit 0
else
  echo "❌ File has errors (see above)"
  echo ""
  echo "Common fixes:"
  echo "  • Add array counts: {fields}: → [N]{fields}:"
  echo "  • Fix indentation to multiples of 2"
  echo "  • Remove invalid escape sequences"
  echo "  • Match row count to declared count"
  exit 1
fi

Validation Rules

Strict Mode Checks

  1. Indentation - Must be multiples of 2 spaces, no tabs
  2. Array Counts - [N] must match actual row count
  3. Field Width - All rows must have same number of fields
  4. No Blank Lines - Within arrays
  5. Valid Escapes - Only \\ \" \n \r \t

Common Errors

Indentation Error:

❌ Line 3: Indentation must be multiple of 2 (found 3)

Read the full file on GitHub · 124 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 · 124 lines · 0 tokens per session scan A 80a25a71d5e5

Subscribe to this mod's changes

toon-validate 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 761 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-validate compared with commands from other repositories

toon-validate next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
toon-validateukkit/memcordCommand743mo agoMITA0Claude Code
compresssliamh11/DeusCommand512d agoMITA0Claude Code
checkpointsliamh11/DeusCommand512d agoMITA0Claude Code
resumesliamh11/DeusCommand512d agoMITA0Claude Code
preservesliamh11/DeusCommand512d agoMITA0Claude Code
todaydatacore-one/datacoreCommand4yesterdayMITA18Claude Code
continuedatacore-one/datacoreCommand4yesterdayMITA16Claude Code