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
Mesh LLM: Distributed AI Computing on Iroh – Run LLMs Across Your Own GPUs
Mesh LLM pools GPUs you already have across machines and exposes them as one OpenAI-compatible API. Distributes models locally, via peer routing, or as a pipeline across several nodes using iroh's QUIC transport.

Xiaozhen: A Claude Code skill that digs three layers into root causes
Xiaozhen (小真) is a Claude Code skill that uses three mechanics—The Gift, Three Layers Deep, and The Prediction—to help users uncover what's actually bothering them rather than giving direct advice. It's installed with a one-line curl command and activated by typing /小真 in Claude Code.
Strata: A Semantic Layer That Refuses Invalid Queries Before Your LLM Runs Them
Strata is a full-stack semantic layer built by an ex-Netflix engineer that validates and rejects semantically invalid queries before they execute, with partition-aware routing across ClickHouse, Druid, Snowflake, and Athena.

NexQuant: Rust-native 3-bit KV-cache engine for edge deployment
NexQuant is a production-hardened Rust engine that enables running high-context models on consumer hardware with 3-5x memory reduction. It supports Metal, CUDA, Vulkan, and CPU backends.