Skir: A Modern Alternative to Protocol Buffers for Type-Safe Data Exchange

What Skir Does
Skir is a modern alternative to Protocol Buffers that serves as a single source of truth for data types. You write your schema once in a .skir file and generate idiomatic, type-safe code for multiple languages.
Key Features and Workflow
The entire configuration lives in one YAML file. You can initialize a project with npx skir init. Watch mode automatically recompiles when files change.
Here's an example schema from the source:
struct Point {
x: int32;
y: int32;
label: string;
}
struct Shape {
points: [Point];
/// A short string describing this shape.
label: string;
}
const TOP_RIGHT_CORNER: Point = {
x: 600,
y: 400,
label: "top-right corner",
};
Generated Code Usage
The generated code includes serialization and deserialization methods. For TypeScript:
import { Point } from "../skirout/shapes";
const point = Point.create({
x: 3,
y: 4,
label: "P"
});
const pointJson = Point.serializer.toJson(point);
console.log(pointJson); // [3, 4, "P"]
const restored = Point.serializer.fromJson(pointJson);
console.log(restored.label); // "P"
Schema Evolution and RPC Support
Skir includes built-in checks and guidelines for safe schema evolution in long-lived or distributed systems. It also supports RPCs with end-to-end type safety similar to gRPC.
Example RPC definition:
struct WhatToWearRequest {
temperature_celsius: float32;
raining: bool;
}
struct WhatToWearResponse {
bottom_outfit: string;
sunglasses: bool;
}
method WhatToWear(WhatToWearRequest): WhatToWearResponse = 770862;
Additional Features
- Serialization to dense JSON (compact, allows schema evolution), readable JSON (for debugging), or binary (for performance)
- Built-in package manager that imports types directly from GitHub repositories
- VS Code extension with real-time validation, code completion, and automatic formatting
- Supported languages: TypeScript, Python, C++, Java, Kotlin, Dart
Who It's For
Teams running mixed-language stacks who need type-safe data exchange between services, particularly useful for full-stack applications with different frontend and backend languages.
📖 Read the full source: HN AI Agents
👀 See Also

Developer Builds Native tmux Port for Windows Using Claude Code Without Knowing C
A developer created tmux-win, a native Windows multiplexer using Claude Code to handle Win32 API and conpty implementation despite not knowing C. The tool features vertical/horizontal splits, detachable sessions, and native performance without VM overhead.

Forge: Open-Source Claude Code Plugin Adds Governance and Testing Gates
Forge is an open-source Claude Code plugin that adds file locking, automated test gates, and 22 governance agents to prevent collisions and drift in AI-generated code workflows. It's MIT licensed and installs via the Claude plugin marketplace.

HolyClaude: Docker Container for Claude Code with Browser UI and Headless Chromium
HolyClaude is an open-source Docker container that packages Claude Code CLI with a browser UI, headless Chromium, and additional AI coding tools. Setup requires only docker compose up and provides access at localhost:3001.

KV Cache Reuse for Long Conversations on Apple Silicon Delivers 200x Speedup
A developer implemented session-based KV cache reuse for local LLM inference using Apple's MLX framework, achieving a 200x improvement in time-to-first-token at 100K context length. The approach keeps the KV cache in memory across conversation turns, processing only new tokens.