Agent skill

Kkrpc Migration

by kunkunsh in kunkunsh/kkrpc

A skill your agent uses when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/IO adapters, next entries, validation/interceptor options, transport imports…

MITAuto-check passedBackend & APIs

Install Kkrpc Migration

skills CLI
$ npx skills add kunkunsh/kkrpc --skill kkrpc-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kunkunsh/kkrpc kkrpc-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kunkunsh/kkrpc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kkrpc-migration .claude/skills/kkrpc-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kkrpc-migration
GitHub stars
174
Token cost
~2.7k tokens
SKILL.md length
732 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/IO adapters, next entries, validation/interceptor options, transport imports…

  • Works in 8 steps: Inspect package versions and imports. → Search for old API usage. → Replace package entries and transport… → …
  • Migrating kkrpc projects across breaking stable API changes
  • SKILL.md covers Migration Workflow, Search Patterns, Entry Mapping and Core API Patterns, plus 8 more sections
  • Calls rg and pnpm

What it does

Kkrpc Migration is an agent skill from kunkunsh/kkrpc. Use when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/IO adapters, next entries, validation/interceptor options, transport imports, or opt-in streaming/remote-reference entries.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Migrates kkrpc 0.7.x and temporary vNext code to kkrpc 1.0 stable APIs.

It sits in Backend & APIs, covering Realtime and WebSockets. It works with Hono and Chrome Extensions. The repository describes itself as: A TypeScript RPC protocol for multiple environments (iframe, web worker, stdio, http, WebSocket). The licence is MIT.

When your agent uses it

  • Migrating kkrpc projects across breaking stable API changes
  • Replacing classic IoInterface/IO adapters
  • Validation/interceptor options
  • Transport imports

Example prompts

  • “/kkrpc-migration”

Requirements

  • Compatibility (from SKILL.md): Migrates kkrpc 0.7.x and temporary vNext code to kkrpc 1.0 stable APIs.

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Inspect package versions and imports.
  2. Search for old API usage.
  3. Replace package entries and transport imports.
  4. Replace channel setup with wrap(), expose(), or native RPCChannel.
  5. Replace classic IO adapters with native transport factories.
  6. Replace validation and middleware options with plugins.
  7. Move SuperJSON to explicit codec composition.
  8. Run type checks, tests, and old-API searches.

What it can do on your machine

Read from SKILL.md and the folder at commit e558873. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Migrates kkrpc 0.7.x and temporary vNext code to kkrpc 1.0 stable APIs.

    From compatibility in the SKILL.md frontmatter.

Context cost

Kkrpc Migration loads about 2.7k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 732 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kunkunsh/kkrpc at commit e558873, republished under its MIT licence (© kunkunsh). 732 words, ~2,727 tokens.

