▄▄▄▄▄▄▄▄▄▄▄▄
▄██▀░░░░░░░░░░░▀██▄
▄█▀░░░░░░░░░░░░░░░░░▀█▄
█▀░░▄▄ ▄▄░▀█
█░▄▀ ▀▄ ▄▀ ▀▄░█
█░█ ● █ ▄▄ █ ● █░█
█░█▄ ▄▀ █▓▓█ ▀▄ ▄█░█
█░░▀▀▀▀ ▀▓▓▀ ▀▀▀▀░░█
▀█░░░░░░▀▀ ▀▀▀▀ ▀▀░░░░░░█▀
▀█▄░░░░░░░░░░░░░░░░░▄█▀
▄▓▓▓▓▀██▄▄▄▄▄▄▄▄▄▄▄▄██▀▓▓▓▓▄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.
Designed from the ground up so AI writes better code, faster.
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.
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.
The entire grammar fits in a single context window. An AI agent can internalize the full language spec without retrieval — no documentation lookups needed.
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 annotations, require/ensure contracts, |> pipe operator, structured JSON errors, --explain and --spec output designed for agent consumption.
Compact .skf for AI agents, human-readable .unskf for developers. Same code, two views — fewer tokens, same semantics.
Built-in Option[T] and Result[T, E] types with pattern matching and the ? operator for safe, ergonomic error handling without exceptions.
First-class require/ensure contracts checked at runtime. Functions declare their invariants, making intent explicit for both AI and humans.
Built-in version manager to install, switch, and pin Skuf versions per-project. Like nvm/rustup, but for Skuf. Works with .skuf-version files.
Git-native package manager with .norm manifests. norm deps outputs the full API surface of all dependencies — paste into any LLM for instant context.
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
mod main
fn main:
>> "Hello, world!"module main
function main():
print("Hello, world!")29% fewer tokens
mod myapp
use math { add, mul }, io, collections { List }module myapp
use math { add, mul }
use io
use collections { List }12% fewer tokens
#Safely divide two integers
fn safe_divide(a, b):
req b != 0
r := a / b
ens r * b == a
~ r@ai("Safely divide two integers")
function safe_divide(a, b):
require b != 0
let r = a / b
ensure r * b == a
return r22% fewer tokens
fn double(x) = x * 2
fn add_one(x) = x + 1
result := 5 |> double |> add_one << "%d"
>> "result = ${result}"function double(x) = x * 2
function add_one(x) = x + 1
let result = 5 |> double |> add_one << "%d"
print("result = ${result}")16% fewer tokens
fn add(a, b) = a + b
tst "addition":
!! add(1, 2) == 3
!! add(0, 0) == 0
tst "edge cases":
!! add(-1, 1) == 0function add(a, b) = a + b
test "addition":
assert add(1, 2) == 3
assert add(0, 0) == 0
test "edge cases":
assert add(-1, 1) == 015% fewer 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):
>> efunction 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
type Shape:
Circle(radius)
Rect(width, height)
match shape:
Circle(r):
>> "circle ${r}"
Rect(w, h):
>> "rect ${w}x${h}"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
No class ceremony. The file is the module, functions are top-level, contracts replace defensive if checks.
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) / 100from 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)}")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) / 100mod 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)}"