- Home
- Skills
- Code Quality & Review
- zig-style: Zig 0.17 Coding Standard
More screenshots
Works with the AI Agents you already use
zig-style: Zig 0.17 Coding Standard
A coding standard that teaches your agent Zig 0.17 as it actually is today.
$9
zig-style: Zig 0.17 Coding Standard
Example session with this skill installed
Review this before I merge. We're on Zig 0.17.1.
const c = @cImport(@cInclude("zlib.h"));
pub fn compress(gpa: std.mem.Allocator, input: []const u8) ![]u8 {
if (!std.mem.containsAtLeastScalar(u8, input, 2, '\n')) return error.TooFewLines;
var sfa = std.heap.stackFallback(4096, gpa);
const scratch = sfa.get();
// ...
}
- Read your context and instructions
- Compiled the zig-style
Findings
| Severity | Rule | Location | Finding | Fix |
|---|---|---|---|---|
| Stale | ZS-MIG-01 | compress.zig:4 | containsAtLeastScalar(u8, input, 2, '\n') still compiles in 0.17, but the last two parameters are now (element, minimum). It now asks for at least ten copies of byte 2, so the guard rejects almost every input | std.mem.containsAtLeastScalar(u8, input, '\n', 2) |
| Stale | ZS-INTEROP-15 | compress.zig:1 | @cImport no longer compiles in 0.17 | Translate the header in build.zig with b.addTranslateC(...), call .createModule(), and @import it as a module; for a small surface, hand-write the extern declarations |
| Stale | ZS-MEM-03 | compress.zig:5 | std.heap.stackFallback is gone | var buffer: [4096]u8 = undefined; then var bfa: std.heap.BufferFirstAllocator = .init(&buffer, gpa); and bfa.allocator() |
Discussion
The first row is the one that matters. It builds without a warning, because both arguments are integers once T is u8, and turns a line-count check into a nonsense question. The other two stop the build, so the compiler would have found them; this one only shows up as error.TooFewLines on valid input. ZS-MIG-01's Check gives rg -n 'containsAtLeastScalar\(' src/ to find every other call that still uses the 0.16 argument order.
Connects securely to your tools. The creator never sees your data.
About this skill
A coding standard that teaches your agent Zig 0.17 as it actually is today.
Zig changed enormously in 0.15, 0.16 and again in 0.17, so most Zig an agent has seen is stale, and some of the changes (@bitCast on arrays, @hasDecl on non-pub declarations, the swapped arguments of std.mem.containsAtLeastScalar) still compile but now give different results.
The standard is built from three sources: the official Zig style guide (naming, formatting), the conventions of the 0.17 standard library (API shape, ownership, decl literals) and TigerStyle (assertions, bounded limits, control-flow discipline). Where they disagree, it picks a side and says why.
What's inside
- 383 rules across 17 chapters: naming, data and casts, errors, memory and allocators,
std.Ioand concurrency, output and formatting, performance, C interop and freestanding targets, assertions, comptime, testing and fuzzing, build and CI, documentation, modules, public API, types, and migration. - A migration table covering every spelling 0.13 through 0.17 left behind, with the release it changed in, its owning rule, and an
rgcommand generated from the table that finds them in your code. - Bundled assets: a complete library + CLI
build.zig, an annotatedbuild.zig.zon, and a GitHub Actionsci.yml(pinned toolchain,fmt --check, two optimize modes, a cross-compile matrix). - Also in a bundle: the Systems Languages Pack sells rust-style and zig-style together for less than the two separately.
How it works
- Section 2 — reality check. A table of every spelling the target release changed: what still compiles but now behaves differently, what no longer compiles, and what was gained. Your agent reads it before writing a single line, because most code on the public internet (and most of what a model has read) is stale.
- Section 4 — core rules. The rules that bind on their own and reach nearly every file.
- One chapter at a time. Each topic chapter opens with a table of contents of the rules it owns. The agent loads only the chapter the task needs, so the standard costs context in proportion to the task, not its size.
- Tiered rules.
[M]mandatory,[M!]mandatory in high-reliability code such as databases, firmware and security boundaries (each states a relaxed form for everything else),[S]default that needs a one-line justification to break. - Every rule has a Why and a Check. The Check is something concrete to grep for or look at, so a review is reproducible rather than taste.
- Labelled examples. Each code block says whether it was verified against the target toolchain, is a fragment, or is shown because a tool rejects it.
- Review protocol. A seven-level severity model (Unsound, Stale, Incorrect, Contract, Design, Performance, Style), a fixed review order, a mechanical grep pass, and an output table of severity, rule ID, location, finding and fix. Includes the order in which to refactor an existing codebase.
Where it stops
- It is a standard your agent follows, not a linter or formatter. It tells the agent which tools to run and how to configure them, but it runs nothing on its own.
- It targets one release. Older releases appear only in the migration chapter, as spellings to move away from.
- Zig 0.17.1 only. It does not describe how to stay compatible with 0.16 or earlier.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Targets Zig 0.17.1 only; no compatibility guidance for older releases. It is a standard the agent follows, not a linter, and does not run tools on its own. The bundled ci.yml pins action versions you should check before use.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
- Software
Git
- Optional
- Zig 0.17.1ripgrep (rg)
Permissions
File Scopes
Instructions and reference text only: no scripts, no network access, no credentials. Read and write cover the code you ask it to write, review or refactor. The shell is optional, for running zig build, zig fmt, tests and the rg checks the rules name. Bundled build and CI templates are copied into a project only when you ask.