hashiiiii-zig

hashiiiii-zig is a skill for Claude Code from hashiiiii/rules-for-ai. It costs 25 tokens per session (783 once invoked), scanned A, original, MIT.

A set of project rules for writing, editing, and reviewing Zig code, tests, build files, and continuous-integration configuration. Zig is a programming language, and CI is the automated process that builds and tests code after changes.

In plain words
What is it for?
It guides implementation, module imports, compile-time code, error handling, unit tests, end-to-end tests, library and executable layout, and test discovery.
Why use it?
It gives an agent consistent conventions for Zig projects, reducing choices about file layout, types, imports, errors, and test placement. It also distinguishes ordinary unit tests from end-to-end tests that exercise complete public flows.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rules-for-ai plugin — 8 skills, 2 hooks shipped together

Good fit It guides implementation, module imports, compile-time code, error handling, unit tests, end-to-end tests, library and executable layout, and test discovery.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashiiiii/rules-for-ai/hashiiiii-zig
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hashiiiii/rules-for-ai --skill hashiiiii-zig
Clone the repo
git clone --depth 1 https://github.com/hashiiiii/rules-for-ai

Made for: Claude Code.

Or install rules-for-ai, the plugin that ships this one along with the rest of its 8 skills, 2 hooks.

Wrote 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.

agentmods badge for hashiiiii-zig

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashiiiii/rules-for-ai/hashiiiii-zig/github.svg)](https://agentmods.dev/skills/hashiiiii/rules-for-ai/hashiiiii-zig)
Your own site
<a href="https://agentmods.dev/skills/hashiiiii/rules-for-ai/hashiiiii-zig"><img src="https://agentmods.dev/badge/skills/hashiiiii/rules-for-ai/hashiiiii-zig/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.

agentmods 80×15 button for hashiiiii-zig

Your own site · 80×15
<a href="https://agentmods.dev/skills/hashiiiii/rules-for-ai/hashiiiii-zig"><img src="https://agentmods.dev/badge/skills/hashiiiii/rules-for-ai/hashiiiii-zig.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 783 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00783
Opus 5.5 $0.00010 $0.00313
Sonnet 5.5 $0.00005 $0.00157
Haiku 4.5 $0.00003 $0.00078

Measured 19d ago against content hash fc43a1a9f7bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hashiiiii-zig 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 19d 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.

skills/hashiiiii-zig/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zig

Write the smallest implementation that preserves the required behavior. Use the project's Zig version. Read a few matching examples in that version's standard library before choosing syntax or APIs.

Structure

  • Keep unit tests in the implementation file: tests for src/parser.zig belong in src/parser.zig.
  • Put end-to-end tests in e2e/ at the repository root. Exercise real public API flows.
  • Use src/root.zig for library exports and src/main.zig for executables.
  • Ensure the test root references files containing tests; Zig does not discover every source file automatically.

Implementation

  • Prefer concrete types, const, inferred .{ ... } literals, struct, enum, union(enum), and exhaustive switch.
  • Use ordinary functions and runtime loops when they express the behavior directly.
  • Prefer file imports within a module, such as @import("parser.zig"). Use named imports for separate module dependencies.
  • Use comptime or inline when evaluation must happen at compile time. Use anytype or reflection for necessary type-dependent code.
  • Propagate errors with try; use catch for recovery or translation. Reserve unreachable for proven invariants.
  • Use defer for cleanup and errdefer for error returns. A failure returned as a union value does not run errdefer.
  • Accept allocators explicitly. Store resource owners by value unless retained pointers or allocator handles require a stable address.
  • Make owned and borrowed slices clear. Copy retained input when the result must outlive it.
  • Use undefined only for storage initialized before reading. Add casts only when inference or representation requires them.

Tests

  • Keep or add tests only when at least 80% confident they are necessary. Remove lower-confidence tests and add missing necessary ones.
  • Judge user impact, regression risk, and overlap with other tests. The threshold concerns necessity, not code coverage.
  • Use native test blocks and std.testing expectations. Name the concrete behavior being checked.
  • Assert public behavior, not private layout or dependencies' own guarantees.
  • Write each test from setup to assertion. Keep inputs and expected values literal and setup local.
  • Avoid shared fixtures, computed expectations, and case-table loops that make readers reconstruct the behavior.
  • Explain why the behavior matters in comments. Use real dependencies; never use mocks or stubs.
  • For allocations, use std.testing.allocator and release owned resources with defer.

Read the full file on GitHub · 59 lines

Changes

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.

  1. 19d ago First seen · 59 lines · 25 tokens per session scan A fc43a1a9f7bf

Subscribe to this mod's changes

hashiiiii-zig is a skill published in the GitHub repository hashiiiii/rules-for-ai (10 stars, last pushed 7d ago), licensed MIT. It adds 25 tokens to every session and 783 once invoked, about $0.0001 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-27.

Related

Other skills, from other repositories

loom-c

C language expertise (C11/C17/C23) for memory-safe, portable, production-quality systems code.

cosmix/loom · 25 tokens

testing-expert

Ultimate Kotlin testing skill. Use this whenever writing, reviewing, or debugging ANY Kotlin test — unit, integration, property-based, or coroutine. Covers TDD (RED/GREEN/REFACTOR), Kotest + MockK + Kover, anti-pattern detection, and four-pillar quality framework. Triggers on: write a test, add coverage, why is this…

JosephSanjaya/skills · 115 tokens

laravel-testing

Test strategy for a layered Laravel application — which test style fits each layer, hand-written fakes over mocks, real-database tests for Query Classes and Repositories, pure tests for Value Objects, and feature tests that assert authorization, payload shape and query counts. Use when writing or reviewing Laravel…

Foysal50x/skills · 83 tokens

cpp-testing

C++ testing workflow for unit and integration tests: GoogleTest/GoogleMock, CMake/CTest integration, diagnosing flaky tests, and running sanitizers and coverage for correctness signal. Use when writing or fixing C++ tests and test infrastructure.

AeonDave/malskill · 51 tokens

cpp-testing

Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.

gongyijie85/dsh-ecc · 34 tokens

cpp-testing

Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.

x-cmd/skill · 34 tokens