Koma · Miko

Required Skill checks for Claude Code and Codex CLI. Start with Miko's recovery replay; explore Gate, Scout, and Core for AI application checks.
GitHub ↗

Try to sneak a bad prompt past Gate.

Choose an assistant scene, load an example or write your own prompt, then see the verdict Gate returns before your application calls its model.

Install Gate

Guard an LLM endpoint

Open the setup guide ↗
npm install koma-gate

Use it before your application model call. Express and Fastify examples are in the guide.

Try a prompt

0 / 1000 chars — oversized pastes are rejected before they reach the server.
Your prompt is sent to the configured classifier provider to produce a verdict. It is not saved by default. If you explicitly share a wrong verdict, Koma stores only the prompt for up to 30 days — not the scene, verdict, account, or network details. Do not submit personal data or secrets. Privacy details ↗
Load a passing example
Load a blocked example
Write your own injection and see if it slips through — that's the point. Runs the real koma-gate classifier.
Found a wrong verdict? Report it ↗

Verdict

Waiting for input
Enter a prompt on the left, then classify it.

Stop bad voice uploads before they burn an AI call.

Pick a real failure mode. Scout checks the cheap request boundary first, then either blocks immediately or hands the request to your expensive transcription and LLM pipeline.

Install Scout

Protect a voice or upload boundary

Open the setup guide ↗
npm install koma-scout

Add it before transcription, file parsing, or any other expensive downstream work.

Select a request
voice-api — request boundary ● Scout attached

Let a scraper steal the whole index—and still get zero content.

Core separates searchable metadata from protected payloads. Run the attack first, then compare it with the legitimate backend path that can derive the missing content address.

Install Core

Separate search from protected content

Open the setup guide ↗
npm install koma-core

Keep token derivation and protected payload retrieval on your backend.

Select a path
scraper — public network ● Core online
Miko logo

Claude skipped a required Skill. Miko pauses the edit.

You ask Claude to change a UI. It tries to write before loading your design Skill. Miko blocks the write, tells Claude exactly what is missing, and lets it retry—inside the CLI you already use.

Install Miko · Alpha

Start with Claude Code

Codex CLI setup · Technical Preview ↗
npm install -D koma-miko@alpha
npx koma-miko init --host claude

Run in the project root. Edit the generated miko.json to name existing Skills and protected paths, then start a new Claude Code session. Miko does not install Skills.

Codex requires a one-time /hooks review in the CLI. Codex Desktop requires prior CLI activation; installation alone does not enable checks.

claude — ~/my-app ● Miko attached

Questions before you add Koma.

A short, honest FAQ for people shipping their first AI feature and engineers deciding whether these boundaries belong in production. / 给第一次做 AI 功能的人,也给正在判断这些边界能否进入生产环境的工程师。

For vibe coders 给 Vibe Coders Pick the right package, understand the demo, and know the trade-offs. / 选对包、看懂 Demo、知道代价。

Which Koma package should I try first?我应该先试哪个 Koma 包?

If you use Claude Code or Codex CLI and keep checking whether required Skills were read, start with Miko. For AI application code, Gate checks prompt scope, Scout checks request and audio limits, and Core separates search metadata from protected content. Each package works alone.

如果你使用 Claude Code 或 Codex CLI,总要确认 agent 是否读过必需 Skill,可以先试 Miko。对于 AI 应用,Gate 检查 Prompt 范围,Scout 检查请求与音频限制,Core 分离搜索元数据和受保护正文。各包独立使用。

Which hosts should I use with Miko?Miko 目前主推哪些宿主?

Claude Code is the primary alpha workflow. Codex CLI is a Technical Preview: review and trust Miko's project Hooks, run a turn, then check with npx koma-miko doctor --host codex --strict. Codex Desktop requires prior CLI activation. Gemini is outside active development; Copilot adapter work is paused. See current host support.

Claude Code 是主要 alpha 路径。Codex CLI 属于 Technical Preview:先审阅并信任 Miko 项目 Hooks、运行一个任务,再用 npx koma-miko doctor --host codex --strict 检查。Codex Desktop 必须先通过 CLI 激活。Gemini 移出主动开发;Copilot 适配开发暂停。

What does this live demo send or save?这个在线 Demo 会发送或保存什么?

Gate sends your prompt to the configured classifier, but saves nothing by default. A wrong-verdict prompt is stored for up to 30 days only after you explicitly opt in. Scout sends simulated metadata, Miko replays privacy-minimized verifier events, and Core uses seeded demo documents. Never paste secrets.

Gate 会把 Prompt 发给已配置的分类模型,但默认不保存。只有你明确同意提交错误判定时,该 Prompt 才会最多保留 30 天。Scout 发送模拟元数据,Miko 回放经过隐私最小化的验证事件,Core 使用预置演示文档。请勿粘贴秘密信息。查看隐私说明 ↗

Will Miko use more tokens?Miko 会增加 Token 消耗吗?

Sometimes. Local verification and the ledger use no model tokens, and a clean ALLOW path adds little or no agent context. A DENY, Skill reload, or retry costs tokens—but may save much more by preventing a wrong implementation. Koma does not yet claim measured token savings.

有时会。本地验证和账本不消耗模型 Token,正常放行几乎不增加 Agent 上下文;但 DENY、重载 Skill 和重试会产生消耗。它的目标是用可控开销避免更昂贵的错误实现与返工。目前 Koma 不宣称已经实测能够节省 Token。

For experienced engineers 给职业开发者 Inspect determinism, trust boundaries, and production caveats. / 看确定性、信任边界与生产注意事项。

Which parts are deterministic, and which still depend on a model?哪些部分是确定性的,哪些仍依赖模型?

Gate's semantic verdict depends on the configured LLM. Scout's demo boundary checks, Core's split-store/token derivation, and Miko's contract verification are deterministic once configured. External geo providers, CI evidence, storage, and host adapters remain operational dependencies.

Gate 的语义判定依赖已配置的 LLM。Scout Demo 的边界检查、Core 的分离存储与 Token 派生、Miko 的契约验证在配置确定后都是确定性的。外部地理位置服务、CI 证据、存储层和宿主适配器仍属于运行依赖。

Can Miko prove that an agent understood or obeyed a Skill?Miko 能证明 Agent 理解并遵守了 Skill 吗?

No. Miko can block observable tool boundaries when the host supports hooks, record Skill/Read/test events, and distinguish asserted evidence from observed or external evidence. It cannot inspect hidden model state, prove comprehension, or protect a path that bypasses the adapter.

不能。宿主支持 Hook 时,Miko 可以阻断可观察的工具边界,记录 Skill、Read、测试等事件,并区分 Agent 自述与真实观察/外部证据;但它无法查看模型隐藏状态、证明模型真正理解,也无法保护绕过适配器的路径。

What should I verify before using Koma in production?在生产环境使用 Koma 前应该确认什么?

Evaluate packages independently against your threat model. Choose fail-open or fail-closed behavior deliberately; test the real host adapter; use durable rate limits, storage, and key management; and exercise bypass and outage cases. The in-memory stores and scripted fixtures in this demo are demonstrations, not a production architecture.

请按你的威胁模型分别评估每个包;明确选择 fail-open 或 fail-closed;测试真实宿主适配器;使用持久化的限流、存储和密钥管理;并覆盖绕过与故障场景。本 Demo 的内存存储和脚本化 fixture 只是展示,不是生产架构。