v1.2Protobuf reimagined for today

The single source of truth
for your data types

Skir is a modern declarative schema language for data models and APIs.
Write once in a .skir file - instantly generate clean, idiomatic, and fully type-safe code in TypeScript, Python, Java, Go, C++, and more languages.

Get Started
copy

One schema, 10+ languages, zero headaches

One YAML file. One command.
No manual reruns: watch mode refreshes generated code on every change.
Zero-install compiler (npx), easy to integrate into any workflow.

.skir
// shapes.skir

struct Point {
  x: float32;
  y: float32;
}

enum Shape {
  empty;
  polygon: [Point];
  circle: struct {
    center: Point;
    radius: float32;
  };
  union: [Shape];
}

method GetArea(
  Shape
): float32 = 412938;
import { ServiceClient } from "skir-client";
// Import from file generated by Skir
import { GetArea, Shape } from "../skirout/shapes.js";

// Construct a polygon Shape
const triangle = Shape.create({
  kind: "polygon",
  value: [
    { x: 0, y: 0 },
    { x: 10, y: 0 },
    { x: 0, y: 10 },
  ],
});

// Demonstrate round-trip serialization
const restored = Shape.serializer.fromJson(
  Shape.serializer.toJson(triangle)
);
console.log(restored.union.kind);  // polygon

// Send RPC
const area = await new ServiceClient(
  "http://localhost:8080/api"
).invokeRemote(GetArea, triangle);

console.log(area);  // 50

LLMs make 10x fewer mistakes with strong types

Skir gives your AI coding tools the type information they crave.
A 2025study reports that nearly 94% of common LLM coding errors are type-related, which helps explain why strong typing can drastically reduce mistakes.
Don't believe it?Ask AI.

Serialize now, deserialize in 100 years

Modifying schemas in a long-lived or distributed system is risky—one wrong move can break clients or make it impossible to deserialize old data.
Skir has simple guidelines and built-in checks to evolve your schema safely.

Before
Schema before evolution changes
After
Schema after evolution changes

End-to-end typesafety with SkirRPC

SkirRPC is a lightweight HTTP protocol for typesafe cross-service or frontend↔backend communication. It integrates with your existing web framework. Your client and server use the same generated method definitions, so contract mismatches are caught before runtime.

Every SkirRPC service ships with a built-in Studio app for browsing and testing its methods.

More features

Serialization to JSON or binary

Choose between dense JSON for web APIs and databases, readable JSON for debugging, or binary for raw performance.

GitHub imports

Don't copy files. Import types directly from any GitHub repository. Share common data structures across projects.

Polymorphism done right

Model polymorphism clearly with sum types. Skir lets you attach typed data payloads to individual enum variants.

Prioritizes immutability

Skir generates deeply immutable types with all fields required at construction time in target languages where that is idiomatic.

Constants you can share

Define constants in your .skir files. They ship in generated code, so services share the same values without runtime config reads.

Serializable schemas

Skir schemas can be serialized and deserialized as JSON. This enables generic tools, like the Studio app, to understand schema structure.

Key-indexed arrays

The array type allows you to specify a key field, e.g. [User|user_id]. On the wire, this is just like an array, but the generated code will give you fast key-based lookups.

First-class IDE support

A powerful VS Code extension and LSP with all the features you need. Real-time validation, code completion, automatic code formatting and more.

Easy to extend

Code generators are regular NPM modules, so you can add custom ones without hacking the compiler.

Supported languages

Generate production-ready code for all major programming languages.

Ready to get started?

Set up your first Skir project in minutes. Manage your entire project configuration from a single YAML file.

Join our Discord

Ask questions, share feedback, and get help from the community.

Join Discord