/rules-for-ai:hashiiiii-zigfrom rules-for-ai
Provides guidelines for writing, editing, and reviewing Zig code including implementation patterns, testing conventions, and build/CI setup.
Ships in rules-for-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Write the smallest implementation that preserves required behavior. Use the project's Zig version and check matching standard-library examples before choosing syntax or APIs.
e2e/ and exercise public API flows.src/root.zig and executables from src/main.zig.const, inferred .{...} literals, structs, enums, tagged unions, exhaustive switch statements, ordinary functions, and runtime loops. Use comptime, inline, anytype, or reflection only when required.try; use catch for recovery or translation. Reserve unreachable for proven invariants.defer for cleanup and errdefer for error returns. A union-valued failure does not run errdefer.undefined only for storage initialized before reading; cast only when inference or representation requires it.test blocks and std.testing; name and assert the public behavior under test, not private layout or dependency guarantees.std.testing.allocator and release owned resources with defer.test "parse rejects duplicate modifiers" {
// Duplicate modifiers can hide configuration mistakes.
try std.testing.expectError(error.InvalidKey, KeySpec.parse("Ctrl+Ctrl+x"));
}
build.zig direct; run unit and end-to-end tests with zig build test.build.zig.zon .paths, including e2e/ when used.zig fmt --check on changed Zig files and zig build test with the project toolchain. Check Debug and ReleaseSafe when changing ownership or error paths.References: Zig sources, Readable Test Code.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
zig, zig-lang, testing, build-system, ci
11 skills in this plugin
/hallmarkUse when designing a new interface, auditing or redesigning an existing one, or studying a design from a URL or screenshot./hashiiiii-explain-prUse when a user asks to understand or explain a pull request's purpose, diff, or relationship to an issue./hashiiiii-gitUse this skill to name a Git branch or write a commit message./hashiiiii-imagesUse this skill to create project images, especially flat geometric images with a dark background and one accent color.npx claudepluginhub hashiiiii/rules-for-ai --plugin rules-for-aiOther plugins' skills for the same job