Kokoro-FastAPI: Skill for Claude Code

.claude/skills/integration-tests/SKILL.md

integration-tests is a skill for Claude Code from remsky/Kokoro-FastAPI. It costs 25 tokens per session (414 once invoked), scanned A, original, Apache-2.0.

A test suite for a Kokoro text-to-speech server. It checks speech generation, audio transcription with Whisper, voice listings, language behavior, and rate-related durations.

In plain words
What is it for?
It is for running unit and integration tests against a Kokoro server, including nine-language speech round trips and voice-endpoint compatibility checks.
Why use it?
It verifies the live service end to end, including whether generated audio can be transcribed correctly, instead of checking only isolated code units.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

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 →

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,614 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/integration-tests/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 integration-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/remsky/kokoro-fastapi/integration-tests/github.svg)](https://agentmods.dev/skills/remsky/kokoro-fastapi/integration-tests)
Your own site
<a href="https://agentmods.dev/skills/remsky/kokoro-fastapi/integration-tests"><img src="https://agentmods.dev/badge/skills/remsky/kokoro-fastapi/integration-tests/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 integration-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/remsky/kokoro-fastapi/integration-tests"><img src="https://agentmods.dev/badge/skills/remsky/kokoro-fastapi/integration-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 414 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: 2 findings, up to high

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 →

  • high Privilege Escalation · line 20
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • medium MCP Rug Pull · line 20
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
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.00025 $0.00414
Opus 5.5 $0.00010 $0.00166
Sonnet 5.5 $0.00005 $0.00083
Haiku 4.5 $0.00003 $0.00041

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

Security

Grade A, and why

integration-tests 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 1mo 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/integration-tests/SKILL.md · 38 lines

What it actually says

Read AGENTS.md and CONTRIBUTING.md first, house rules live there.

Integration tests

Prerequisites

A running Kokoro server (GPU or CPU container) on port 8880.

Running

Unit tests (no server needed):

uv run pytest

Integration tests use the prebuilt test-client image with Whisper baked in. Mount the test directory and point at the running server:

docker run --rm --network host       -v "$PWD/api/tests/integration:/tests/integration:ro"       -e KOKORO_BASE_URL=http://localhost:8880       -e WHISPER_MODEL=/opt/whisper/small       ghcr.io/remsky/tts-api-test-client:latest

--network host is Linux only. On Docker Desktop drop it, use -e KOKORO_BASE_URL=http://host.docker.internal:8880, and mount with an absolute C:/... path. Restart a hot-mounted server container first, the Python process only loads code at start.

Or the full compose stack (builds a CPU server + test-client, self-contained):

docker compose -f docker/docker-compose.test.yml up --build ^
  --abort-on-container-exit --exit-code-from test-client

What runs

  • test_rate_durations.py - speed/rate tag scaling against real audio durations
  • test_tts_roundtrip.py - synth + Whisper transcribe, 10 voice/language cases across 8 languages, WER/CER thresholds, plus an unpunctuated long run
  • test_voices_endpoint.py - voice listing shape, legacy compat, nova mapping

19 tests total. The roundtrip tests need ~30s (Whisper inference is the bottleneck).

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. 1mo ago Changed · -2 lines f9945f00a529
  2. 1mo ago Changed · +2 lines 9a2aa3bad59b
  3. 2mo ago First seen · 38 lines · 25 tokens per session scan A 4c76b59c2f44

Subscribe to this mod's changes

integration-tests is a skill published in the GitHub repository remsky/Kokoro-FastAPI (5,614 stars, last pushed today), licensed Apache-2.0. It adds 25 tokens to every session and 414 once invoked, about $0.0001 per session on Opus 5.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.