Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yabuku-xd-zig-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/zig-testing
What's inside
- Skill name
zig-testing- Description
- Zig testing skill for writing and running tests. Use when using zig build test, writing comptime tests, using test filters, working with test allocators to detect leaks, or using Zig's built-in fuzz testing (0.14+). Activates on queries about Zig tests, zig test, zig build test, comptime testing, test allocators, Zig fuzz testing, or detecting memory leaks in Zig tests.
- License
- MIT
- Instructions
- 262 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "zig-testing" does not match folder "zig-testing-lowlevel"
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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 introduced in 0.14.
## 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
```zig
// 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));
}
```
```bash
# 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
```zig
// build.zig
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// Unit test step
const unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
const run_unit_tests = b.addRunArtifact(unit_tests);
// Integration tests (separate executable)
const integration_tests = b.addTest(.{
.root_source_file = b.path("tests/integration.zig"),
.target = target,
.optimize = optimize,
});
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);
}
```
### 3. Test allocator — leak detection
The `std.testing.allocator` wraps a `GeneralPurposeAllocator` in test mode and reports leaks at the end of each test:
```zig
const std = @import("std");
const testing = std.testing;
test "ArrayList: no leaks" {
// testing.allocator detects leaks and reports them
var list = std.ArrayList(u32).init(testing.allocator);
defer list.deinit(); // MUST defer to return memory
try list.append(1);From Yabuku-xD/omfx, MIT.
More from Yabuku-xD/omfx
- 0.529score
zig-memory-management
Yabuku-xD
Memory management in Zig including allocators, pointers, slices, alignment, and ownership patterns.
SkillBFreshness: BClaude Code +9 - 0.524score
zig-tiger-style
Yabuku-xD
TigerStyle Zig coding guidelines — distilled from TigerBeetle's production codebase.
SkillBFreshness: BClaude Code +9 - 0.524score
zig-comptime
Yabuku-xD
Zig comptime skill for compile-time evaluation and metaprogramming.
SkillBFreshness: BClaude Code +9 - 0.520score
zig-debugging
Yabuku-xD
Zig debugging skill.
SkillBFreshness: BClaude Code +9 - 0.520score
zig-code-review
Yabuku-xD
Review Zig project code for style, correctness, and logic.
SkillBFreshness: BClaude Code +9 - 0.518score
code-audit
Yabuku-xD
Conducts an exhaustive, multi-pass, line-by-line technical audit and verification of local files or directories.
SkillBFreshness: BClaude Code +9 - 0.518score
zig-build-system
Yabuku-xD
Zig 构建系统专项技能。涉及 build.zig 和 build.zig.zon 的编写、模块管理、依赖配置、交叉编译、C/C++ 集成、自定义构建步骤和测试配置。在需要配置或调试项目构建时调用。
SkillBFreshness: BClaude Code +9 - 0.518score
zig-testing
Yabuku-xD
Zig 测试与调试技能。涉及 std.testing 的断言、测试组织、内存泄漏检测、以及 std.debug 的日志、堆栈回溯。在需要编写测试、调试代码、诊断问题时调用。
SkillBFreshness: BClaude Code +9 - 0.518score
zig-concurrency
Yabuku-xD
Zig 并发编程技能。涉及 std.Thread 的线程创建、同步原语(Mutex、RwLock、Condition、Semaphore、WaitGroup)、线程池和原子操作。在需要多线程或并行计算时调用。
SkillBFreshness: BClaude Code +9 - 0.518score
zig-project-structure
Yabuku-xD
Zig 项目结构全生命周期管理。创建项目骨架(exe/lib/多模块/带依赖)或检查已有项目的目录结构、文件命名、构建配置合规性,输出结构化报告。
SkillBFreshness: BClaude Code +9 - 0.516score
zig-build-system
Yabuku-xD
Zig build system skill for multi-file Zig projects.
SkillBFreshness: BClaude Code +9 - 0.515score
hello-omfx
Yabuku-xD
Example skill.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Yabuku-xD/omfx
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Yabuku-xD
- 0.529score
zig-memory-management
Yabuku-xD
Memory management in Zig including allocators, pointers, slices, alignment, and ownership patterns.
SkillBFreshness: BClaude Code +9 - 0.524score
zig-comptime
Yabuku-xD
Zig comptime skill for compile-time evaluation and metaprogramming.
SkillBFreshness: BClaude Code +9 - 0.524score
zig-tiger-style
Yabuku-xD
TigerStyle Zig coding guidelines — distilled from TigerBeetle's production codebase.
SkillBFreshness: BClaude Code +9 - 0.520score
zig-debugging
Yabuku-xD
Zig debugging skill.
SkillBFreshness: BClaude Code +9 - 0.520score
zig-code-review
Yabuku-xD
Review Zig project code for style, correctness, and logic.
SkillBFreshness: BClaude Code +9 - 0.518score
zig-testing
Yabuku-xD
Zig 测试与调试技能。涉及 std.testing 的断言、测试组织、内存泄漏检测、以及 std.debug 的日志、堆栈回溯。在需要编写测试、调试代码、诊断问题时调用。
SkillBFreshness: BClaude Code +9
Cite this page
zig-testing skill. Agent Mart. https://agentmart.dev/skills/yabuku-xd-zig-testing (last updated 2026-10-24)