▄▄▄▄▄▄▄▄▄▄▄▄
     ▄██▀░░░░░░░░░░░▀██▄
   ▄█▀░░░░░░░░░░░░░░░░░▀█▄
  █▀░░▄▄              ▄▄░▀█
  █░▄▀  ▀▄          ▄▀  ▀▄░█
 █░█ ●   █    ▄▄    █   ● █░█
 █░█▄   ▄▀   █▓▓█   ▀▄   ▄█░█
 █░░▀▀▀▀     ▀▓▓▀     ▀▀▀▀░░█
  ▀█░░░░░░▀▀ ▀▀▀▀ ▀▀░░░░░░█▀
   ▀█▄░░░░░░░░░░░░░░░░░▄█▀
 ▄▓▓▓▓▀██▄▄▄▄▄▄▄▄▄▄▄▄██▀▓▓▓▓▄

The AI-First Language

Skuf compiles to native code via C, ships with uglbt, and keeps syntax minimal so LLMs can read, write, and reason about your code with fewer tokens and less ambiguity.

Get Started
$ brew install skuf

Why Skuf

Designed from the ground up so AI writes better code, faster.

{ }

Minimal Token Footprint

No curly braces, no semicolons, no `function` keyword. Every construct is short and unambiguous. LLMs spend fewer tokens parsing and generating Skuf than equivalent C, Go, or Java.

1

One Way to Do Things

Skuf avoids synonyms and syntactic sugar that create branching choices for a model. One loop, one branch, one way to declare a function. Less ambiguity = higher-quality AI code on the first try.

[ ]

Flat Learning Surface

The entire grammar fits in a single context window. An AI agent can internalize the full language spec without retrieval — no documentation lookups needed.

>>>

Native Performance

Compiles .skf to C, then to a native binary. No VM, no garbage collector pauses. Your code runs as fast as hand-written C.

@ai

AI-Native Features

@ai annotations, require/ensure contracts, |> pipe operator, structured JSON errors, --explain and --spec output designed for agent consumption.

Dual Format (.skf / .unskf)

Compact .skf for AI agents, human-readable .unskf for developers. Same code, two views — fewer tokens, same semantics.

?

Option & Result Types

Built-in Option[T] and Result[T, E] types with pattern matching and the ? operator for safe, ergonomic error handling without exceptions.

req

Design by Contract

First-class require/ensure contracts checked at runtime. Functions declare their invariants, making intent explicit for both AI and humans.

v?

Version Manager (skufit)

Built-in version manager to install, switch, and pin Skuf versions per-project. Like nvm/rustup, but for Skuf. Works with .skuf-version files.

pkg

Package Manager (normie)

Git-native package manager with .norm manifests. norm deps outputs the full API surface of all dependencies — paste into any LLM for instant context.

Two Formats, One Language

Write compact .skf for AI, read verbose .unskf for humans. Convert freely with skuf unskf and skuf skf.

  ▄████████▄
▄██▀░░░░░░▀██▄
█░ ⊗░░░░░░░⊗ ░█
█░░░░░░▄▄░░░░░█
█░░░▄▀▀░░▀▀▄░░█
 ▀██▄░░░░░░▄██▀
   ▀▀██████▀▀
skuffed.skf — compact, AI-friendly
   ▄████▄
 ▄██▀▀▀▀██▄
██ ◠    ◠ ██
█▌   ▄▄   ▐█
██  ╰──╯  ██
 ▀██▄▄▄▄██▀
   ▀████▀
unskuffed.unskf — verbose, human-friendly

Hello World

💀.skfskuffed10 tokens
mod main

fn main:
  >> "Hello, world!"
😊.unskfunskuffed14 tokens
module main

function main():
  print("Hello, world!")

29% fewer tokens

Imports

💀.skfskuffed15 tokens
mod myapp

use math { add, mul }, io, collections { List }
😊.unskfunskuffed17 tokens
module myapp

use math { add, mul }
use io
use collections { List }

12% fewer tokens

