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

Built AI Forensic Accounting Software with My Dad — CaseTrail Automates Financial Fraud Detection
A father-son team built CaseTrail, an AI-powered forensic accounting tool that ingests bank statements and identifies anomalies. The blog details integration with LLMs for transaction analysis.

HuggingFace Agent Skills: Standardized AI Task Definitions for Coding Agents
HuggingFace Skills are self-contained folders with YAML frontmatter and guidance for AI agents to perform specific ML tasks like dataset creation, model training, and evaluation. They're interoperable with OpenAI Codex, Anthropic's Claude Code, Google Gemini CLI, and Cursor.

ClawProxy: Self-Hosted AI Routing Proxy for Rotating Free-Tier API Keys
ClawProxy is a self-hosted AI routing proxy that manages multiple free-tier AI API keys to avoid rate limits and provider overloads. It features in-flight key rotation, weighted load balancing, model translation, and a dashboard with deep-parsed logs.

Analyzing AI Coding Tools: Dissecting 3,177 API Calls
A technical breakdown of 3,177 API calls unveils how four AI coding tools manage context windows, revealing inefficiencies and variances.