Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add kelp/agent-plugins/plugin install zig-claude-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kelp/agent-plugins/zig-patterns)<a href="https://agentmods.dev/skills/kelp/agent-plugins/zig-patterns"><img src="https://agentmods.dev/badge/skills/kelp/agent-plugins/zig-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kelp/agent-plugins/zig-patterns"><img src="https://agentmods.dev/badge/skills/kelp/agent-plugins/zig-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00086 | $0.01380 |
| Opus 5.5 | $0.00034 | $0.00552 |
| Sonnet 5.5 | $0.00017 | $0.00276 |
| Haiku 4.5 | $0.00009 | $0.00138 |
Grade A, and why
zig-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Zig Patterns -- Quick Reference
Your Zig training is outdated. The tables below give the correct pattern for each broken one. The plugin supports both 0.15.x and 0.16.x; detect the version first, then apply the shared corrections plus the version-specific ones.
1. Detect Zig version
Run:
${CLAUDE_PLUGIN_ROOT}/scripts/detect-zig-version.sh
It prints 0.15 or 0.16.
2. Shared corrections (both versions)
| What Claude Thinks | Reality | Quick Fix |
|---|---|---|
std.io.getStdOut().writer() |
REMOVED (Writergate) | Buffered writer pattern -- see docs |
std.io.getStdErr().writer() |
REMOVED (Writergate) | Buffered writer pattern -- see docs |
usingnamespace keyword exists |
REMOVED from language | Zero-bit fields + @fieldParentPtr |
async/await keywords exist |
REMOVED from language | Will be library features in future |
std.ArrayList(T).init(allocator) |
Managed API removed | Unmanaged list, pass allocator to methods |
std.BoundedArray exists |
REMOVED | ArrayListUnmanaged.initBuffer(&buffer) |
{} in format strings calls format |
Ambiguous -- compile error | Use {f} to call format methods |
Generic writers with anytype |
Concrete std.Io.Writer type |
Non-generic with buffer in interface |
std.io.BufferedWriter exists |
REMOVED | Writers have built-in buffering |
Build uses .root_source_file |
Moved inside .root_module |
b.createModule(.{ .root_source_file = ... }) |
/ works on runtime signed ints |
Must be comptime-known and positive | Use @divTrunc, @divFloor, or @divExact |
% works on runtime signed ints |
Must be comptime-known and positive | Use @rem or @mod |
std.mem.tokenize |
Renamed | tokenizeAny, tokenizeScalar, tokenizeSequence |
std.process.args() returns iterator |
Now argsAlloc(allocator) |
Returns owned slice, must free |
std.json.Parser |
Complete redesign | std.json.parseFromSlice(T, allocator, text, .{}) |
for (items) |item, i| |
Index requires explicit range | for (items, 0..) |item, i| |
std.fifo.LinearFifo exists |
REMOVED | Use std.Io.Reader/Writer |
std.RingBuffer exists |
REMOVED | Use std.Io.Reader/Writer |
Arithmetic on undefined allowed |
Causes illegal behavior | Never operate on undefined values |
std.DoublyLinkedList(T) generic |
De-genericified | Intrusive nodes with @fieldParentPtr |
std.testing.expectEqualSlices |
Parameters swapped | Expected first, actual second |
File.writer() respects O_APPEND |
Uses positional writes | Use writerStreaming() for append |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 104 lines · 86 tokens per session scan A f545f16b8630
zig-patterns is a skill published in the GitHub repository kelp/agent-plugins (2 stars, last pushed 13d ago), licensed MIT. It adds 86 tokens to every session and 1,380 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
zig-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| zig-patternskelp/agent-plugins | Skill | 2 | 13d ago | MIT | A | 86 | Claude Code |
| better-authsecondsky/claude-skills | Skill | 257 | today | MIT | A | 53 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | today | MIT | A | 41 | Claude Code |
| bun-hot-reloadingsecondsky/claude-skills | Skill | 257 | today | MIT | A | 42 | Claude Code |
| bun-bundlersecondsky/claude-skills | Skill | 257 | today | MIT | A | 90 | Claude Code |
| bun-ffisecondsky/claude-skills | Skill | 257 | today | MIT | A | 56 | Claude Code |
| cloudflare-workers-multi-langsecondsky/claude-skills | Skill | 257 | today | MIT | A | 45 | Claude Code |