Contracts

💀.skfskuffed25 tokens
#Safely divide two integers
fn safe_divide(a, b):
  req b != 0
  r := a / b
  ens r * b == a
  ~ r
😊.unskfunskuffed32 tokens
@ai("Safely divide two integers")
function safe_divide(a, b):
  require b != 0
  let r = a / b
  ensure r * b == a
  return r

22% fewer tokens

Pipe Operator & Debug Tap

💀.skfskuffed27 tokens
fn double(x) = x * 2
fn add_one(x) = x + 1

result := 5 |> double |> add_one << "%d"
>> "result = ${result}"
😊.unskfunskuffed32 tokens
function double(x) = x * 2
function add_one(x) = x + 1

let result = 5 |> double |> add_one << "%d"
print("result = ${result}")

16% fewer tokens

Tests

💀.skfskuffed29 tokens
fn add(a, b) = a + b

tst "addition":
  !! add(1, 2) == 3
  !! add(0, 0) == 0

tst "edge cases":
  !! add(-1, 1) == 0
😊.unskfunskuffed34 tokens
function add(a, b) = a + b

test "addition":
  assert add(1, 2) == 3
  assert add(0, 0) == 0

test "edge cases":
  assert add(-1, 1) == 0

15% fewer tokens

Option & Result Types

💀.skfskuffed52 tokens
fn find_user(id: int) -> Option[int]:
  if id > 0:
    ~ Some(id)
  ~ None

fn process(s: string) -> Result[int, string]:
  n := parse_int(s)?
  ~ Ok(n * 2)

match result:
  Ok(v):
    >> v
  Err(e):
    >> e
😊.unskfunskuffed61 tokens
function find_user(id: int) -> Option[int]:
  if id > 0:
    return Some(id)
  return None

function process(s: string) -> Result[int, string]:
  let n = parse_int(s)?
  return Ok(n * 2)

match result:
  Ok(v):
    print(v)
  Err(e):
    print(e)

15% fewer tokens

Sum Types & Pattern Matching

💀.skfskuffed34 tokens
type Shape:
  Circle(radius)
  Rect(width, height)

match shape:
  Circle(r):
    >> "circle ${r}"
  Rect(w, h):
    >> "rect ${w}x${h}"
😊.unskfunskuffed36 tokens
type Shape:
  Circle(radius)
  Rect(width, height)

match shape:
  Circle(r):
    print("circle ${r}")
  Rect(w, h):
    print("rect ${w}x${h}")

6% fewer tokens

Fewer tokens per file = faster, cheaper AI generation in .skf format

Compare Languages

No class ceremony. The file is the module, functions are top-level, contracts replace defensive if checks.

Python — calculator.py (17 lines)
def add(a, b):
    return a + b

def sub(a, b):
    return a - b

def multiply(a, b):
    return a * b

def divide(a, b):
    if b == 0:
        print("Cannot divide by zero.")
        return None
    return a / b

def percent(a, b):
    return (a * b) / 100
Python — main.py (9 lines)
from calculator import add, sub, multiply, divide, percent

a = 20
b = 5
print(f"Add: {add(a, b)}")
print(f"Sub: {sub(a, b)}")
print(f"Multiply: {multiply(a, b)}")
print(f"Divide: {divide(a, b)}")
print(f"Percent: {percent(a, b)}")
Skuf — calc.skf (11 lines)
mod calc

fn add(a, b) = a + b
fn sub(a, b) = a - b
fn multiply(a, b) = a * b

fn divide(a, b):
  req b != 0
  ~ a / b

fn percent(a, b) = (a * b) / 100
Skuf — main.skf (11 lines)
mod main
use calc

fn main:
  a := 20
  b := 5
  >> "Add: ${add(a, b)}"
  >> "Sub: ${sub(a, b)}"
  >> "Multiply: ${multiply(a, b)}"
  >> "Divide: ${divide(a, b)}"
  >> "Percent: ${percent(a, b)}"
122 tokens86 tokens30% fewer tokens