zig
Skill3.9k starsChanged 9 days agoApache-2.0View on GitHub
Write, review, refactor, and upgrade Zig 0.17 code (0.17.0 and 0.17.1) with correct ownership, error sets, I/O, concurrency, tests, and build modes, and without removed, deprecated, or silently changed 0.17 APIs. Use for any .zig or build.zig edit; for allocator, lifetime, error-set, std.Io, thread, fuzzing, ReleaseSafe or ReleaseFast, and binary size questions; when 0.16 code fails on 0.17, or 0.17 code fails on 0.16 with errors such as "no field or member function named 'print'"; when replacing std.fmt.allocPrint, bufPrint, std.mem.indexOf, copyForwards, std.fs.path, builtin.os, DebugAllocator, or @intFromEnum; when `**`, errdefer captures, @cImport, or @hasDecl behave differently; when migrating 0.16 code, merging an upgraded main into a 0.16 branch, or installing 0.17 next to another Zig; when asked what 0.17 or 0.17.1 changed, fixed, or still breaks; or when the user invokes $zig.
9 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- gkurt/ai-soulstheir own version, first seen Nov 8, 2026
- TeddyAlbina/skillstheir own version, first seen Nov 1, 2026
- nzrsky/zig-skillstheir own version, first seen Oct 15, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- vercel-labs/nativetheir own version, first seen Oct 13, 2026
- vercel-labs/zero-nativetheir own version, first seen Oct 8, 2026
Who's talking about vercel-labs/fx
- A Hacker News story“Fx: Unix Like Coding Agent”Hacker News · Aug 18, 2026 · 5 points
- A Hacker News story“fx: Unix Like Coding Agent from Vercel Labs”Hacker News · Oct 22, 2026 · 2 points
- @mint-echosphere.bsky.social“fx、7.8MiBのZig製コーディングエージェントと聞くと、つい「軽いなら気軽に全部任せられる?」って思っちゃいます。でもREADMEを読むと、軽いのはまずハーネスとCLIの話でした🌿…”Bluesky · Aug 21, 2026 · 2 likes
- @aibiznes.bsky.social“Vercel выпустила агента для программирования fx Vercel представила агента для кодинга под названием fx. Он …”Bluesky · Aug 22, 2026 · 1 likes
- @sigmanor.net“https://github.com/vercel-labs/fx”Bluesky · Aug 21, 2026 · 1 likes
The biggest 5 of 37 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 37
Talked about on GitHub, Bluesky and Hacker News (37 times).
On GitHub · 32
- Aug 20, 2026fx-sh: init at 0.0.16 — NixOS/nixpkgs1 reaction · 5 comments
- Aug 19, 2026fx: init at 0.0.3 — numtide/llm-agents.nix1 reaction
- Aug 19, 2026Add fx agent — agentclientprotocol/registry1 reaction
- Nov 7, 2026Bump libfx from 0.0.10 to 0.0.16 — razaanstha/ulka0 reactions
- Nov 6, 2026build(deps): bump libfx from 0.0.14 to 0.0.16 — united-states-arak/wallex0 reactions
27 more on GitHub
- Nov 5, 2026data(fx): platforms are macOS and Linux only — benjamincanac/whichcodingtools0 reactions · 1 comment
- Nov 2, 2026feat: import local FX terminal sessions — OrchestratorInc/agent-orchestrator0 reactions · 1 comment
- Nov 1, 2026Add a Windows build of fx — maskarajr/fx0 reactions
- Oct 31, 2026Add fx to the preconfigured coding agents — alphaXiv/OpenResearch0 reactions
- Oct 31, 2026Bump libfx from 0.0.10 to 0.0.15 — razaanstha/ulka0 reactions · 1 comment
- Oct 31, 2026Update fx to 0.0.16 — gominimal/pkgs0 reactions · 2 comments
- Oct 29, 2026Support Hermes Agent, FX/libfx, and Oh My Pi (OMP) as engines — savannahfeder/agentbox0 reactions
- Oct 24, 2026Bump libfx from 0.0.10 to 0.0.14 — razaanstha/ulka0 reactions · 1 comment
- Oct 23, 2026RFC: optional native Tern surface over FX ACP — kvnloo/fx0 reactions · 1 comment
- Oct 23, 2026Add optional Tern semantic surface on FX ACP — kvnloo/fx0 reactions · 1 comment
- Oct 22, 2026[onboarding] vercel-labs/fx — DefuzeX-AI/AgentBehaviorBench0 reactions · 4 comments
- Oct 16, 2026Record libfx queue namespace when creating World runs — kvnloo/fx0 reactions
- Oct 16, 2026Keep multiline host-tool JSON within one native JSON-RPC frame — kvnloo/fx0 reactions · 7 comments
- Oct 13, 2026Add support for fx CLI (Vercel) — cristicretu/diri0 reactions · 1 comment
- Oct 12, 2026Add support for `fx` — kenn-io/agentsview0 reactions · 1 comment
- Oct 12, 2026fx.sh now states a 6.74 MiB binary, description says a 6 MB CLI — benjamincanac/whichcodingtools0 reactions · 1 comment
- Oct 10, 2026Bump libfx from 0.0.10 to 0.0.13 — razaanstha/ulka0 reactions · 1 comment
- Oct 4, 2026shouryamaanjain/session-history does not support fx 0.0.13 — shouryamaanjain/openmods0 reactions
- Sep 29, 2026Integrate with Vercel fx — codeaholicguy/ai-devkit0 reactions
- Sep 17, 2026Retain subagent statusline upon completion — scotttrinh/fx0 reactions
- Sep 10, 2026Add fx (Vercel Labs) v0.0.8 — agentclientprotocol/registry0 reactions · 1 comment
- Aug 28, 2026[RESEARCH] fx Core Library API Surface for Mobile — 10xdev4u-alt/fx-mobile0 reactions · 1 comment
- Aug 28, 2026[RESEARCH] Subagent Architecture for Mobile — 10xdev4u-alt/fx-mobile0 reactions · 1 comment
- Aug 28, 2026[RESEARCH] MCP Server Support on Android — 10xdev4u-alt/fx-mobile0 reactions · 1 comment
- Aug 28, 2026[RESEARCH] Inference Engine: Xybrid (local) + Kilo (cloud) — 10xdev4u-alt/fx-mobile0 reactions · 3 comments
- Aug 23, 2026[HARNESS]: fx adapter must target ~/.fx (mcp.json root key 'mcp', array-form command) — current ~/.config/fx/fx.json is fictional — mastepanoski/ce-ai0 reactions · 1 comment
- Aug 18, 2026[Tool Submission] fx.sh — QAInsights/awesome-ai-tools0 reactions
On Bluesky · 3
- Aug 21, 2026fx、7.8MiBのZig製コーディングエージェントと聞くと、つい「軽いなら気軽に全部任せられる?」って思っちゃいます。でもREADMEを読むと、軽いのはまずハーネスとCLIの話でした🌿… — @mint-echosphere.bsky.social2 likes and reposts · 1 reply
- Aug 22, 2026Vercel выпустила агента для программирования fx Vercel представила агента для кодинга под названием fx. Он идёт против текущего тренда —… — @aibiznes.bsky.social1 likes and repost
- Aug 21, 2026https://github.com/vercel-labs/fx — @sigmanor.net1 likes and repost
On Hacker News · 2
- Aug 18, 2026Fx: Unix Like Coding Agent5 points · 1 comment
- Oct 22, 2026fx: Unix Like Coding Agent from Vercel Labs2 points
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- vercel-labs/native★ 7.8ksame name
- vercel-labs/zero-native★ 7.8ksame name
- rudedogg/zig-skills★ 39same name
- G1Joshi/Agent-Skills★ 15same name
- nzrsky/zig-skills★ 14same name
- TeddyAlbina/skills★ 2same name
- aresbit/claude-skills★ 0same name
- gkurt/ai-souls★ 0same name
- zig-incubator/zig-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- sdk/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- fx-cli-shapeSkill
- technical-writerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Read .minimum_zig_version in build.zig.zon and run zig version.
- Very specific: line 36
0.16 on a 0.17 project: do not build with it. It reports correct code as broken (no field or member function named 'print' in …
- Very specific: line 47
Never upgrade, relink, or replace a shared zig.
- Distinctive: line 52
Before editing, map the contract: ownership, borrowing, lifetimes, allocation, errors, external bounds, thread ownership, and build-mode …
- Distinctive: line 60
Every allocation has one owner and a cleanup path on success and failure.
- Distinctive: line 61
No pointer or slice outlives its storage or survives a mutation that can reallocate it.
- Very specific: line 88
std.mem.eqlandfindDiffon floats: no longer treat a slice as equal to itself (NaN is not equal to NaN). - Distinctive: line 168
New code: use only the right-hand columns above, and before reporting it done, require exit 0 from the scanner (no finding to fix, every …
- Distinctive: line 177
Read toolchain first if CI, release targets, or OS minimums change.
- Very specific: line 192
Run check_deprecated.py --review, replace what remains, and read every review hotspot against the six behavior changes above.
- Distinctive: line 195
Add a test for each silent change you fix, so a later merge cannot undo it, and report anything left deprecated on purpose.
- Very specific: line 202
Reviewing: run the scanner on the changed files, and treat a new @hasDecl probe, containsAtLeastScalar call, or @bitCast of an array, …
- Very specific: line 211
Use the repository's commands first.
- Distinctive: line 213
Add only what the claim needs: a fuzz target when parsing or untrusted bytes changed, Debug and ReleaseSafe when safety checks could …
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zig 0.17
What Zig 0.17.x changed, and the rules that keep Zig correct under failure, concurrency, and later change. The facts were checked against the 0.17.0 and 0.17.1 standard library and compiler and a real 0.16 to 0.17 port. Trust them and the bundled scripts; read std source only for an API this skill lacks.
Repository instructions (AGENTS.md and similar), build.zig, and
build.zig.zon come first and override this skill. Keep established patterns
unless they cause a correctness, safety, or ownership defect. For another Zig
release, use only the version-independent references and check std in its source.
Check the compiler first
Read .minimum_zig_version in build.zig.zon and run zig version. Neither
0.16 nor 0.17 enforces that field, so a wrong compiler fails late and misleadingly.
- 0.16 on a 0.17 project: do not build with it. It reports correct code as
broken (
no field or member function named 'print' in 'mem.Allocator',no field named 'debug' in enum 'builtin.OptimizeMode'); never "fix" that back to 0.16 names. Find a 0.17 compiler withwhich -a zigand in versioned install directories, and run it by absolute path orPATH=<dir>:$PATH. - 0.17.0 and 0.17.1: the language and LLVM 22.1.8 are the same, but 0.17.1
fixes miscompilations, changes a few std signatures, and changes two
behaviors silently: ending a
std.httprequest that sent a body now reads its unread answer to the end, and-femit-llvm-bcis now optimized. Build and test with the pinned patch release; toolchain lists what 0.17.1 fixed and still breaks. - Never upgrade, relink, or replace a shared
zig. Install a missing release next to the others, or ask, and say which checks did not run on it.
Working method
Before editing, map the contract: ownership, borrowing, lifetimes, allocation, errors, external bounds, thread ownership, and build-mode assumptions. Make invalid states hard to express with enums, tagged unions, optionals, and named error sets. Keep allocation, blocking I/O, mutation, and ownership transfer visible in signatures or doc comments. Make the smallest coherent change, and do not widen a shared contract for one caller. These are correctness issues, not style:
- Every allocation has one owner and a cleanup path on success and failure.
- No pointer or slice outlives its storage or survives a mutation that can reallocate it.
- External lengths, offsets, counts, recursion, retries, queues, and captured output are validated and bounded before arithmetic, allocation, or slicing.
- Assertions and
catch unreachableguard program-owned invariants only; malformed external data gets normal error handling in every build mode. - Integer conversions and arithmetic have stated range and overflow reasoning.
- Shared mutable state has an owner and a synchronization policy, and cancellation or shutdown leaves no thread or resource behind.
- Public contracts state ownership and do not expose
anyerror,anytype, or internal mutable storage by accident.
Changes that compile but change behavior
A clean build proves none of these. Check every one during a migration.
@hasDeclonly seespubdeclarations, even in the same file, so a probe of a private one silently turns a feature off. Make itpub.std.mem.containsAtLeastScalar(T, list, element, minimum)swapped its last two parameters (0.16:minimum, element); oldu8calls compile and answer wrongly. SlicecontainsAtLeastkeeps(haystack, count, needle).@bitCastwas redefined. Array and vector casts concatenate logical bit representations (endian-agnostic).extern struct/extern unionoperands are rejected; pun through@as(*align(1) const T, @ptrCast(&value)). A cast to an enum safety-checks the tag.@tagName(builtin.optimize)yieldsdebug,safe,fast,small; map it when a user sees the label.std.mem.eqlandfindDiffon floats no longer treat a slice as equal to itself (NaN is not equal to NaN).std.array_list.Managed(and sostd.json.Array) has a requiredpointer_stabilityfield: use.init(gpa)or.fromOwnedSlice(gpa, items).
Removed: these no longer compile
| 0.16 | 0.17 |
[1]T{v} ** n, "ab" ** n | const a: [n]T = @splat(v);; repeated strings need a comptime helper (language) |
errdefer |err| ... | Split the function and handle the error in the caller |
void{}, i0 | {}, u0 |
@cImport | The translate-c package (build system) |
opt == .ReleaseSafe and the other old tags in == or != | .debug, .safe, .fast, .small |
std.heap.StackFallbackAllocator, stackFallback | std.heap.BufferFirstAllocator.init(buffer, fallback) |
@typeInfo(T).@"struct".fields | .field_names, .field_types, .field_attrs, .decl_names |
b.build_root, if (b.args) |a| run.addArgs(a) | b.root (a Cache.Path), run.addPassthruArgs() |
The full list, with std.ascii, bit sets, packed ints, and ZON, is in std.
Deprecated: still compiles, do not write it
| Deprecated | Use |
std.fmt.allocPrint(gpa, f, a) | gpa.print(f, a) (same error set) |
std.fmt.bufPrint, bufPrintSentinel, BufPrintError | std.mem.print, std.mem.printSentinel, std.mem.PrintError |
std.mem.indexOf*, lastIndexOf* | std.mem.find, findScalar, findAny, findPos, findLast, findScalarLast, findLastAny |
std.mem.copyForwards(T, d, s), copyBackwards | @memmove(d[0..s.len], s); @memmove requires equal lengths |
anything in std.fs | std.Io.Dir.path, std.Io.Dir.max_path_bytes, std.Io.Dir.max_name_bytes |
path.resolve, path.relative | std.Io.Dir.path.resolveAlloc, relativeAlloc |
@import("builtin").os, .cpu, .abi, .object_format | builtin.target.os, .target.cpu, .target.abi, .target.ofmt |
builtin.mode, std.debug.runtime_safety | builtin.optimize, builtin.optimize.runtimeSafety() |
std.builtin, std.lang.OptimizeMode | std.lang, std.lang.Optimize |
@intFromEnum, @enumFromInt | @backingInt, @fromBackingInt (zig fmt rewrites them) |
std.ArrayListUnmanaged, *ArrayHashMapUnmanaged, *BitSet* | std.ArrayList, std.array_hash_map.String/Auto/Custom, std.bit_set.Integer/Array/Static/Dynamic |
list.getLast(), getLastOrNull() | list.last().?, list.last() |
std.heap.DebugAllocator (deprecated) | std.heap.SafeAllocator |
std.unicode.utf8Decode | Validate with utf8ByteSequenceLength, then utf8Decode2/3/4 |
std.meta.fieldNames, fieldInfo, fieldTypes | @typeInfo |
Run addArtifactArg, addFileArg, addPrefixed*Arg, ... | addArtifactArg2(x, .{ .prefix = "-p" }), addFileArg2, ... |
b.addTranslateC | The translate-c package |
Most rows forward to their replacement, so the rename cannot change behavior.
Three can: copyForwards (lengths), utf8Decode (validation), and
DebugAllocator, which is not an alias of SafeAllocator. Rarer deprecations
are in std.
Entry point, I/O, and allocators
pub fn main(init: std.process.Init) !void {
const greeting = try init.gpa.print("hello, {s}", .{"zig"});
defer init.gpa.free(greeting);
var buffer: [4096]u8 = undefined;
var stdout = std.Io.File.stdout().writer(init.io, &buffer);
try stdout.interface.print("{s}\n", .{greeting});
try stdout.interface.flush();
}init.gpais astd.heap.SafeAllocatorin Debug and ReleaseSafe builds and reports leaks whenmainreturns, without changing the exit code. Other builds getstd.heap.c_allocatorwhen linking libc andsmp_allocatorotherwise. Do not hand-build that switch.init.iois astd.Io.Threaded: pass it down instead of creating another.init.arenalives until exit;init.environ_mapandinit.minimal.argshold the environment and arguments.pub fn main() !voidgets neither.- Pick allocators by lifetime:
std.testing.allocatorin tests,SafeAllocatorfor leak checks (never in production: it never reuses memory), anArenaAllocatorper request or batch,FixedBufferAllocatorfor bounded scratch, andstd.heap.smp_allocatorfor shared concurrent use. std.Io.Eventeddoes not compile on 0.17.0 or 0.17.1; usestd.Io.Threaded.std.ArrayList(T)starts as.emptyand takes the allocator per call. Growth can move storage: take interior pointers after reserving capacity.- Reading
undefinedis illegal behavior. Narrow withstd.math.cast; use@intCastonly after the range is proven. Locks,Child.Term, and cancellation are in io-concurrency-security.
Writing, migrating, and reviewing
New code: use only the right-hand columns above, and before reporting it done, require exit 0 from the scanner (no finding to fix, every path read):
python3 <this skill>/scripts/check_deprecated.py <files or directories>Migrating 0.16 code:
- Read toolchain first if CI, release targets, or OS minimums change.
Apply the mechanical renames, then let
zig fmt(0.17) rewrite@intFromEnumand@enumFromInt:python3 <this skill>/scripts/migrate.py --write <files or directories> zig fmt <files or directories>scripts/migrate.pyonly makes exact forwarding renames outside strings and comments, prints aNOTEwhere judgment is needed, never writes through a link, and without--writeonly reports.- Zig analyzes lazily: build every artifact the project ships and run the full test suite.
- Run
check_deprecated.py --review, replace what remains, and read every review hotspot against the six behavior changes above. Rewrite eachcopyForwardssite by hand, trimming the destination tos.len. - Add a test for each silent change you fix, so a later merge cannot undo it, and report anything left deprecated on purpose.
Merging an upgraded main into a 0.16 branch: merge, do not rebase. Take
main's side where a conflict differs only in 0.16 spellings; keep the branch's
behavior changes, written the 0.17 way. Then run steps 2 to 4 on the result.
Reviewing: run the scanner on the changed files, and treat a new
@hasDecl probe, containsAtLeastScalar call, or @bitCast of an array,
extern struct, or enum as a question. Rank memory safety, illegal behavior,
races, and leaks first, then contracts, then maintainability, then measured
speed or size. Correctness findings block; design alternatives are
considerations with their tradeoff.
Verification gate
Use the repository's commands first; otherwise run zig fmt --check on the
project's Zig paths, zig build, and zig build test with the pinned compiler.
Add only what the claim needs: a fuzz target when parsing or untrusted bytes
changed, Debug and ReleaseSafe when safety checks could matter, a cross-compile
for portability, ReleaseFast or ReleaseSmall for their speed or size, and the
built executable for runtime claims. Say what could not run.
References
Load one only when the task needs more than this file:
- types-memory-errors: data models, allocators, lifetimes, error sets, arithmetic, casts, generics, state machines.
- api-maintainability: public APIs, module boundaries, naming, documentation, refactors.
- io-concurrency-security:
std.Io, files, sockets, subprocesses, paths, threads, locks, atomics, external input. - testing-build-size: tests, fuzzing, build modes, dependencies, performance, binary size.
- language: 0.17 casts, builtins, comptime, reflection, and removed syntax, with before and after code.
- std: exact 0.17 signatures, allocators, containers, ZON, rare deprecations.
- build-system:
build.zig,build.zig.zon, packages, translate-c, editor tooling. - toolchain: installing a Zig next to another, CI, targets, OS minimums, what 0.17.1 fixed and still breaks, port gotchas.
- examples.zig: compile-checked snippets;
zig test references/examples.zigpasses on 0.17.0 and 0.17.1.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