Download SKILL.mdSave it as .claude/skills/kkrpc-migration/SKILL.md (or your agent's skills folder).
name
kkrpc-migration
description
Use when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/*IO adapters, next entries, validation/interceptor options, transport imports, or opt-in streaming/remote-reference entries.
compatibility
Migrates kkrpc 0.7.x and temporary vNext code to kkrpc 1.0 stable APIs.
version
1.0.0
license
MIT
metadata.author
kkrpc
metadata.domain
typescript-rpc
metadata.tags
rpc, migration, typescript, kkrpc, transport

kkrpc 1.0 Migration

Use this skill to migrate applications from kkrpc 0.7.x or temporary kkrpc/next APIs to the stable 1.0 API.

The 1.0 public API is native Transport<RPCMessage> based. Do not preserve the classic IoInterface adapter model, public *IO classes, classic-compat, next/io, browser-lite, browser-mini, or electron-ipc imports.

Canonical user documentation: docs/src/content/docs/guides/migration-1-0.md. For the slim-core feature split, also check docs/src/content/docs/guides/migration-0-1-to-0-2.md.

Migration Workflow

  1. Inspect package versions and imports.
  2. Search for old API usage.
  3. Replace package entries and transport imports.
  4. Replace channel setup with wrap(), expose(), or native RPCChannel.
  5. Replace classic IO adapters with native transport factories.
  6. Replace validation and middleware options with plugins.
  7. Move SuperJSON to explicit codec composition.
  8. Run type checks, tests, and old-API searches.

Search Patterns

Run these searches before editing and again before finishing:

bash
rg 'kkrpc/next|next/io|classic-compat|IoInterface|IoMessage|RPCValidators|kkrpc/browser-lite|kkrpc/browser-mini|kkrpc/electron-ipc'
rg '[A-Za-z0-9_]+IO\b'
rg 'validators\s*:|interceptors\s*:'

The *IO search may find application names. Review matches manually and only migrate kkrpc classic adapter usage.

Entry Mapping

Old importNew import
kkrpc/nextkkrpc
kkrpc/next/transportkkrpc/transport
kkrpc/next/codecskkrpc/codecs
kkrpc/next/pluginskkrpc/plugins
kkrpc/next/validationkkrpc/validation
kkrpc/next/middlewarekkrpc/middleware
kkrpc/next/superjsonkkrpc/superjson
async iterable APIs from kkrpckkrpc/streaming
callback-return/object-handle APIs from kkrpckkrpc/remote-refs
kkrpc/next/workerkkrpc/worker
kkrpc/next/stdiokkrpc/stdio
kkrpc/browser-litekkrpc or kkrpc/browser
kkrpc/browser-minikkrpc or kkrpc/browser
kkrpc/electron-ipckkrpc/electron

Runtime transports must not be imported from the main kkrpc entry. Use explicit subpaths.

Async iterable streaming and request/response remote references must also use explicit subpaths. The default kkrpc entry is the slim request/response core.

Core API Patterns

Client-only proxy

Use wrap() when this side only calls a remote API.

typescript
import { wrap } from "kkrpc"
import { webSocketClientTransport } from "kkrpc/ws"

const api = wrap<RemoteAPI>(webSocketClientTransport({ url: "ws://localhost:3000" }))

If the proxy has a bounded lifetime, dispose it explicitly:

typescript
import { dispose } from "kkrpc"

dispose(api)
Server-only API

Use expose() when this side only publishes a local API.

typescript
import { expose } from "kkrpc"

const controller = expose(localAPI, transport)
controller.dispose()
Bidirectional endpoint

Use native RPCChannel when both sides expose APIs.

typescript
import { RPCChannel } from "kkrpc"

const channel = new RPCChannel<LocalAPI, RemoteAPI>(transport, { expose: localAPI })
const remote = channel.getAPI()
channel.destroy()

The generic order is local API first, remote API second.

Transport Mapping

BoundaryNative 1.0 helper
Web Worker parentworkerTransport() from kkrpc/worker
Web Worker globalworkerSelfTransport() from kkrpc/worker
Node stdionodeStdioTransport() from kkrpc/stdio
Generic stdio JSONstdioJsonTransport() from kkrpc/stdio
HTTP clienthttpClientTransport() from kkrpc/http
HTTP servercreateHttpHandler() from kkrpc/http
WebSocket socketwebSocketTransport() from kkrpc/ws
WebSocket clientwebSocketClientTransport() from kkrpc/ws
Hono WebSocketcreateHonoWebSocketHandler() or honoWebSocketTransport() from kkrpc/ws/hono
Elysia WebSocketcreateElysiaWebSocketHandler() or elysiaWebSocketTransport() from kkrpc/ws/elysia
iframe parentiframeParentTransport() from kkrpc/iframe
iframe childiframeChildTransport() from kkrpc/iframe
Chrome extension portchromePortTransport() from kkrpc/chrome-extension
Electron IPCelectronIpcTransport() from kkrpc/electron
Electron utility processelectronUtilityProcessTransport() or electronUtilityProcessChildTransport() from kkrpc/electron
Tauri shell child processtauriShellStdioTransport() from kkrpc/tauri
Socket.IOsocketIoTransport() from kkrpc/socketio
RabbitMQrabbitMqTransport() from kkrpc/rabbitmq
KafkakafkaTransport() from kkrpc/kafka
Redis StreamsredisStreamsTransport() from kkrpc/redis-streams
NATSnatsTransport() from kkrpc/nats
Show full SKILL.md (325 more words)Show less

HTTP Guardrail

HTTP is unary request/response in 1.0. Do not migrate callback-heavy, subscription, streaming-progress, remote-reference, raw-function, or server-push code to kkrpc/http. Use WebSocket or another evented transport for those boundaries.

When migrating remote references to RabbitMQ, Kafka, Redis Streams, or NATS, configure remotePeerId. Broadcast bus mode is for fan-out messages and does not advertise remote-reference support.

Remote proxies decoded from one channel are not portable across another channel. Replace implicit proxy forwarding with an explicit bridge method if an old design depended on that behavior.

Validation Migration

Replace classic validators options with validationPlugin().

typescript
import { expose } from "kkrpc"
import { validationPlugin } from "kkrpc/validation"

const validators = {
	"math.add": {
		input: argsSchema,
		output: resultSchema
	}
}

expose(api, transport, {
	plugins: [validationPlugin(validators)]
})

If preserving an existing validator map is simpler, pass that map to validationPlugin() instead of rewriting the API around defineMethod().

Middleware Migration

Replace classic interceptors options with middlewarePlugin().

typescript
import { middlewarePlugin, type RPCInterceptor } from "kkrpc/middleware"

const logger: RPCInterceptor = async (ctx, next) => {
	console.log(ctx.method)
	return next()
}

const plugins = [middlewarePlugin([logger])]

Install the plugin through wrap(), expose(), or RPCChannel options.

SuperJSON Migration

SuperJSON is not a core import. Use kkrpc/superjson only where a transport needs richer value encoding.

typescript
import { superJsonCodec } from "kkrpc/superjson"
import { createTransport } from "kkrpc/transport"

const transport = createTransport({ platform, codec: superJsonCodec() })

Transferables

Use transfer() from kkrpc only for transports that support transferable ownership, such as Web Workers.

typescript
import { transfer } from "kkrpc"

await api.process(transfer(buffer, [buffer]))

Do not assume transfer support for HTTP, stdio, or message-bus transports.

Guardrails

  • Do not add backward compatibility aliases for removed public APIs.
  • Do not reintroduce IoInterface, IoMessage, or public *IO classes.
  • Do not import runtime-specific transports from kkrpc.
  • Do not pull optional peers into browser-safe entries.
  • Do not claim HTTP supports callbacks or bidirectional calls.
  • Do not leave async iterable APIs on the default kkrpc entry; use kkrpc/streaming.
  • Do not leave callback-return or object-handle APIs on the default kkrpc entry; use kkrpc/remote-refs and explicit proxy(value) markers.
  • Do not rely on unmarked nested functions crossing by raw identity; kkrpc/remote-refs rejects them.
  • Do not edit generated dist or Typedoc output while migrating this repository.

Verification

For this repository, run:

bash
pnpm --filter kkrpc check-types
pnpm --filter kkrpc test
pnpm --filter "./examples/*" check-types

For downstream projects, run the project type check, unit tests, and at least one integration test for each migrated transport boundary.

Before declaring migration complete, re-run the old API searches and verify that remaining matches are documentation, intentional compatibility notes, or unrelated false positives.

© kunkunsh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/kkrpc-migration of kunkunsh/kkrpc.

Open the folder on GitHubat commit e558873

Compare with similar skills

Kkrpc Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kkrpc Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kkrpc Migration this skillkunkunsh/kkrpc174—~2.7kAutomated safety check: PassMIT
Parchi Relay0xSero/parchi551—~1kAutomated safety check: PassMIT
Fishjam JS Server SDKsoftware-mansion-labs/skills291—~1.4kAutomated safety check: PassMIT
Cloudflare WorkersEpicenterHQ/epicenter4.8k—~576Automated safety check: PassCustom licence
HonoEpicenterHQ/epicenter4.8k—~513Automated safety check: PassCustom licence
Knowledge Interaction Surfaces Hono Server API And StreamingechoVic/blade-code181—~1.7kAutomated safety check: PassMIT

Similar skills

  • Parchi Relay

    0xSero/parchi

    Use Parchi Relay to control a real browser via the Parchi extension agent (WebSocket) or directly via JSON-RPC from a CLI/tooling workflow.

    551 GitHub stars~1k tokensUpdated 22 days ago
    Backend & APIsAuto-check passed
  • Fishjam JS Server SDK

    software-mansion-labs/skills

    Node.js / TypeScript server SDK for Fishjam — backends that create rooms, mint peer tokens, listen to server notifications, and run agents.

    291 GitHub stars~1.4k tokensUpdated 11 days ago
    Backend & APIsAuto-check passed
  • Cloudflare Workers

    EpicenterHQ/epicenter

    Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.

    4.8k GitHub stars~576 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Hono

    EpicenterHQ/epicenter

    Hono patterns for TypeScript API routes, middleware, request and response typing, streaming, WebSockets, and Cloudflare Workers deployment.

    4.8k GitHub stars~513 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • 覆盖 Blade Hono 服务的路由装配、Session/Task 控制器、SSE replay/live 切换、 WebSocket 终端、静态资源、认证、错误映射与资源关闭。进入时机:新增 HTTP API、 修改 Web 事件协议、处理同名 Session、调试断线重连、服务容量或 shutdown。

    181 GitHub stars~1.7k tokensUpdated 12 days ago
    Backend & APIsAuto-check passed
  • Official

    A skill your agent uses when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling…

    6.4k GitHub starsUsed in 7 repos~6.4k tokens
    Testing & QAAuto-check passed

More from kunkunsh/kkrpc

  • Kkrpc

    kunkunsh/kkrpc

    A skill your agent uses when building TypeScript RPC with kkrpc stable APIs, choosing native Transport<RPCMessage adapters, or integrating validation, middleware, transferables, streaming, remote…

    174 GitHub stars~3.1k tokensUpdated 27 days ago
    Auto-check passed
  • Kkrpc Interop

    kunkunsh/kkrpc

    A skill your agent uses when implementing kkrpc clients or servers in non-TypeScript languages, speaking the stable compact protocol, transports, and reference implementations in Go, Python, Rust…

    174 GitHub stars~1.8k tokensUpdated 27 days ago
    Auto-check passed

Categories

Questions about Kkrpc Migration

What does Kkrpc Migration do?

A skill your agent uses when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/IO adapters, next entries, validation/interceptor options, transport imports…. Kkrpc Migration is an agent skill from kunkunsh/kkrpc. Use when migrating kkrpc projects across breaking stable API changes, replacing classic IoInterface/IO adapters, next entries, validation/interceptor options, transport imports, or opt-in streaming/remote-reference entries.

When should I use Kkrpc Migration?

Kkrpc Migration fits situations like: migrating kkrpc projects across breaking stable API changes; replacing classic IoInterface/IO adapters; validation/interceptor options; transport imports.

How do I install Kkrpc Migration in Claude Code?

Run `npx skills add kunkunsh/kkrpc --skill kkrpc-migration -a claude-code`. Or copy the skill folder (skills/kkrpc-migration in kunkunsh/kkrpc) into .claude/skills/kkrpc-migration in your project. Claude Code loads it when a task matches its description.

How do I install Kkrpc Migration in Codex?

Run `npx skills add kunkunsh/kkrpc --skill kkrpc-migration -a codex`. Or copy the skill folder (skills/kkrpc-migration in kunkunsh/kkrpc) into .agents/skills/kkrpc-migration in your project. Codex loads it when a task matches its description.

Can I use Kkrpc Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kunkunsh/kkrpc --skill kkrpc-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kkrpc-migration, .gemini/skills/kkrpc-migration, .github/skills/kkrpc-migration and .opencode/skills/kkrpc-migration in your project.

What does Kkrpc Migration need to run?

Going by SKILL.md and its folder, Kkrpc Migration needs the command-line tools its instructions call (rg and pnpm). Compatibility (from SKILL.md): Migrates kkrpc 0.7.x and temporary vNext code to kkrpc 1.0 stable APIs..

Does Kkrpc Migration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Kkrpc Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kkrpc Migration use?

Kkrpc Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kkrpc Migration use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kkrpc Migration?

Skills that share tags, products or a category with Kkrpc Migration: Parchi Relay (0xSero/parchi, 551 stars), Fishjam JS Server SDK (software-mansion-labs/skills, 291 stars), Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars) and Hono (EpicenterHQ/epicenter, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kkrpc Migration?

kunkunsh (a GitHub organization) maintains it in kunkunsh/kkrpc, which has 174 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 11, 2026.

Source: kunkunsh/kkrpc on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.