[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BV6JH32VQF14ZEVY1N5X3H":3,"skill-same:01M6BV6JH32VQF14ZEVY1N5X3H":138},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":15,"repositoryHtmlUrl":55,"repositoryHomepageUrl":17,"ownerHtmlUrl":56,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":57,"install":58,"resources":71},"01M6BV6JH32VQF14ZEVY1N5X3H","idiomatic-zig","Zig 高性能编程模式","Production patterns for idiomatic, high-performance Zig from Ghostty and TigerBeetle. Use when writing Zig code that needs to be fast, safe, and maintainable.","来自 Ghostty 和 TigerBeetle 的地道、高性能 Zig 生产级编程模式。在编写需要快速、安全且易于维护的 Zig 代码时使用。","bnferguson\u002Fdotfiles","bnferguson","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47749?v=4","01M6BV4H2TJKK8P14W86V1ZCPP","Brandon Ferguson","01M6BV4H7GJWTZJ1BVHQ1TX11Y",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CA7Z1VJ51NY37VK2NF2DCF","Zig 开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"idiomatic zig","zig","idiomatic","writing","safe","performance","code","fast","Production","ghostty","use","patterns","high-performance","high","for","when","2026-11-10 10:12:30",false,"---\nname: idiomatic-zig\ndescription: \"Production patterns for idiomatic, high-performance Zig from Ghostty and TigerBeetle. Use when writing Zig code that needs to be fast, safe, and maintainable.\"\n---\n\n# Idiomatic Zig: Production Patterns from Ghostty & TigerBeetle\n\nPatterns distilled from two flagship Zig projects:\n\n- **Ghostty** — GPU-accelerated terminal emulator. SIMD optimization, cache-friendly packed structs, offset-based memory addressing, cross-platform abstraction.\n- **TigerBeetle** — Distributed financial database. Static allocation discipline, assertion-driven safety, deterministic simulation testing, io_uring integration. Their [TIGER_STYLE.md](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle\u002Fblob\u002Fmain\u002Fdocs\u002FTIGER_STYLE.md) is one of the best coding style guides ever written.\n\n**Target version:** Zig 0.16. Every example in `examples\u002F` compiles and its tests pass on 0.16.0 — run `.\u002Fcheck.sh` to re-verify. When using the `zig-programming` skill alongside this one, defer to its version detection for API specifics.\n\n0.16 moved enough ground that a few of these idioms changed shape rather than wording. `std.Io` is now an interface value passed like an `Allocator`. The blocking primitives moved out of `std.Thread` into `std.Io`. `@Type` split into `@Struct` \u002F `@Enum` \u002F `@Int` \u002F `@Union` \u002F `@Pointer`. And `main` receives a `std.process.Init` carrying a ready-made allocator and `Io`. Where that changes the *advice* and not just the spelling, it is called out inline below.\n\n## How to Use This Skill\n\nLoad this skill alongside `zig-programming` for production Zig work. This skill provides *idioms and design philosophy*; `zig-programming` provides *syntax, stdlib reference, and version detection*.\n\n**Writing a new module:** Start with [Design Philosophy](#design-philosophy) and [Naming & Style](#naming--style), then load the relevant reference for your domain.\n\n**Optimizing hot paths:** Load `references\u002Fperformance-patterns.md`.\n\n**Reviewing existing code:** Check assertion density (2+ per function), naming conventions, struct field order, and error handling patterns.\n\n### Reference Files (load as needed)\n\n- `references\u002Fmemory-patterns.md` — Allocator strategies, pools, offset addressing, in-place init\n  (grep: `StaticAllocator`, `BitmapAllocator`, `Offset`, `mmap`, `MemoryPool`, `errdefer`, `deinit`, `init.gpa`)\n- `references\u002Fperformance-patterns.md` — SIMD, cache lines, branch hints, hot loop extraction\n  (grep: `@branchHint`, `@prefetch`, `packed struct`, `fastmem`, `@divExact`, `cache_line`)\n- `references\u002Fsafety-and-assertions.md` — Assertion discipline, NASA Power of Ten, pair assertions\n  (grep: `assert`, `fatal`, `maybe`, `comptime unreachable`, `slow_runtime_safety`, `verify`)\n- `references\u002Ftesting-strategies.md` — VOPR, fuzz testing, tripwire error injection, coverage marks\n  (grep: `tripwire`, `VOPR`, `fuzz`, `coverage`, `refAllDecls`, `verifyIntegrity`, `swarm`, `testing.io`)\n- `references\u002Fapi-design-patterns.md` — Options structs, tagged unions, generic type functions, `Io` as a dependency\n  (grep: `Options`, `union(enum)`, `TreeType`, `Renderer`, `callback`, `inline else`, `Io`, `Cancelable`)\n- `references\u002Ftiger-style-principles.md` — Core philosophy from TigerBeetle's style guide\n  (grep: `Power of Ten`, `zero technical debt`, `70-line`, `control plane`, `data plane`)\n\n### Example Files\n\n- `examples\u002Fassertion_patterns.zig` — Comptime assertions, pair assertions, positive\u002Fnegative space\n- `examples\u002Fcomptime_type_generation.zig` — Data table to packed struct + enum + dispatch (`@Struct` \u002F `@Enum`)\n- `examples\u002Fgeneric_type_function.zig` — `FooType()` pattern with comptime callbacks\n- `examples\u002Foptions_struct.zig` — Named arguments via config struct, `Io` threaded positionally\n- `examples\u002Fpacked_struct.zig` — Cache-friendly Cell\u002FRow layout with fast-path skipping\n- `examples\u002Fstatic_allocator.zig` — Three-phase allocator lifecycle\n- `examples\u002Ferror_handling_patterns.zig` — Narrow error sets, translation, errdefer discipline\n- `examples\u002Fconcurrency_patterns.zig` — Dirty flags, atomics, blocking queues over `std.Io.Mutex`\n\n## Design Philosophy\n\n> Full treatment in `references\u002Ftiger-style-principles.md`.\n\n**Safety, performance, developer experience — in that order.** When they conflict, this is the priority. Good style advances all three simultaneously.\n\n**Simplicity is the hardest revision, not the first attempt.** Spend mental energy upfront in design. The \"super idea\" that solves multiple axes simultaneously is what to look for.\n\n**Zero technical debt.** Do it right the first time. What ships must be solid — lacking features is acceptable, lacking quality is not.\n\n**Be explicit.** No hidden control flow, no hidden allocations, no hidden async. Pass options explicitly. Show intent. Minimize dependence on the compiler to do the right thing.\n\n**Put a limit on everything.** All loops, queues, and buffers must have a fixed upper bound.\n\n## Memory Management\n\n> Full treatment and code examples in `references\u002Fmemory-patterns.md`.\n\nKey patterns:\n\n- **Choose the right allocator per layer** — `init.gpa` at top level, `ArenaAllocator` for temp work, `MemoryPool` for fixed-size objects, direct OS allocation for hot paths. In 0.16 do not construct your own top-level allocator: `init.gpa` is already leak-checking in Debug and `smp_allocator`\u002F`c_allocator` in release.\n- **Static allocation after init** — When memory needs are known at startup, allocate everything upfront, then forbid further allocation. A performance choice, not a universal rule.\n- **In-place initialization** — Initialize large structs via out pointers to avoid stack copies. Viral — if any field needs it, the container should too.\n- **deinit sets undefined** — Set `self.* = undefined` after freeing to catch use-after-free in debug builds.\n- **errdefer discipline** — Every fallible init must use `errdefer` to clean up partial state.\n\n## Safety & Assertions\n\n> Full treatment in `references\u002Fsafety-and-assertions.md`.\n\nKey rules:\n\n- **Two assertions per function minimum** in production logic. Assertions are a force multiplier for fuzzing. Trivial helpers and wrappers are exempt.\n- **Pair assertions** — Assert the same property in two different code paths (e.g., before write AND after read).\n- **Assert positive AND negative space** — `assert(index \u003C length)` AND `assert(value != sentinel)`.\n- **Split compound assertions** — `assert(a); assert(b);` over `assert(a and b)` for precise diagnostics.\n- **Comptime assertions** — Assert relationships between constants before execution.\n- **Three-tier error strategy** — `assert` (programmer errors), `fatal` (environmental errors), error unions (operational errors).\n\n## Performance\n\n> Full treatment with SIMD examples in `references\u002Fperformance-patterns.md`.\n\nKey patterns:\n\n- **Think performance at design time** — The 1000x wins come from design, not profiling. Back-of-the-envelope across network\u002Fdisk\u002Fmemory\u002FCPU.\n- **Packed structs for cache-friendly layout** — Design hot data to fit in cache lines. Make the zero value meaningful.\n- **Row flags for fast-path skipping** — Track metadata at the container level to skip expensive per-element work.\n- **`@branchHint`** — Mark cold\u002Funlikely\u002Funpredictable branches explicitly.\n- **Extract hot loops** — Remove `self` from inner-loop functions so the compiler can freely register-allocate.\n- **Show division intent** — `@divExact`, `@divFloor`, `div_ceil` instead of generic `\u002F`.\n\n## Error Handling\n\n- **Narrow error sets** — Define operation-specific error sets, not `anyerror`.\n- **Error translation at boundaries** — Translate subsystem errors to domain-specific names.\n- **`errdefer comptime unreachable`** — After a point where no more errors can occur, document it explicitly.\n\nSee `examples\u002Ferror_handling_patterns.zig` for complete examples.\n\n## Comptime Patterns\n\n> Detailed examples in `references\u002Fapi-design-patterns.md` and `examples\u002Fcomptime_type_generation.zig`.\n\n- **Generic data structures via type functions** — `pub fn FooType(comptime T: type) type { return struct { ... }; }`.\n- **Type generation from data tables** — Define data as a table, generate packed structs and enums at comptime. 0.16 replaced `@Type` with one builtin per kind: `@Struct(layout, backing_int, names, types, attrs)`, `@Enum(Tag, exhaustiveness, names, values)`, `@Int`, `@Union`, `@Pointer`.\n- **`inline else` for comptime dispatch** — Turn runtime enum values into comptime-known values.\n- **Platform selection at comptime** — `pub const Io = switch (builtin.target.os.tag) { ... }`.\n- **Compile-time layout verification** — `comptime { assert(@sizeOf(Cell) == 8); }`.\n\n## Code Organization\n\n- **File-as-struct** — Major types get their own `TitleCase.zig` file; the struct is `@This()`. Lowercase files are namespace modules.\n- **Flat namespacing** — Prefer `stdx.PRNG` over `stdx.random.PRNG`.\n- **Root re-export module** — Package root re-exports public types.\n- **Config\u002Fconstants split** — Raw config in `config.zig`, derived constants in `constants.zig`. Code imports `constants`, never `config` directly.\n- **Struct field order** — Fields first, types next, methods last. Important things near the top.\n- **Scoped logging** — Every module: `const log = std.log.scoped(.module_name);`.\n- **Modular build system** — Keep `build.zig` thin; delegate to file-structs in `src\u002Fbuild\u002F`.\n\n## Naming & Style\n\nFollow the [Zig style guide](https:\u002F\u002Fziglang.org\u002Fdocumentation\u002Fmaster\u002F#Style-Guide). Where Ghostty and TigerBeetle disagree, the Zig stdlib is the tiebreaker.\n\n### Naming Rules\n\n- **Types**: `TitleCase` — `ArrayList`, `Allocator`\n- **Functions\u002Fmethods**: `camelCase` — `insertSlice`, `appendAssumeCapacity`\n- **Functions returning `type`**: `TitleCase` — `fn ArrayList(comptime T: type) type`\n- **Variables and constants**: `snake_case` — `max_connections`, `timeout_ms_default`\n- **File names**: `TitleCase.zig` for file-as-struct, `snake_case.zig` for namespace modules\n\n### Acronyms Are Regular Words\n\nAcronyms follow the same casing rules as any other word, even two-letter ones:\n\n```zig\n\u002F\u002F Correct (stdlib convention):\nconst XmlParser = struct { ... };\nconst TcpServer = struct { ... };\nconst Io = @import(\"Io.zig\");\n\n\u002F\u002F Wrong:\nconst XMLParser = struct { ... };\nconst IO = @import(\"IO.zig\");\n```\n\n> TigerBeetle uses `VSRState` and Ghostty uses `IO` — both deviate from the stdlib. Follow the stdlib (`Io`, `Uri`, `Tcp`, `Tls`).\n\n### Name Quality\n\n- **Units\u002Fqualifiers last**, by descending significance: `latency_ms_max`, not `max_latency_ms`.\n- **Same-length related names**: `source_offset` \u002F `target_offset`, not `src_offset` \u002F `dest_offset`.\n- **No abbreviations** — `source` and `target`, not `src` and `dest`. Exception: primitive loop variables.\n- **Nouns over adjectives** — `replica.pipeline` over `replica.preparing`.\n- **Infuse meaning** — `gpa: Allocator` and `arena: Allocator` over `allocator: Allocator`.\n\n### Formatting\n\n- Run `zig fmt`. 4-space indentation. Hard 100-column limit.\n- Braces on `if` unless it fits on one line.\n- 70-line function limit. Art is born of constraints.\n- Comments are sentences — capital letter, full stop, space after `\u002F\u002F`. Always say **why**.\n\n## API Design\n\n> Full examples in `references\u002Fapi-design-patterns.md`.\n\n- **Options structs** — When arguments can be mixed up (especially multiple integers), use an options struct. Dependencies stay positional, configuration goes in the struct. 0.16's `net.IpAddress.listen(address, io, options)` is the stdlib's own worked example.\n- **`Io` is a dependency, not ambient authority** — Pass `std.Io` like an `Allocator`, most-general first (`gpa, io, ...`). A function with no `Io` parameter cannot block, touch the disk, or be cancelled — a guarantee the compiler enforces, because every `Dir` and `File` operation takes an `Io`.\n- **Tagged unions for state machines** — Express multi-state logic as `union(enum)`, not boolean flags.\n- **Return struct for multiple values** — `struct { row: *Row, cell: *Cell }`.\n- **Callbacks go last** — Mirror control flow. Name with calling function as prefix: `readSector()` \u002F `readSectorCallback()`.\n- **Simpler return types** — Reduce dimensionality: `void` > `bool` > `u64` > `?u64` > `!u64`.\n\n## Testing\n\n> Full treatment in `references\u002Ftesting-strategies.md`.\n\n- **Inline tests** — Place tests alongside the code they test, not in separate files.\n- **Size assertions** — Guard against accidental layout changes with `expectEqual(@sizeOf(T), N)`.\n- **Tripwire error injection** — Inject errors at specific allocation points to test `errdefer` cleanup. Zero-cost in production.\n- **Deterministic simulation** — Stub all non-determinism (clock, network, disk). Seed + commit = reproducible results.\n- **Coverage marks** — Trace from test to production code, proving the test exercises the intended path.\n- **Fuzz every data structure** — Dedicated fuzzer per major data structure. Use swarm testing for better coverage.\n- **Integrity verification** — `verifyIntegrity()` checks all invariants; `assertIntegrity()` is a no-op in release.\n- **`refAllDecls`** — Make sure all declarations at least compile. It is shallow, so also write `_ = &Type.method;` for I\u002FO-shaped functions that have no unit test — Zig never analyses a function nothing reaches, which is how untested code silently rots across a release.\n\n## Concurrency\n\n- **Default to single-threaded** — Design for single-threaded first. Add concurrency only when proven necessary.\n- **Run at your own pace** — Own the event loop. Batch incoming work, process on your schedule.\n- **Dirty flags over locks** — Signal what needs updating via `packed struct` flags rather than locking.\n- **Atomic values for cross-thread state** — `std.atomic.Value(usize)`.\n- **Blocking queues** — Fixed-capacity `BlockingQueue` for producer-consumer between threads.\n- **io_uring on Linux** — Submit batched I\u002FO operations, process completions in a loop. In 0.16 this is `std.Io.Evented`, which selects io_uring, kqueue or Dispatch per target.\n\n### What Moved in 0.16\n\nThe blocking primitives left `std.Thread` for `std.Io`, and they take the `Io` as a parameter:\n\n| 0.15 | 0.16 |\n| --- | --- |\n| `std.Thread.Mutex` | `std.Io.Mutex` |\n| `std.Thread.RwLock` | `std.Io.RwLock` |\n| `std.Thread.Condition` | `std.Io.Condition` |\n| `std.Thread.Semaphore` | `std.Io.Semaphore` |\n| `std.Thread.ResetEvent` | `std.Io.Event` |\n| `std.Thread.WaitGroup` | `std.Io.Group` (`async` \u002F `await` \u002F `cancel`) |\n\nInitialise with the decl literal — `mutex: std.Io.Mutex = .init`, not `= .{}`.\n\n**Atomics and dirty flags did not move.** That is the useful signal: a primitive takes an\n`Io` exactly when it can block. If a type needs no `Io`, it cannot block, and the signature\nsays so without a comment.\n\n**Cancellation is the new cost.** `lock(io)` returns `Cancelable!void`. Propagate that when\nthe wait is genuinely unbounded. Use `lockUncancelable(io)` when the critical section is\nO(1) with no I\u002FO inside it, so a bounded wait does not inflate every caller's return type.\nSee `examples\u002Fconcurrency_patterns.zig`.\n\n## Sources\n\n- [Ghostty](https:\u002F\u002Fgithub.com\u002Fghostty-org\u002Fghostty) — Mitchell Hashimoto\n- [TigerBeetle](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle) — TigerBeetle team\n- [TIGER_STYLE.md](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle\u002Fblob\u002Fmain\u002Fdocs\u002FTIGER_STYLE.md) — TigerBeetle's coding style guide\n","# Idiomatic Zig: Production Patterns from Ghostty & TigerBeetle\n\nPatterns distilled from two flagship Zig projects:\n\n- **Ghostty** — GPU-accelerated terminal emulator. SIMD optimization, cache-friendly packed structs, offset-based memory addressing, cross-platform abstraction.\n- **TigerBeetle** — Distributed financial database. Static allocation discipline, assertion-driven safety, deterministic simulation testing, io_uring integration. Their [TIGER_STYLE.md](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle\u002Fblob\u002Fmain\u002Fdocs\u002FTIGER_STYLE.md) is one of the best coding style guides ever written.\n\n**Target version:** Zig 0.16. Every example in `examples\u002F` compiles and its tests pass on 0.16.0 — run `.\u002Fcheck.sh` to re-verify. When using the `zig-programming` skill alongside this one, defer to its version detection for API specifics.\n\n0.16 moved enough ground that a few of these idioms changed shape rather than wording. `std.Io` is now an interface value passed like an `Allocator`. The blocking primitives moved out of `std.Thread` into `std.Io`. `@Type` split into `@Struct` \u002F `@Enum` \u002F `@Int` \u002F `@Union` \u002F `@Pointer`. And `main` receives a `std.process.Init` carrying a ready-made allocator and `Io`. Where that changes the *advice* and not just the spelling, it is called out inline below.\n\n## How to Use This Skill\n\nLoad this skill alongside `zig-programming` for production Zig work. This skill provides *idioms and design philosophy*; `zig-programming` provides *syntax, stdlib reference, and version detection*.\n\n**Writing a new module:** Start with [Design Philosophy](#design-philosophy) and [Naming & Style](#naming--style), then load the relevant reference for your domain.\n\n**Optimizing hot paths:** Load `references\u002Fperformance-patterns.md`.\n\n**Reviewing existing code:** Check assertion density (2+ per function), naming conventions, struct field order, and error handling patterns.\n\n### Reference Files (load as needed)\n\n- `references\u002Fmemory-patterns.md` — Allocator strategies, pools, offset addressing, in-place init\n  (grep: `StaticAllocator`, `BitmapAllocator`, `Offset`, `mmap`, `MemoryPool`, `errdefer`, `deinit`, `init.gpa`)\n- `references\u002Fperformance-patterns.md` — SIMD, cache lines, branch hints, hot loop extraction\n  (grep: `@branchHint`, `@prefetch`, `packed struct`, `fastmem`, `@divExact`, `cache_line`)\n- `references\u002Fsafety-and-assertions.md` — Assertion discipline, NASA Power of Ten, pair assertions\n  (grep: `assert`, `fatal`, `maybe`, `comptime unreachable`, `slow_runtime_safety`, `verify`)\n- `references\u002Ftesting-strategies.md` — VOPR, fuzz testing, tripwire error injection, coverage marks\n  (grep: `tripwire`, `VOPR`, `fuzz`, `coverage`, `refAllDecls`, `verifyIntegrity`, `swarm`, `testing.io`)\n- `references\u002Fapi-design-patterns.md` — Options structs, tagged unions, generic type functions, `Io` as a dependency\n  (grep: `Options`, `union(enum)`, `TreeType`, `Renderer`, `callback`, `inline else`, `Io`, `Cancelable`)\n- `references\u002Ftiger-style-principles.md` — Core philosophy from TigerBeetle's style guide\n  (grep: `Power of Ten`, `zero technical debt`, `70-line`, `control plane`, `data plane`)\n\n### Example Files\n\n- `examples\u002Fassertion_patterns.zig` — Comptime assertions, pair assertions, positive\u002Fnegative space\n- `examples\u002Fcomptime_type_generation.zig` — Data table to packed struct + enum + dispatch (`@Struct` \u002F `@Enum`)\n- `examples\u002Fgeneric_type_function.zig` — `FooType()` pattern with comptime callbacks\n- `examples\u002Foptions_struct.zig` — Named arguments via config struct, `Io` threaded positionally\n- `examples\u002Fpacked_struct.zig` — Cache-friendly Cell\u002FRow layout with fast-path skipping\n- `examples\u002Fstatic_allocator.zig` — Three-phase allocator lifecycle\n- `examples\u002Ferror_handling_patterns.zig` — Narrow error sets, translation, errdefer discipline\n- `examples\u002Fconcurrency_patterns.zig` — Dirty flags, atomics, blocking queues over `std.Io.Mutex`\n\n## Design Philosophy\n\n> Full treatment in `references\u002Ftiger-style-principles.md`.\n\n**Safety, performance, developer experience — in that order.** When they conflict, this is the priority. Good style advances all three simultaneously.\n\n**Simplicity is the hardest revision, not the first attempt.** Spend mental energy upfront in design. The \"super idea\" that solves multiple axes simultaneously is what to look for.\n\n**Zero technical debt.** Do it right the first time. What ships must be solid — lacking features is acceptable, lacking quality is not.\n\n**Be explicit.** No hidden control flow, no hidden allocations, no hidden async. Pass options explicitly. Show intent. Minimize dependence on the compiler to do the right thing.\n\n**Put a limit on everything.** All loops, queues, and buffers must have a fixed upper bound.\n\n## Memory Management\n\n> Full treatment and code examples in `references\u002Fmemory-patterns.md`.\n\nKey patterns:\n\n- **Choose the right allocator per layer** — `init.gpa` at top level, `ArenaAllocator` for temp work, `MemoryPool` for fixed-size objects, direct OS allocation for hot paths. In 0.16 do not construct your own top-level allocator: `init.gpa` is already leak-checking in Debug and `smp_allocator`\u002F`c_allocator` in release.\n- **Static allocation after init** — When memory needs are known at startup, allocate everything upfront, then forbid further allocation. A performance choice, not a universal rule.\n- **In-place initialization** — Initialize large structs via out pointers to avoid stack copies. Viral — if any field needs it, the container should too.\n- **deinit sets undefined** — Set `self.* = undefined` after freeing to catch use-after-free in debug builds.\n- **errdefer discipline** — Every fallible init must use `errdefer` to clean up partial state.\n\n## Safety & Assertions\n\n> Full treatment in `references\u002Fsafety-and-assertions.md`.\n\nKey rules:\n\n- **Two assertions per function minimum** in production logic. Assertions are a force multiplier for fuzzing. Trivial helpers and wrappers are exempt.\n- **Pair assertions** — Assert the same property in two different code paths (e.g., before write AND after read).\n- **Assert positive AND negative space** — `assert(index \u003C length)` AND `assert(value != sentinel)`.\n- **Split compound assertions** — `assert(a); assert(b);` over `assert(a and b)` for precise diagnostics.\n- **Comptime assertions** — Assert relationships between constants before execution.\n- **Three-tier error strategy** — `assert` (programmer errors), `fatal` (environmental errors), error unions (operational errors).\n\n## Performance\n\n> Full treatment with SIMD examples in `references\u002Fperformance-patterns.md`.\n\nKey patterns:\n\n- **Think performance at design time** — The 1000x wins come from design, not profiling. Back-of-the-envelope across network\u002Fdisk\u002Fmemory\u002FCPU.\n- **Packed structs for cache-friendly layout** — Design hot data to fit in cache lines. Make the zero value meaningful.\n- **Row flags for fast-path skipping** — Track metadata at the container level to skip expensive per-element work.\n- **`@branchHint`** — Mark cold\u002Funlikely\u002Funpredictable branches explicitly.\n- **Extract hot loops** — Remove `self` from inner-loop functions so the compiler can freely register-allocate.\n- **Show division intent** — `@divExact`, `@divFloor`, `div_ceil` instead of generic `\u002F`.\n\n## Error Handling\n\n- **Narrow error sets** — Define operation-specific error sets, not `anyerror`.\n- **Error translation at boundaries** — Translate subsystem errors to domain-specific names.\n- **`errdefer comptime unreachable`** — After a point where no more errors can occur, document it explicitly.\n\nSee `examples\u002Ferror_handling_patterns.zig` for complete examples.\n\n## Comptime Patterns\n\n> Detailed examples in `references\u002Fapi-design-patterns.md` and `examples\u002Fcomptime_type_generation.zig`.\n\n- **Generic data structures via type functions** — `pub fn FooType(comptime T: type) type { return struct { ... }; }`.\n- **Type generation from data tables** — Define data as a table, generate packed structs and enums at comptime. 0.16 replaced `@Type` with one builtin per kind: `@Struct(layout, backing_int, names, types, attrs)`, `@Enum(Tag, exhaustiveness, names, values)`, `@Int`, `@Union`, `@Pointer`.\n- **`inline else` for comptime dispatch** — Turn runtime enum values into comptime-known values.\n- **Platform selection at comptime** — `pub const Io = switch (builtin.target.os.tag) { ... }`.\n- **Compile-time layout verification** — `comptime { assert(@sizeOf(Cell) == 8); }`.\n\n## Code Organization\n\n- **File-as-struct** — Major types get their own `TitleCase.zig` file; the struct is `@This()`. Lowercase files are namespace modules.\n- **Flat namespacing** — Prefer `stdx.PRNG` over `stdx.random.PRNG`.\n- **Root re-export module** — Package root re-exports public types.\n- **Config\u002Fconstants split** — Raw config in `config.zig`, derived constants in `constants.zig`. Code imports `constants`, never `config` directly.\n- **Struct field order** — Fields first, types next, methods last. Important things near the top.\n- **Scoped logging** — Every module: `const log = std.log.scoped(.module_name);`.\n- **Modular build system** — Keep `build.zig` thin; delegate to file-structs in `src\u002Fbuild\u002F`.\n\n## Naming & Style\n\nFollow the [Zig style guide](https:\u002F\u002Fziglang.org\u002Fdocumentation\u002Fmaster\u002F#Style-Guide). Where Ghostty and TigerBeetle disagree, the Zig stdlib is the tiebreaker.\n\n### Naming Rules\n\n- **Types**: `TitleCase` — `ArrayList`, `Allocator`\n- **Functions\u002Fmethods**: `camelCase` — `insertSlice`, `appendAssumeCapacity`\n- **Functions returning `type`**: `TitleCase` — `fn ArrayList(comptime T: type) type`\n- **Variables and constants**: `snake_case` — `max_connections`, `timeout_ms_default`\n- **File names**: `TitleCase.zig` for file-as-struct, `snake_case.zig` for namespace modules\n\n### Acronyms Are Regular Words\n\nAcronyms follow the same casing rules as any other word, even two-letter ones:\n\n```zig\n\u002F\u002F Correct (stdlib convention):\nconst XmlParser = struct { ... };\nconst TcpServer = struct { ... };\nconst Io = @import(\"Io.zig\");\n\n\u002F\u002F Wrong:\nconst XMLParser = struct { ... };\nconst IO = @import(\"IO.zig\");\n```\n\n> TigerBeetle uses `VSRState` and Ghostty uses `IO` — both deviate from the stdlib. Follow the stdlib (`Io`, `Uri`, `Tcp`, `Tls`).\n\n### Name Quality\n\n- **Units\u002Fqualifiers last**, by descending significance: `latency_ms_max`, not `max_latency_ms`.\n- **Same-length related names**: `source_offset` \u002F `target_offset`, not `src_offset` \u002F `dest_offset`.\n- **No abbreviations** — `source` and `target`, not `src` and `dest`. Exception: primitive loop variables.\n- **Nouns over adjectives** — `replica.pipeline` over `replica.preparing`.\n- **Infuse meaning** — `gpa: Allocator` and `arena: Allocator` over `allocator: Allocator`.\n\n### Formatting\n\n- Run `zig fmt`. 4-space indentation. Hard 100-column limit.\n- Braces on `if` unless it fits on one line.\n- 70-line function limit. Art is born of constraints.\n- Comments are sentences — capital letter, full stop, space after `\u002F\u002F`. Always say **why**.\n\n## API Design\n\n> Full examples in `references\u002Fapi-design-patterns.md`.\n\n- **Options structs** — When arguments can be mixed up (especially multiple integers), use an options struct. Dependencies stay positional, configuration goes in the struct. 0.16's `net.IpAddress.listen(address, io, options)` is the stdlib's own worked example.\n- **`Io` is a dependency, not ambient authority** — Pass `std.Io` like an `Allocator`, most-general first (`gpa, io, ...`). A function with no `Io` parameter cannot block, touch the disk, or be cancelled — a guarantee the compiler enforces, because every `Dir` and `File` operation takes an `Io`.\n- **Tagged unions for state machines** — Express multi-state logic as `union(enum)`, not boolean flags.\n- **Return struct for multiple values** — `struct { row: *Row, cell: *Cell }`.\n- **Callbacks go last** — Mirror control flow. Name with calling function as prefix: `readSector()` \u002F `readSectorCallback()`.\n- **Simpler return types** — Reduce dimensionality: `void` > `bool` > `u64` > `?u64` > `!u64`.\n\n## Testing\n\n> Full treatment in `references\u002Ftesting-strategies.md`.\n\n- **Inline tests** — Place tests alongside the code they test, not in separate files.\n- **Size assertions** — Guard against accidental layout changes with `expectEqual(@sizeOf(T), N)`.\n- **Tripwire error injection** — Inject errors at specific allocation points to test `errdefer` cleanup. Zero-cost in production.\n- **Deterministic simulation** — Stub all non-determinism (clock, network, disk). Seed + commit = reproducible results.\n- **Coverage marks** — Trace from test to production code, proving the test exercises the intended path.\n- **Fuzz every data structure** — Dedicated fuzzer per major data structure. Use swarm testing for better coverage.\n- **Integrity verification** — `verifyIntegrity()` checks all invariants; `assertIntegrity()` is a no-op in release.\n- **`refAllDecls`** — Make sure all declarations at least compile. It is shallow, so also write `_ = &Type.method;` for I\u002FO-shaped functions that have no unit test — Zig never analyses a function nothing reaches, which is how untested code silently rots across a release.\n\n## Concurrency\n\n- **Default to single-threaded** — Design for single-threaded first. Add concurrency only when proven necessary.\n- **Run at your own pace** — Own the event loop. Batch incoming work, process on your schedule.\n- **Dirty flags over locks** — Signal what needs updating via `packed struct` flags rather than locking.\n- **Atomic values for cross-thread state** — `std.atomic.Value(usize)`.\n- **Blocking queues** — Fixed-capacity `BlockingQueue` for producer-consumer between threads.\n- **io_uring on Linux** — Submit batched I\u002FO operations, process completions in a loop. In 0.16 this is `std.Io.Evented`, which selects io_uring, kqueue or Dispatch per target.\n\n### What Moved in 0.16\n\nThe blocking primitives left `std.Thread` for `std.Io`, and they take the `Io` as a parameter:\n\n| 0.15 | 0.16 |\n| --- | --- |\n| `std.Thread.Mutex` | `std.Io.Mutex` |\n| `std.Thread.RwLock` | `std.Io.RwLock` |\n| `std.Thread.Condition` | `std.Io.Condition` |\n| `std.Thread.Semaphore` | `std.Io.Semaphore` |\n| `std.Thread.ResetEvent` | `std.Io.Event` |\n| `std.Thread.WaitGroup` | `std.Io.Group` (`async` \u002F `await` \u002F `cancel`) |\n\nInitialise with the decl literal — `mutex: std.Io.Mutex = .init`, not `= .{}`.\n\n**Atomics and dirty flags did not move.** That is the useful signal: a primitive takes an\n`Io` exactly when it can block. If a type needs no `Io`, it cannot block, and the signature\nsays so without a comment.\n\n**Cancellation is the new cost.** `lock(io)` returns `Cancelable!void`. Propagate that when\nthe wait is genuinely unbounded. Use `lockUncancelable(io)` when the critical section is\nO(1) with no I\u002FO inside it, so a bounded wait does not inflate every caller's return type.\nSee `examples\u002Fconcurrency_patterns.zig`.\n\n## Sources\n\n- [Ghostty](https:\u002F\u002Fgithub.com\u002Fghostty-org\u002Fghostty) — Mitchell Hashimoto\n- [TigerBeetle](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle) — TigerBeetle team\n- [TIGER_STYLE.md](https:\u002F\u002Fgithub.com\u002Ftigerbeetle\u002Ftigerbeetle\u002Fblob\u002Fmain\u002Fdocs\u002FTIGER_STYLE.md) — TigerBeetle's coding style guide\n",{"name":5,"description":7},"main","e63965e4644984470d4cc8b3014a8b001f0c2666",".agents\u002Fskills\u002Fidiomatic-zig","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fbnferguson","2026-11-11 03:04:59",{"source":9,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add bnferguson\u002Fdotfiles --skill idiomatic-zig",{"tool":64,"command":65},"bunx","bunx skills add bnferguson\u002Fdotfiles --skill idiomatic-zig",{"tool":67,"command":68},"pnpm","pnpm dlx skills add bnferguson\u002Fdotfiles --skill idiomatic-zig","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002FSKILL.md",true,[72,78,84,88,92,96,100,104,108,112,118,122,126,130,134],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"check.sh","SCRIPT","脚本",990,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fcheck.sh",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"examples\u002Fassertion_patterns.zig","OTHER","其他",3679,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fassertion_patterns.zig",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"examples\u002Fcomptime_type_generation.zig",4441,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fcomptime_type_generation.zig",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"examples\u002Fconcurrency_patterns.zig",7475,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fconcurrency_patterns.zig",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"examples\u002Ferror_handling_patterns.zig",5728,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Ferror_handling_patterns.zig",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"examples\u002Fgeneric_type_function.zig",3753,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fgeneric_type_function.zig",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"examples\u002Foptions_struct.zig",3918,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Foptions_struct.zig",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"examples\u002Fpacked_struct.zig",3433,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fpacked_struct.zig",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"examples\u002Fstatic_allocator.zig",4448,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Fexamples\u002Fstatic_allocator.zig",{"path":113,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fapi-design-patterns.md","REFERENCE","参考文档",9693,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Fapi-design-patterns.md",{"path":119,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Fmemory-patterns.md",8229,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Fmemory-patterns.md",{"path":123,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fperformance-patterns.md",7132,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Fperformance-patterns.md",{"path":127,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fsafety-and-assertions.md",8185,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Fsafety-and-assertions.md",{"path":131,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Ftesting-strategies.md",9613,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Ftesting-strategies.md",{"path":135,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Ftiger-style-principles.md",6239,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fidiomatic-zig\u002Freferences\u002Ftiger-style-principles.md",[139,173,189,221,238,254],{"skillNo":140,"name":141,"nameZh":142,"description":143,"descriptionZh":144,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":145,"licenseFileUrl":146,"sourceHtmlUrl":147,"categories":148,"keywords":155,"publishedAt":47},"01M6BVA3RS3M016FANZ6792F9H","skill-creator","Claude 技能创建指南","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","创建有效技能的指南。当用户想要创建新技能（或更新现有技能），以通过专业知识、工作流或工具集成来扩展 Claude 的能力时，应使用此技能。","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fclaude\u002Fconfig\u002Fskills\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fclaude\u002Fconfig\u002Fskills\u002Fskill-creator\u002FSKILL.md",[149,152],{"categoryNo":150,"categoryName":151,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":153,"categoryName":154,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,45,171,46,172],"creator","skill creator","specialized","workflows","create","update","capabilities","knowledge","tool","integrations","guide","new skill","existing skill","users","with","Existing","new",{"skillNo":174,"name":175,"nameZh":176,"description":177,"descriptionZh":178,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":179,"categories":180,"keywords":187,"publishedAt":47},"01M6BV94WN2RPYM8N6PN8TBNT8","writing-shape","素材成文逐段撰写","Writing, exploit: shape raw material into an article, paragraph by paragraph.","写作，利用（exploit）：将原始素材逐段塑造成一篇文章。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[181,184],{"categoryNo":182,"categoryName":183,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者",{"categoryNo":185,"categoryName":186,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CA3WT74BY17JY9YCJY42FJ","创意写作与内容编排",[188,34],"writing shape",{"skillNo":190,"name":191,"nameZh":192,"description":193,"descriptionZh":194,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":145,"licenseFileUrl":195,"sourceHtmlUrl":196,"categories":197,"keywords":204,"publishedAt":47},"01M6BV8QDFJ6PXBVK5NFBZT5M7","webapp-testing","Playwright 网页应用测试","Test local web applications using Playwright. Use when verifying frontend functionality, debugging UI behavior, capturing browser screenshots, or viewing browser logs.","使用 Playwright 测试本地 Web 应用。适用于验证前端功能、调试 UI 行为、截取浏览器截图或查看浏览器日志。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[198,201],{"categoryNo":199,"categoryName":200,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":202,"categoryName":203,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[205,206,207,208,209,210,211,212,213,214,215,216,217,218,41,219,220,46],"webapp","webapp testing","testing","browser","frontend","screenshots","playwright","test","web","debugging","ui","logs","applications","behavior","local","test local",{"skillNo":222,"name":223,"nameZh":224,"description":225,"descriptionZh":226,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":227,"categories":228,"keywords":235,"publishedAt":47},"01M6BV8MDXKXNVHKS3QF3YDFTF","wait-what","消息重述","Stop. That last message did not land: re-pitch it.","停。上一条消息没有被理解（没说清楚）：换一种方式重新表述。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwait-what\u002FSKILL.md",[229,232],{"categoryNo":230,"categoryName":231,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":233,"categoryName":234,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C1YEW2680C003GGBD6QCKB","回复风格与输出控制",[236,237],"wait what","land",{"skillNo":239,"name":240,"nameZh":241,"description":242,"descriptionZh":243,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":244,"categories":245,"keywords":250,"publishedAt":47},"01M6BV756DJHT5BDA1HVRVHJJ7","prototype","快速原型构建","Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.","构建一个一次性原型来回答设计问题。当用户想要验证某个状态模型或逻辑是否合理，或探索 UI 应该是什么样子时使用。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprototype\u002FSKILL.md",[246,247],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":248,"categoryName":249,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QTSZKB08EAW9P9ZCDNQ","设计评审与架构优化",[240,251,252,215,253],"design","explore","state",{"skillNo":255,"name":256,"nameZh":257,"description":258,"descriptionZh":259,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":260,"categories":261,"keywords":266,"publishedAt":47},"01M6BV6SBW166685KVBPWM2K4N","improve-codebase-architecture","代码库架构优化分析","Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","扫描代码库以发现可深化改进的机会，将其以可视化 HTML 报告的形式呈现，然后对你选中的某一项进行深入质询。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[262,263],{"categoryNo":248,"categoryName":249,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":264,"categoryName":265,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C4ZVS0ZJKF2T2G58PW5VR2","系统架构师",[267,268,269,270],"architecture","improve","improve codebase architecture","report"]