Skip to content

majiayu000/spellbook / skills/zig-project

zig-project

Verified

Modern Zig project architecture guide. Use when creating Zig projects (systems programming, CLI tools, game dev, high-performance services). Covers explicit allocators, comptime, error handling, and build system.

templates/executable/src/main.zig

View on GitHub
const std = @import("std");
const lib = @import("lib.zig");

pub fn main() !void {
    // Use GeneralPurposeAllocator for memory allocation
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};
    defer _ = gpa.deinit();
    const allocator = gpa.allocator();

    // Get stdout writer
    const stdout = std.io.getStdOut().writer();

    // Example: Use library function
    const greeting = try lib.createGreeting(allocator, "World");
    defer allocator.free(greeting);

    try stdout.print("{s}\n", .{greeting});
}

test "main runs without error" {
    // Basic smoke test
    const allocator = std.testing.allocator;
    const greeting = try lib.createGreeting(allocator, "Test");
    defer allocator.free(greeting);

    try std.testing.expectEqualStrings("Hello, Test!", greeting);
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall