zig-project

zig-project is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 43 tokens per session (2,719 once invoked), scanned A, original, MIT.

A guide for structuring modern Zig projects, including command-line tools, systems software, games, and high-performance services. Zig is a programming language that gives developers explicit control over memory and errors.

In plain words
What is it for?
Use it when starting or reorganizing a Zig project and deciding how to pass allocators, use compile-time features, handle errors, and connect to language-model APIs.
Why use it?
It provides consistent project decisions around memory allocation, error handling, cleanup, and the build system instead of leaving those choices implicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when starting or reorganizing a Zig project and deciding how to pass allocators, use compile-time features, handle errors, and connect to language-model APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/zig-project
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/spellbook --skill zig-project
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zig-project

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/zig-project/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/zig-project)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/zig-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/zig-project/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zig-project

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/zig-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/zig-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,719 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02719
Opus 5.5 $0.00017 $0.01088
Sonnet 5.5 $0.00009 $0.00544
Haiku 4.5 $0.00004 $0.00272

Measured 2mo ago against content hash fd80f42ae73d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

zig-project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/zig-project/SKILL.md · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zig Project Architecture

Core Principles

  • No hidden behavior — No hidden allocations, no hidden control flow, no macros
  • Explicit allocators — Pass allocator as parameter, never use global allocator
  • Comptime over macros — Use comptime for generics and metaprogramming
  • Error unions — Use !T for explicit error handling, avoid anyerror
  • defer/errdefer — Resource cleanup at scope exit
  • No backwards compatibility — Delete, don't deprecate. Change directly
  • LiteLLM for LLM APIs — Use LiteLLM proxy for all LLM integrations

No Backwards Compatibility

Delete unused code. Change directly. No compatibility layers.

// ❌ BAD: Deprecated function kept around
/// Deprecated: Use newFunction instead
pub fn oldFunction() void {
    @compileLog("oldFunction is deprecated");
    newFunction();
}

// ❌ BAD: Alias for renamed functions
pub const old_name = new_name; // "for backwards compatibility"

// ❌ BAD: Unused parameters
fn process(_: *const Config, data: []const u8) !void {
    _ = data;
}

// ✅ GOOD: Just delete and update all usages
pub fn newFunction() void {
    // ...
}

// ✅ GOOD: Remove unused parameters entirely
fn process(data: []const u8) !void {
    // ...
}

LiteLLM for LLM APIs

Use LiteLLM proxy. Don't call provider APIs directly.

const std = @import("std");
const http = std.http;

pub const LLMClient = struct {
    allocator: std.mem.Allocator,
    base_url: []const u8,
    api_key: []const u8,

    pub fn init(allocator: std.mem.Allocator, base_url: []const u8, api_key: []const u8) LLMClient {
        return .{
            .allocator = allocator,
            .base_url = base_url,  // "http://localhost:4000"
            .api_key = api_key,
        };
    }

    pub fn complete(self: *LLMClient, prompt: []const u8, model: []const u8) ![]u8 {
        // Use OpenAI-compatible API through LiteLLM proxy
        var client = http.Client{ .allocator = self.allocator };
        defer client.deinit();

        // Build request to LiteLLM proxy...
        _ = prompt;
        _ = model;
        return "";
    }
};

Read the full file on GitHub · 473 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 473 lines · 43 tokens per session scan A fd80f42ae73d

Subscribe to this mod's changes

zig-project is a skill published in the GitHub repository majiayu000/spellbook (301 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 2,719 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

zig-project compared with skills from other repositories

zig-project next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zig-projectmajiayu000/spellbookSkill301todayMITA43Claude Code, Codex
python-releaseComposioHQ/composioSkill31ktodayMITA53Claude Code, Codex
cao-session-managementawslabs/cli-agent-orchestratorSkill1.8ktodayApache-2.0B83Claude Code
agent-deckasheshgoplani/agent-deckSkill1.3ktodayMITA63Claude Code, Codex
output-dev-code-stylegrowthxai/outputSkill445todayApache-2.0A50Claude Code
fast-resumeangristan/fast-resumeSkill198todayMITA50Claude Code, Codex
notebook.fix_logginggpsaggese/helpersSkill158todayApache-2.0A10Claude Code