Kokoro-FastAPI: Skill for Claude Code

.claude/skills/readme-benchmarks/SKILL.md

readme-benchmarks is a skill for Claude Code from remsky/Kokoro-FastAPI. It costs 52 tokens per session (1,753 once invoked), scanned A, original, Apache-2.0.

Instructions for running Kokoro-FastAPI speech benchmarks and transcription checks, then updating the performance charts in the README.

In plain words
What is it for?
Use them to measure processing speed, first-token delay, transcription error rates, speaker-dialogue behavior, and long-form performance.
Why use it?
They document the required server, environment, warm-up, and working-directory setup so benchmark results are less likely to be misleading.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is remsky/Kokoro-FastAPI's own configuration. It tells Claude Code how to work on Kokoro-FastAPI 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 Kokoro-FastAPI configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is KOKORO_DEVICE=gpu uv run python assorted_checks/test_transcription/test_transcription.py.

About the project

Kokoro-FastAPI is a Dockerized FastAPI service that turns text into speech using the Kokoro-82M model through an OpenAI-compatible API. It is used by developers and self-hosters who need multilingual, multi-speaker speech generation, captions, phonemes, or an optional web interface.

remsky/Kokoro-FastAPI · 5,414 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to remsky/Kokoro-FastAPI. 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/remsky/Kokoro-FastAPI/master/.claude/skills/readme-benchmarks/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/remsky/Kokoro-FastAPI

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 readme-benchmarks

README.md
[![agentmods](https://agentmods.dev/badge/skills/remsky/kokoro-fastapi/readme-benchmarks.svg)](https://agentmods.dev/skills/remsky/kokoro-fastapi/readme-benchmarks)
Your own site
<a href="https://agentmods.dev/skills/remsky/kokoro-fastapi/readme-benchmarks"><img src="https://agentmods.dev/badge/skills/remsky/kokoro-fastapi/readme-benchmarks.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,753 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 pass 7 Sept 2026
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.00052 $0.01753
Opus 5 $0.00026 $0.00877
Sonnet 5 $0.00010 $0.00351
Haiku 4.5 $0.00005 $0.00175

Measured 8d ago against content hash 20440e309fbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

readme-benchmarks 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 8d 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/skills/readme-benchmarks/SKILL.md · 92 lines

How it starts

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

Benchmarks + README plots

Three suites under examples/assorted_checks/ feed the README:

  • test_transcription/ - synth with a running server, transcribe with faster-whisper, report WER/CER. Short, multilingual, and long-form.
  • benchmarks/ - RTF (processing time vs tokens) and first-token latency/timeline plots. These feed the README performance images.
  • test_dialogue/ - multi-speaker functional checks plus the turn-length / text-length throughput sweeps. Run commands and flags live in test_dialogue/README.md; bench then plot with plot_dialogue_bench.py.

Prereqs

  • A Kokoro server on :8880. GPU and CPU docker images both bind 8880, so swap images, never run both. Set KOKORO_DEVICE / BENCH_PREFIX to match whichever is up.
  • Warm the server first. cuDNN autotune cold-start inflates the first GPU run (heavy voices ~1.2s vs ~0.3s warm). Hit a couple voices (e.g. af_heart, zf_xiaobei) before capturing, or discard the first pass.
  • examples/ has its own uv venv. Run everything from inside examples/ (cd examples), not the root .venv. The first-token script also needs examples/ as cwd for its audio path.
cd examples
uv sync --extra transcription --extra transcription-gpu --extra benchmarks

Drop --extra transcription-gpu to skip the ~1.2 GB cuDNN/cuBLAS download and transcribe on CPU.

Run (from examples/)

# short English per-voice sanity (base.en, WER)
KOKORO_DEVICE=gpu uv run python assorted_checks/test_transcription/test_transcription.py

# multilingual (small model, CER for ja/zh)
KOKORO_DEVICE=gpu uv run python assorted_checks/test_transcription/test_transcription_multilingual.py

# long-form book roundtrip (the baseline). see BASELINE.md
LONGFORM_CHARS=65000 WHISPER_DEVICE=cuda KOKORO_DEVICE=gpu \
  uv run python assorted_checks/test_transcription/test_long_form.py

# RTF plots
BENCH_PREFIX=gpu uv run python assorted_checks/benchmarks/benchmark_tts_rtf.py

# first-token latency/timeline plots
BENCH_PREFIX=gpu uv run python assorted_checks/benchmarks/benchmark_first_token_stream_unified.py

Read the full file on GitHub · 92 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. 8d ago First seen · 92 lines · 52 tokens per session scan A 20440e309fbb

Subscribe to this mod's changes

readme-benchmarks is a skill published in the GitHub repository remsky/Kokoro-FastAPI (5,414 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 1,753 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

voice-tts

Text-to-speech output for voice responses. Uses pyttsx3 for local TTS on supported systems.

AP3X-Dev/AG3NT · 26 tokens

torchforge-rl-training

Provides guidance for PyTorch-native agentic RL using torchforge, Meta's library separating infra from algorithms. Use when you want clean RL abstractions, easy algorithm experimentation, or scalable training with Monarch and TorchTitan.

davila7/claude-code-templates · 49 tokens

datamodel-code-generator

Use this skill when the user wants Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI, JSON Schema, GraphQL, JSON/YAML/CSV sample data, MCP tool schemas, Protocol Buffers, XML Schema, Apache Avro, or existing Python model objects.…

koxudaxi/datamodel-code-generator · 147 tokens

experiment-tracking-swanlab

Provides guidance for experiment tracking with SwanLab. Use when you need open-source run tracking, local or self-hosted dashboards, and lightweight media logging for ML workflows.

Orchestra-Research/AI-Research-SKILLs · 40 tokens

video-script

A Chinese-language video editing and narration workflow that plans the story, selects clips, assigns visuals and sound, writes timestamped narration, and validates the result.

zenstory-ai/video-recap-skills · 154 tokens

oss-maintainer

Run an open-source project's issue/PR/release loop like a careful human maintainer — triage to root cause, absorb community PRs before duplicating them, gate every merge, ship honest releases, and thank the people doing your QA for free.

debpalash/VoiceStudio · 55 tokens