Kokoro-Engine CLAUDE.md

Kokoro-Engine CLAUDE.md is an instructions file for coding agents from chyinan/Kokoro-Engine. It costs 4,903 tokens per session, scanned A, original, MIT.

Project instructions for Kokoro Engine, a cross-platform desktop application built with Tauri, React, TypeScript, and Rust. They describe the project's commit rules, commands, structure, and testing practices.

In plain words
What is it for?
Use them when installing dependencies, running the app, building releases, running frontend or Rust tests, checking types, or applying the project's Git conventions.
Why use it?
They give a coding agent the repository-specific rules and commands needed to make consistent changes and check the result.

Instructions file

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.

agentmods
npx agentmods add instructions/chyinan/kokoro-engine/claude-md
Clone the repo
git clone --depth 1 https://github.com/chyinan/Kokoro-Engine

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 Kokoro-Engine CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/chyinan/kokoro-engine/claude-md.svg)](https://agentmods.dev/instructions/chyinan/kokoro-engine/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/chyinan/kokoro-engine/claude-md"><img src="https://agentmods.dev/badge/instructions/chyinan/kokoro-engine/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,903 This file is loaded in full into every session.
When invoked 4,903 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.04903 $0.04903
Opus 5 $0.02452 $0.02452
Sonnet 5 $0.00981 $0.00981
Haiku 4.5 $0.00490 $0.00490

Measured 5d ago against content hash a673a49f0bf2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

Kokoro-Engine CLAUDE.md 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 5d 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.md · 503 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Git 规范

  • Commit 信息必须使用英文,便于国际开发者协作
  • Commit 格式遵循 Conventional Commits:type: description(如 feat: add voice interrupt supportfix: resolve TTS cache invalidation
  • Commit之后请自动推送到GitHub

项目概述

Kokoro Engine 是一个基于 Tauri v2 的跨平台桌面虚拟角色沉浸交互引擎。前端使用 React + TypeScript,后端使用 Rust。整合了 Live2D、LLM、TTS、STT、Vision、ImageGen、MCP 等多种 AI 能力,并通过 MOD 系统支持 UI 和功能扩展。

常用命令

# 安装依赖
npm install

# 启动开发环境(前端 + Tauri 后端)
npm run tauri dev

# 构建发行版
npm run tauri build

# 前端测试(Vitest)
npm run test

# 运行单个前端测试文件
npx vitest run src/ui/mods/ModMessageBus.test.ts

# 后端测试(Rust)
cd src-tauri && cargo test

# 运行单个后端测试
cd src-tauri && cargo test test_name

# 前端类型检查
npx tsc --noEmit

# Rust 编译检查
cd src-tauri && cargo check

# Rust lint
cd src-tauri && cargo clippy

架构

双层架构,通过 Tauri IPC 通信:

Frontend (React + TS)  ←→  kokoro-bridge.ts (Typed IPC)  ←→  Backend (Rust/Tauri)

前端 (src/)

  • core/ — 服务初始化、单例服务实例、共享类型定义
  • features/live2d/ — Live2D 渲染(PixiJS 6 + Cubism SDK),包含表情驱动、口型同步、动作控制
  • ui/layout/ — 声明式布局引擎,JSON 配置驱动的 grid/layer/component 树
  • ui/registry/ — 组件注册表(单例模式),按名称注册和解析组件,支持 MOD 注入
  • ui/theme/ — 主题系统,CSS 变量注入,支持 MOD 主题覆盖
  • ui/mods/ — MOD UI 组件,iframe 沙箱通信
  • lib/kokoro-bridge.ts — 所有 Tauri IPC 调用的类型化封装层,是前后端通信的唯一入口

后端 (src-tauri/src/)

  • commands/ — 20 个 IPC 命令处理模块(chat、tts、stt、llm、vision、imagegen、mcp、mods、telegram 等)
  • ai/ — AI 编排器:上下文管理(context.rs)、情感系统(emotion.rs,持久化)、记忆系统(memory.rs)、自主行为(好奇心、主动发言、闲置动作)
  • llm/ — LLM 适配器(OpenAI 兼容接口、Ollama),支持多 Provider + 预设切换、Fast/Smart/Cheap 模型路由
  • tts/ — TTS 服务,6 个提供商(GPT-SoVITS、VITS、OpenAI、Azure、ElevenLabs、Browser TTS),trait 化插件架构
  • stt/ — 语音识别(Whisper、OpenAI)
  • vision/ — 屏幕截图 + VLM 分析(xcap 截图,像素差异检测)
  • imagegen/ — 图片生成(Stable Diffusion WebUI、OpenAI DALL-E、Google Gemini)
  • mcp/ — Model Context Protocol 客户端(stdio + Streamable HTTP 传输,JSON-RPC 2.0)
  • mods/ — MOD 系统:manifest 解析、mod:// 协议、QuickJS (ES2020) 脚本沙箱
  • telegram/ — Telegram Bot 远程交互(teloxide 长轮询,Chat ID 白名单,文字/语音/图片消息桥接)
  • actions/ — 动作注册表,用于 LLM tool calling

Read the full file on GitHub · 503 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. 5d ago First seen · 503 lines · 4,903 tokens per session scan A a673a49f0bf2

Subscribe to this mod's changes

Kokoro-Engine CLAUDE.md is an instructions file published in the GitHub repository chyinan/Kokoro-Engine (144 stars, last pushed 2d ago), licensed MIT. It adds 4,903 tokens to every session, about $0.0245 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.