Provides Zig patterns for type-first development with tagged unions, explicit error sets, comptime validation, and memory management. Must use when reading or writing Zig files.
85
78%
Does it follow best practices?
Impact
94%
1.13xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./data/skills-md/0xbigboss/claude-code/zig-best-practices/SKILL.mdType-safe state modeling
Tagged union for states
100%
100%
Distinct ID types
70%
100%
Explicit error sets
60%
100%
Non-exhaustive enum
0%
100%
Exhaustive switch handling
100%
100%
Comptime validation
12%
0%
Explicit comptime T type
0%
100%
Prefer const over var
100%
100%
Error union return types
100%
100%
Tests with testing allocator
100%
83%
No anyerror in signatures
100%
100%
Design notes present
100%
100%
Memory management and cleanup
Explicit allocator parameter
100%
100%
Arena allocator for batch
0%
100%
defer for resource cleanup
100%
100%
errdefer on error paths
100%
100%
std.testing.allocator in tests
100%
100%
No global allocation state
100%
100%
Slices over raw pointers
100%
100%
Explicit error set
25%
100%
const over var
100%
100%
Tests cover error path
100%
100%
NOTES.md memory explanation
87%
100%
Generic functions and scoped logging
comptime T: type over anytype
100%
100%
std.log.scoped used
100%
100%
Module-level log constant
100%
100%
err level for failures
100%
0%
debug level for tracing
100%
100%
catch block for error handling
100%
100%
No anytype in generic signatures
100%
100%
Explicit allocator parameter
100%
100%
Slices in signatures
100%
100%
Tests with testing allocator
100%
100%
const over var
100%
100%
f772de4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.