plugins/tiger-style/skills/tiger-patterns/SKILL.md
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.
npx skillsauth add kelp/kelp-claude-plugins plugins/tiger-style/skills/tiger-patternsInstall 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.
This project follows TigerBeetle's Tiger Style. For full
rationale and worked examples, read
${CLAUDE_PLUGIN_ROOT}/docs/TIGER_STYLE_REFERENCE.md.
Assertions -- minimum two per function on average. Assert arguments, return values, pre/postconditions, invariants. Pair assertions across code paths. Assert positive space (what you expect) AND negative space (what you don't). Split compound asserts:
// WRONG
assert(a and b);
// RIGHT
assert(a);
assert(b);
Bounded loops, no recursion -- every loop has an upper bound; convert recursive algorithms to iterative. For genuinely non-terminating loops, assert:
while (true) {
assert(self.running);
// ...
}
Static memory -- allocate everything at init from a sized arena. After init, the allocator is read-only.
Errors -- handle every one. catch {} requires a
comment explaining why dropping is safe. Brace
multi-line if bodies.
snake_case for fn / var / file. PascalCase for types.i, j, k for sort/matrix
indices).VSRState, not VsrState.latency_ms_max, bytes_per_sector.read_sector_callback().options: struct when args could be mixed up:pub fn open(path: []const u8, options: struct {
read: bool = true,
write: bool = false,
}) !File { ... }
ifs up, push fors down.*const T.defer with surrounding newlines.//, capital letter, period.zig fmt.zig fmt to wrap signatures.u32, not usize (unless required by
API).@divExact, @divFloor,
@divTrunc, or div_ceil -- never bare / on
integers.u32 for
everything you control.self).Run /tiger-style:tiger-check to catch mechanical
violations: oversized functions, long lines, usize,
recursion, compound asserts, unbounded while (true).
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
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.
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.