zcode-usage-sync

zcode-usage-sync is a skill for Claude Code, Codex from techysy/10router. It costs 186 tokens per session (2,917 once invoked), scanned A, original, MIT.

A data export tool that copies ZCode's local record of model usage into 10Router, a service that tracks usage statistics.

In plain words
What is it for?
Use it to sync ZCode usage totals and records to a local or remote 10Router instance, using an API key or password already configured for the service.
Why use it?
It avoids entering or transferring usage records by hand. A dry run lets you check what would be imported before anything changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to sync ZCode usage totals and records to a local or remote 10Router instance, using an API key or password already configured for the service.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/techysy/10router/zcode-usage-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add techysy/10router --skill zcode-usage-sync
Clone the repo
git clone --depth 1 https://github.com/techysy/10router

Made for: Claude Code, Codex.

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 zcode-usage-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/techysy/10router/zcode-usage-sync/github.svg)](https://agentmods.dev/skills/techysy/10router/zcode-usage-sync)
Your own site
<a href="https://agentmods.dev/skills/techysy/10router/zcode-usage-sync"><img src="https://agentmods.dev/badge/skills/techysy/10router/zcode-usage-sync/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 zcode-usage-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/techysy/10router/zcode-usage-sync"><img src="https://agentmods.dev/badge/skills/techysy/10router/zcode-usage-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,917 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 17
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00186 $0.02917
Opus 5 $0.00093 $0.01458
Sonnet 5 $0.00037 $0.00583
Haiku 4.5 $0.00019 $0.00292

Measured yesterday against content hash a74c27d12047, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-17, from the pricing page.

Security

Grade A, and why

zcode-usage-sync 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 yesterday.

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.

zcode-plugin/skills/zcode-usage-sync/SKILL.md · 204 lines

How it starts

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

Usage Sync → 10Router

Export this machine's ZCode or OpenCode or mirasim or Xiaomi MiMo model-usage ledger — or another 10Router/9Router instance's own database — into 10Router's usage statistics.

Preconditions (check before running)

  1. 10Router endpoint — default http://127.0.0.1:20127. If the user runs 10Router elsewhere (NAS, LAN), ask or infer from context. For a NAS/remote instance use its address, e.g. http://192.168.31.101:20127. (Online modes only — --export needs neither endpoint nor credentials.)
  2. Source--source zcode (default), --source opencode (opencode.ai desktop app), --source mirasim (mirasim desktop insights ledger), --source mimo (Xiaomi MiMo desktop / mimocode), or --source 10r (another 10Router/9Router instance's data.sqlite; aliases 10router / 9r / 9router). None but zcode is auto-detected — pass the flag explicitly.
  3. Credential (one of)
    • Virtual key (recommended): created in 10Router dashboard → API Keys, format sk-…. Pass via --key.
    • Dashboard password: pass via --password.
    • The script also reads env vars TENROUTER_ENDPOINT / TENROUTER_KEY / TENROUTER_PASSWORD.
  4. Never ask the user to paste credentials into chat if they already configured them; prefer env/config over interactive prompts.

Run

Choose the mode first: if this machine can reach the 10Router endpoint (same LAN / localhost / tunnel), sync online. If it cannot (different network, no route to the instance), export offline instead — write a JSON file here, the user carries it to any machine that can reach 10Router, and imports there.

Online (direct)

Dry-run first (shows row counts per provider, imports nothing):

node "$ZCODE_PLUGIN_ROOT/scripts/export-usage.mjs" --endpoint <URL> --key <sk-…> --dry-run

Then import:

node "$ZCODE_PLUGIN_ROOT/scripts/export-usage.mjs" --endpoint <URL> --key <sk-…>

OpenCode (opencode.ai desktop)

OpenCode stores usage in ~/.local/share/opencode/opencode.db (Linux/macOS) or %LOCALAPPDATA%\opencode\opencode.db (Windows). Use --source opencode:

Read the full file on GitHub · 204 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. yesterday Changed · +94 lines · +73 tokens per session a74c27d12047
  2. 7d ago Changed · +20 lines · +17 tokens per session 018ab4a0cbd8
  3. 9d ago Changed · +17 lines · +16 tokens per session 210e714f68db
  4. 10d ago Changed · +24 lines 20cf842332f0
  5. 11d ago First seen · 49 lines · 80 tokens per session scan A d40b5cccd743

Subscribe to this mod's changes

zcode-usage-sync is a skill published in the GitHub repository techysy/10router (31 stars, last pushed yesterday), licensed MIT. It adds 186 tokens to every session and 2,917 once invoked, about $0.0009 per session on Opus 5. 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-09-06.

Related

Other skills, from other repositories

keirouter

Entry point for KeiRouter — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions KeiRouter, KEIROUTERURL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant…

mydisha/keirouter · 82 tokens

keirouter-chat

Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through KeiRouter.

mydisha/keirouter · 62 tokens

keirouter-web-search

Web search via KeiRouter /v1/search using Tavily / Exa / Brave / Serper / SearXNG / Google PSE / Perplexity. Use when the user wants to search the web, look up information, find articles, or query a search engine.

mydisha/keirouter · 63 tokens

keirouter-embeddings

Generate vector embeddings via KeiRouter /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

mydisha/keirouter · 63 tokens

keirouter-image

Generate images via KeiRouter /v1/images/generations using OpenAI DALL-E / Gemini Imagen / FLUX / MiniMax / Stability AI / Fal.ai models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img).

mydisha/keirouter · 68 tokens

keirouter-stt

Speech-to-text via KeiRouter /v1/audio/transcriptions using OpenAI Whisper / Groq / Gemini / Deepgram / AssemblyAI models. Use when the user wants to transcribe audio, convert speech to text, or get subtitles from audio files.

mydisha/keirouter · 57 tokens