kyoko-instrument

kyoko-instrument is a skill for Claude Code from kayba-ai/Kyoko. It costs 22 tokens per session (2,209 once invoked), scanned A, original, Apache-2.0.

A setup and verification guide for sending telemetry from an AI agent to Kyoko, a local system for recording and inspecting agent runs.

In plain words
What is it for?
Use it to instrument an agent entry point, send a minimal run through Kyoko's documented ingestion paths, verify the run arrived, and then add more tracing.
Why use it?
It helps prove that one real agent run was captured and received, without assuming undocumented endpoints or changing more code than necessary.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: built for openclaw.

Good fit Use it to instrument an agent entry point, send a minimal run through Kyoko's documented ingestion paths, verify the run arrived, and then add more tracing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kayba-ai/kyoko/kyoko-instrument
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.

Any agent
npx skills add kayba-ai/Kyoko --skill kyoko-instrument
Clone the repo
git clone --depth 1 https://github.com/kayba-ai/Kyoko

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 kyoko-instrument

README.md
[![agentmods](https://agentmods.dev/badge/skills/kayba-ai/kyoko/kyoko-instrument/github.svg)](https://agentmods.dev/skills/kayba-ai/kyoko/kyoko-instrument)
Your own site
<a href="https://agentmods.dev/skills/kayba-ai/kyoko/kyoko-instrument"><img src="https://agentmods.dev/badge/skills/kayba-ai/kyoko/kyoko-instrument/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 kyoko-instrument

Your own site · 80×15
<a href="https://agentmods.dev/skills/kayba-ai/kyoko/kyoko-instrument"><img src="https://agentmods.dev/badge/skills/kayba-ai/kyoko/kyoko-instrument.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,209 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.
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.00022 $0.02209
Opus 5 $0.00011 $0.01104
Sonnet 5 $0.00004 $0.00442
Haiku 4.5 $0.00002 $0.00221

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

Security

Grade A, and why

kyoko-instrument 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 11d 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.

kyoko/assets/skills/kyoko-instrument/SKILL.md · 203 lines

How it starts

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

You are helping instrument an AI agent so its next meaningful run shows up in Kyoko. Kyoko is a local-first repair loop: the user's agent runs the workflow, a recorder captures the run/spans, and Kyoko ingests that telemetry so it can be inspected, diagnosed, and improved. Kyoko does not run the agent.

Your job is to get one real run into Kyoko with the smallest safe change, verify it actually landed, and only then enrich it. Use Kyoko's documented ingest paths. Do not invent endpoints or SDK calls.

Core Rules

  • Give visible progress. Say what phase you are in, what you found, and what you are about to edit. One or two sentences per update.
  • Before editing any file, tell the user the intended change and how risky it is.
  • Instrument one real agent entry point first. If several are plausible, ask which one should appear in Kyoko.
  • Get a minimal run in first, then enrich. Do not trace every helper before a basic run lands.
  • Prefer the offline file path for the first run (see below). It needs no running server, so it is the most reliable way to prove the pipe works.
  • Verification is required. Success means Kyoko shows a real run, not just that the SDK imported.

Mental Model: How A Run Gets Into Kyoko

A useful Kyoko run shows the input that triggered the agent, the final output or error, the model call, and the real tool executions.

There is one canonical shape and two ways to deliver it:

  1. Record with KyokoRecorder: open a run, open spans for model/tool calls, finish them. This produces a kyoko.source_events.v1 payload.
  2. Deliver that payload one of two ways:
    • Offline file (preferred for first run): write it to a JSON file and run kyoko ingest. This writes straight to the SQLite database and needs no running server. It cannot fail because a viewer is down.
    • Live HTTP: KyokoClient().ingest(...) POSTs to a running kyoko serve. This is best-effort by default: if the server is not up it warns and drops the telemetry rather than crashing the agent. Use it once kyoko serve is confirmed running and you want runs to appear live.

Read the full file on GitHub · 203 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. 11d ago First seen · 203 lines · 22 tokens per session scan A 53bba3272d5c

Subscribe to this mod's changes

kyoko-instrument is a skill published in the GitHub repository kayba-ai/Kyoko (97 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 2,209 once invoked, about $0.0001 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.