plugins/zig-claude-kit/skills/zig-check/SKILL.md
Audit Zig source files for Zig 0.15.x mistakes -- checks for removed APIs (getStdOut, usingnamespace, BoundedArray, async), missing flush, wrong ArrayList usage, ambiguous format strings, signed division, and renamed stdlib functions.
npx skillsauth add kelp/kelp-claude-plugins plugins/zig-claude-kit/skills/zig-checkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit Zig source files for common Zig 0.15.x mistakes. If a file
path is given, check that file. Otherwise check all src/*.zig
files that were modified in the current git diff (staged and
unstaged).
If argument provided:
If no argument:
git diff --name-only and git diff --cached --name-onlysrc/*.zig filesUse the Read tool to read the full contents of each file.
Search each file for these patterns. Report each violation with file path, line number, and the specific issue.
Deleted API usage:
std.io.getStdOut or std.io.getStdErr -- use buffered
writer patternusingnamespace -- removed from languageasync / await -- removed from languagestd.BoundedArray -- use ArrayListUnmanaged.initBufferstd.json.Parser -- use std.json.parseFromSliceRenamed API usage:
std.mem.tokenize( without Any/Scalar/Sequence --
use tokenizeAny, tokenizeScalar, or
tokenizeSequencestd.process.args() without Alloc -- use
std.process.argsAlloc(allocator)takeDelimiterExclusive in while loops:
while loop calling takeDelimiterExclusive -- use
appendRemaining instead (hangs on stdin)Missing writer flush:
stdout_writer or stderr_writer created without a
corresponding defer ... flush() catch {}ArrayList without allocator:
.append(, .appendSlice(, .deinit() etc. without
allocator as first argument (for ArrayListUnmanaged)Ambiguous format strings:
"{}" in print/format calls -- must use {s}, {d},
{any}, etc.Signed division without builtins:
/ or % on runtime signed integer variables -- use
@divTrunc, @divFloor, @divExact, @rem, @modOld for-loop index syntax:
for (items) |item, i| without explicit index range --
use for (items, 0..) |item, i|Format output as:
## /zig-check Results
### <file_path>
CRITICAL: <line>: <description>
CRITICAL: <line>: <description>
### <file_path>
No issues found.
---
Summary: X critical across Z files
If no issues found in any file:
## /zig-check Results
All files pass. No Zig 0.15.x issues found.
For each critical issue, include a one-line fix suggestion:
std.io.getStdOut() with buffered writer pattern
(see zig-patterns skill)"while (reader.takeDelimiterExclusive(...)) with
reader.appendRemaining()"defer stdout.flush() catch {}; after writer creation"list.append(val) to list.append(allocator, val)""{}" to "{s}" (or appropriate specifier)"a / b with @divTrunc(a, b) for signed integers"std.mem.tokenize with std.mem.tokenizeAny"std.process.args() with std.process.argsAlloc"for (items) |x, i| to for (items, 0..) |x, i|"std.json.Parser with std.json.parseFromSlice"tools
Correct Zig 0.15.x patterns for I/O, ArrayList, format strings, and build.zig. Use when writing or reviewing any Zig code -- Claude's training data is outdated for these APIs.
tools
Add Zig 0.15.x training corrections to this project's CLAUDE.md. Run this in any Zig project to fix Claude's outdated patterns for I/O, ArrayList, format strings, build.zig, BoundedArray, and usingnamespace.
tools
Tiger Style rules for Zig: assertions (2+ per fn, paired positive/negative space), bounded loops (no recursion), static memory after init, snake_case naming with unit suffixes, 70-line function limit, 100-column line limit, zig fmt. Use when writing or reviewing Zig in a project that follows Tiger Style.
tools
Add TigerBeetle's Tiger Style guidance to this project's CLAUDE.md. Run this in any Zig project to apply Tiger Style's rules on assertions, bounded loops, static memory, naming, function shape, comments, and formatting.