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

✍️ OpenClawRadar📅 Published: March 9, 2026🔗 Source
Skir: A Modern Alternative to Protocol Buffers for Type-Safe Data Exchange
Ad

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"

Ad

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

Ad

👀 See Also

Driftwatch V3 Released: AI-Assisted Codebase Monitoring Tool
Tools

Driftwatch V3 Released: AI-Assisted Codebase Monitoring Tool

Driftwatch V3 is now available as a public repository after a 5-6 day build involving approximately 9,000 lines of code and $160 in API credits. The in-browser tool tracks markdown file issues, flags contradictory instructions, and provides cost tracking with recommendations.

OpenClawRadar
Agent Architect: Free Tool Generates Complete Workspace Files for AI Agents
Tools

Agent Architect: Free Tool Generates Complete Workspace Files for AI Agents

Agent Architect is a free interactive tool that walks users through 40+ questions about their AI agent, then compiles everything into a formatted prompt to generate seven production-grade workspace files: SOUL.md, IDENTITY.md, AGENTS.md, OPERATIONS.md, TOOLS.md, MEMORY.md, and HEARTBEAT.md.

OpenClawRadar
Cowork Context Management Kit Solves Claude's File Overload Problem
Tools

Cowork Context Management Kit Solves Claude's File Overload Problem

A developer built a context management kit for Cowork after Claude AI was reading all 462 files in their project folder, causing performance issues and contradictions. The solution includes global instructions, a manifest file system, and a Cowork skill to prioritize relevant documents.

OpenClawRadar
MCP Server for TypeScript Projects Replaces Claude Code's Grep Pattern with Indexed Symbol Lookups
Tools

MCP Server for TypeScript Projects Replaces Claude Code's Grep Pattern with Indexed Symbol Lookups

A developer built an MCP server that replaces Claude Code's grep-and-guess pattern with indexed symbol lookups for TypeScript projects. The tool maintains a live SQLite index of symbols, call sites, imports, and class hierarchy, reducing token usage by 63-79% in tests.

OpenClawRadar