An Agent Skill for the Zig programming language, targeting version 0.16.0.
完成 Zig skill 的 0.16.0 刷新。主要更新内容:
SKILL.md
- 版本号更新为 v0.16.0
- 新增 Critical: 0.16.0 Breaking Changes 章节,涵盖:
- @Type 移除 → @Int/@Struct/@Union/@Enum/@Pointer/@Fn/@Tuple/@EnumLiteral
- @cImport 废弃 → b.addTranslateC() 在 build system 中处理
- @intFromFloat 废弃 → @floor/@ceil/@round/@trunc 直接转整数
- 运行时 vector 索引禁止
- 禁止返回局部变量地址(现为编译错误)
- packed struct/union 禁止包含指针
- extern 上下文要求显式 backing type
- packed union 字段大小约束
- 新增 0.16.0 Additive Changes:switch 增强、小整数隐式转 float、一元 float builtin 转发结果类型、packed union(T) 语法、显式对齐指针类型区分、lazy field analysis 等
- Quick Fixes 表新增 0.16.0 相关错误及修复
引用文件更新
- references/builtins.md:@Type 标记为 REMOVED 并列出替代 builtin;@intFromFloat 和 @cImport 标记为 DEPRECATED
- references/comptime.md:类型生成示例从 @Type 改为 @Union;类型反射表格更新
- references/std-build.md:新增 C Translation (0.16.0) 章节,说明 addTranslateC 用法
- references/code-review.md:标题更新为 0.16.0;Removed Language Features 表格新增 @Type、运行时 vector 索引、返回局部变量地址等检查项
- references/std-log.md、std-hash.md、patterns.md:修复了旧语法引用(@Type(.enum_literal) → @EnumLiteral,@intFromFloat → @trunc)
LLMs struggle with Zig more than languages like TypeScript or Swift. The language is still evolving, there's less training data available, and models frequently use deprecated or removed syntax. This skill provides up-to-date context to guide models toward correct, idiomatic Zig code.
- SKILL.md: 357 lines covering critical patterns and common mistakes
- references/: 51 files totaling ~21,500 lines of documentation
- Standard library module documentation
- Idiomatic patterns (from Zig Code Patterns)
- Build system guidance
- Language reference content
Generated using Claude Opus 4.5 with the Zig standard library source code as context. Each module was documented by feeding the model the actual source files and using the skill-creator to structure the output.
The methodology prioritizes grounding the model in real source code rather than hallucinated documentation.
See https://austinrude.com/blog/making-a-zig-agent-skill/ for details.
Install the zig directory into ~/.claude/skills/ per Claude Code skill documentation.
Example prompt:
Using the zig skill please review @src/ and help me improve the codebase.
Please open an issue if you find any hallucinations, inaccuracies, or outdated patterns. No need to write a detailed report with a fix—just knowing about the problem helps improve the skill.
This skill follows the Agent Skills Specification.
MIT