cargo
Rust package manager (36 subcommands).
zig-systems
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
Full skill instructions
zig-systems provides low-level systems programming capabilities using Zig - a modern language for systems code with performance of C, memory safety guarantees, and cross-platform compilation.
Role: ERGODIC systems coordinator - bridges high-level skill orchestration (Clojure) with native performance code.
# macOS with Homebrew
brew install zig
# Or download from https://ziglang.org/download/
# Verify installation
zig version
# Compile a Zig program
zig build-exe main.zig
# Run compiled binary
./main
# Compile with optimizations
zig build-exe -O ReleaseFast main.zig
# Compile to library (FFI)
zig build-lib main.zig
const std = @import("std");
pub fn main() void {
// Stack-allocated, no garbage collection
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
const allocator = arena.allocator();
// Explicit allocation
var list = std.ArrayList(i32).init(allocator);
defer list.deinit();
// Type-safe operations
try list.append(42);
}
fn Matrix(comptime T: type, comptime rows: usize, comptime cols: usize) type {
return struct {
data: [rows * cols]T,
fn get(self: @This(), r: usize, c: usize) T {
return self.data[r * cols + c];
}
};
}
// Compile-time type generation
const IntMatrix = Matrix(i32, 3, 3);
// Direct C function calls
extern "c" fn malloc(size: usize) ?*anyopaque;
extern "c" fn free(ptr: ?*anyopaque) void;
// Export functions for C/other languages
export fn skill_invoke(input: [*]u8, len: usize) [*]u8 {
// Process input, return output
}
zig-systems/
├── SKILL.md
├── build.zig # Build configuration
├── scripts/
│ ├── array_sort.zig
│ ├── compression.zig
│ ├── hash_table.zig
│ └── ffi.zig # FFI/C interop
├── references/
│ ├── ZIG_SYNTAX.md
│ ├── MEMORY_MODEL.md
│ ├── PERFORMANCE.md
│ └── FFI_GUIDE.md
└── assets/
└── build_template.zig
const std = @import("std");
pub fn sort_i32(allocator: std.mem.Allocator, items: []i32) !void {
var list = std.ArrayList(i32).init(allocator);
defer list.deinit();
try list.appendSlice(items);
std.sort.sort(i32, list.items, {}, std.sort.asc(i32));
}
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var map = std.StringHashMap(i32).init(allocator);
defer map.deinit();
try map.put("foo", 42);
if (map.get("foo")) |value| {
std.debug.print("Found: {}\n", .{value});
}
}
pub fn compress(allocator: std.mem.Allocator, data: []const u8) ![]u8 {
// Implement compression (e.g., DEFLATE, LZ4)
var output = std.ArrayList(u8).init(allocator);
defer output.deinit();
// Compression logic here
return output.toOwnedSlice();
}
const std = @import("std");
pub fn benchmark(comptime name: []const u8, func: fn() void) void {
var timer = try std.time.Timer.start();
defer {
const elapsed = timer.read();
std.debug.print("{s}: {d}ns\n", .{name, elapsed});
}
func();
}
| Operation | Zig | Go | Java |
|---|---|---|---|
| Array sort (10K items) | ~1ms | ~2ms | ~5ms |
| Hash table insert | ~50ns | ~100ns | ~200ns |
| Memory allocation | ~50ns | ~100ns | ~500ns |
| Binary size (hello) | 2KB | 1MB | 50MB |
const std = @import("std");
const Builder = std.build.Builder;
pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "my_skill",
.root_source_file = .{ .path = "main.zig" },
.target = target,
.optimize = optimize,
});
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}
# Build debug binary
zig build
# Build with optimizations
zig build -Doptimize=ReleaseFast
# Install to prefix
zig build --prefix /usr/local install
# Run tests
zig build test
(defn call-zig-sort [data]
"Invoke Zig sort via FFI."
(shell/sh "zig-systems" "sort" (write-json data)))
import "C"
//export SkillInvoke
func SkillInvoke(data *C.char) *C.char {
// Call Zig compiled library
result := C.zig_compress(data)
return result
}
(import subprocess)
(setv result (subprocess.run ["zig-systems" "compress" "input.dat"]
:capture-output True))
While zig-systems is a SINGLE language skill (not a triadic component itself), it coordinates with:
Validator (-1) + Coordinator (0) + Generator (+1) ≡ 0 (mod 3)
[joker] [zig-systems] [hy-regime]
OR
[joker] [jo-clojure] [hy-regime]
Zig provides low-level system optimization that the triadic coordinator (jo-clojure or zig-systems) may invoke.
const std = @import("std");
pub fn divide(a: i32, b: i32) i32 {
std.debug.assert(b != 0); // Panics if false
return a / b;
}
const FileOpenError = error {
FileNotFound,
PermissionDenied,
};
pub fn open_file(path: []const u8) FileOpenError!*File {
if (!file_exists(path)) {
return FileOpenError.FileNotFound;
}
// ...
}
const std = @import("std");
pub fn main() void {
std.debug.print("Debug output: {any}\n", .{data});
std.debug.assert(condition);
var timer = std.time.Timer.start();
}
inline keyword for hot pathsperf record ./binary then perf report@Vector type for parallel operations"zig: command not found"
brew install zigzig versionBuild errors with C libraries
zig build-exe main.zig -lc to link libcextern "c" fn malloc(...)Memory leaks in debug mode
std.heap.GeneralPurposeAllocator(.{.safety = true})Binary too large
-O ReleaseSmallstrip ./binaryRust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
Deploy serverless applications on Cloudflare Workers. Covers project setup, JavaScript handler patterns, routing, deployment with Wrangler, and API token configuration. Suitable for APIs, proxies, edge computing, and request transformation.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience