zig-testing

zig-testing is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 87 tokens per session (2,166 once invoked), scanned A, original, MIT.

A testing guide for Zig, a programming language, covering Zig's built-in test tools and test patterns. It explains regular tests, compile-time tests, leak detection with test allocators, and fuzz testing.

In plain words
What is it for?
Use it when writing Zig tests, running `zig build test` or `zig test`, testing code at compile time, checking allocations, or fuzzing a Zig library.
Why use it?
It helps developers choose and run the kinds of tests Zig supports, including checks that find memory leaks or unusual inputs. It also explains how to run only selected tests.

Skill for Claude CodeCodex

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

Good fit Use it when writing Zig tests, running zig build test or zig test, testing code at compile time, checking allocations, or fuzzing a Zig library.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/zig-testing
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 mohitmishra786/low-level-dev-skills --skill zig-testing
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/zig-testing/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/zig-testing)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/zig-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/zig-testing/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-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/zig-testing"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/zig-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,166 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.00087 $0.02166
Opus 5.5 $0.00035 $0.00866
Sonnet 5.5 $0.00017 $0.00433
Haiku 4.5 $0.00009 $0.00217

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

Security

Grade A, and why

zig-testing 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 15d 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/zig-testing/SKILL.md · 267 lines

How it starts

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

Zig Testing

Purpose

Guide agents through Zig's testing system: zig build test and zig test, comptime testing patterns, test filters, the test allocator for leak detection, and Zig's built-in fuzz testing.

Triggers

  • "How do I write and run tests in Zig?"
  • "How do I filter which Zig tests run?"
  • "How do I detect memory leaks in Zig tests?"
  • "How do I write comptime tests in Zig?"
  • "How do I use Zig's built-in fuzzer?"
  • "How do I test a Zig library?"

Workflow

1. Writing and running tests

// src/math.zig
const std = @import("std");
const testing = std.testing;

pub fn add(a: i32, b: i32) i32 {
    return a + b;
}

pub fn divide(a: f64, b: f64) !f64 {
    if (b == 0.0) return error.DivisionByZero;
    return a / b;
}

// Tests live in the same file or a dedicated test file
test "add: basic addition" {
    try testing.expectEqual(@as(i32, 5), add(2, 3));
    try testing.expectEqual(@as(i32, -1), add(2, -3));
}

test "add: identity" {
    try testing.expectEqual(@as(i32, 42), add(42, 0));
}

test "divide: normal case" {
    const result = try divide(10.0, 2.0);
    try testing.expectApproxEqAbs(result, 5.0, 1e-9);
}

test "divide: by zero returns error" {
    try testing.expectError(error.DivisionByZero, divide(1.0, 0.0));
}
# Run all tests in a single file
zig test src/math.zig

# Run all tests via build system
zig build test

# Verbose output
zig build test -- --verbose

# Run specific test by name (substring match)
zig build test -- --test-filter "add"

2. build.zig test configuration

// build.zig
const std = @import("std");

pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});

    const math_mod = b.createModule(.{
        .root_source_file = b.path("src/math.zig"),
        .target = target,
        .optimize = optimize,
    });

    // Unit test step
    const unit_tests = b.addTest(.{ .root_module = math_mod });
    const run_unit_tests = b.addRunArtifact(unit_tests);

    // Integration tests (separate test binary that imports the module)
    const integration_tests = b.addTest(.{
        .root_module = b.createModule(.{
            .root_source_file = b.path("tests/integration.zig"),
            .target = target,
            .optimize = optimize,
            .imports = &.{.{ .name = "math", .module = math_mod }},
        }),
    });
    const run_integration = b.addRunArtifact(integration_tests);

    // `zig build test` runs both
    const test_step = b.step("test", "Run all tests");
    test_step.dependOn(&run_unit_tests.step);
    test_step.dependOn(&run_integration.step);

    // `zig build test-unit` runs only unit tests
    const unit_step = b.step("test-unit", "Run unit tests");
    unit_step.dependOn(&run_unit_tests.step);
}

Read the full file on GitHub · 267 lines

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. 15d ago Changed · +1 lines f091317313bd
  2. 3mo ago First seen · 266 lines · 87 tokens per session scan A 97bcdcae5d9f

Subscribe to this mod's changes

zig-testing is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (311 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 2,166 once invoked, about $0.0003 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-testing compared with skills from other repositories

zig-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zig-testingmohitmishra786/low-level-dev-skillsSkill311todayMITA87Claude Code, Codex
test-commanderEliasOulkadi/shokuninSkill1122mo agoMITA117Claude Code
testingjkaninda/okapi-skillsSkill43mo agoMITA0Claude Code, Codex
test-writerCODE-SAURABH/OpenSkillsSkill64mo agoMITA67Claude Code, Codex
migrate-xunit-to-xunit-v3dotnet/skillsSkill6.5ktodayMITA149Claude Code
go-testingGentleman-Programming/gentle-aiSkill9.8kyesterdayMITA26Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6k2d agoMITA126Claude Code, Codex