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.
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.
curl -O https://raw.githubusercontent.com/remsky/Kokoro-FastAPI/master/.claude/skills/integration-tests/SKILL.mdgit clone --depth 1 https://github.com/remsky/Kokoro-FastAPIWrote 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.
[](https://agentmods.dev/skills/remsky/kokoro-fastapi/integration-tests)<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.
<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>- NVIDIA SkillSpector warn
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
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.
| Model | Per session | Once 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 |
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.
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 durationstest_tts_roundtrip.py- synth + Whisper transcribe, 10 voice/language cases across 8 languages, WER/CER thresholds, plus an unpunctuated long runtest_voices_endpoint.py- voice listing shape, legacy compat, nova mapping
19 tests total. The roundtrip tests need ~30s (Whisper inference is the bottleneck).
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.
- 1mo ago Changed · -2 lines f9945f00a529
- 1mo ago Changed · +2 lines 9a2aa3bad59b
- 2mo ago First seen · 38 lines · 25 tokens per session scan A 4c76b59c2f44
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.
Other skills, from other repositories
test-writer
Generate comprehensive tests including unit, integration, and property-based tests.
uat-testing
Run end-to-end User Acceptance Tests for Agent Brain features. Builds wheels, installs packages, starts a test server, runs tests, and reports results — all without permission prompts.
测试基础设施
A set of scripts that supports end-to-end testing, which checks a complete workflow across its connected parts. The scripts capture selected log messages, compare database snapshots, and record and verify notifications or other side effects.
react-testing
Frontend testing standards using Vitest, React Testing Library, and Playwright. Use when writing UI tests.
test-generation
Generate a test strategy and starter test stubs for given modules across unit, integration, and e2e layers (pytest/jest/playwright). Trigger on: generate tests, test plan, test strategy, coverage plan, test scaffolding.
FastAPI Testing Patterns
FastAPI application testing with TestClient, dependency injection overrides, async testing, database testing with SQLAlchemy, and OpenAPI validation.