hashiiiii-zig

hashiiiii-zig is a skill for Claude Code from hashiiiii/rules-for-ai. It costs 25 tokens per session (663 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 — 11 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 11 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 663 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.00663
Opus 5.5 $0.00010 $0.00265
Sonnet 5.5 $0.00005 $0.00133
Haiku 4.5 $0.00003 $0.00066

Measured 14d ago against content hash b7b56f44f038, 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 14d 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 · 49 lines

How it starts

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

Zig

Write the smallest implementation that preserves required behavior. Use the project's Zig version and check matching standard-library examples before choosing syntax or APIs.

Structure

  • Keep unit tests in the implementation file. Put end-to-end tests in root e2e/ and exercise public API flows.
  • Export libraries from src/root.zig and executables from src/main.zig.
  • Ensure the test root references test files; Zig does not discover every source file automatically.

Implementation

  • Prefer concrete types, const, inferred .{...} literals, structs, enums, tagged unions, exhaustive switch statements, ordinary functions, and runtime loops. Use comptime, inline, anytype, or reflection only when required.
  • Use file imports within a module and named imports across modules.
  • 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 union-valued failure does not run errdefer.
  • Accept allocators explicitly. Make ownership clear, copy retained input when needed, and store resource owners by value unless a stable address is required.
  • Use undefined only for storage initialized before reading; cast only when inference or representation requires it.

Tests

  • Add or keep a test only when at least 80% confident it is necessary, based on user impact, regression risk, and overlap with existing tests. This threshold concerns necessity, not coverage.
  • Use native test blocks and std.testing; name and assert the public behavior under test, not private layout or dependency guarantees.
  • Keep each test self-contained with literal inputs and expected values. Avoid shared fixtures, computed expectations, and case tables that obscure the assertion.
  • Comment on why behavior matters. Use real dependencies; never use mocks or stubs.
  • For allocations, use std.testing.allocator and release owned resources with defer.
test "parse rejects duplicate modifiers" {
    // Duplicate modifiers can hide configuration mistakes.
    try std.testing.expectError(error.InvalidKey, KeySpec.parse("Ctrl+Ctrl+x"));
}

Read the full file on GitHub · 49 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. 14d ago Changed · -10 lines b7b56f44f038
  2. 2mo 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 10d ago), licensed MIT. It adds 25 tokens to every session and 663 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

hashiiiii-zig compared with skills from other repositories

hashiiiii-zig next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hashiiiii-zighashiiiii/rules-for-aiSkill1010d agoMITA25Claude Code
loom-ccosmix/loomSkill66todayMITA25Claude Code, Codex
laravel-testingFoysal50x/skillsSkill121mo agoMITA83Claude Code
testing-expertJosephSanjaya/skillsSkill51mo agoMITA115Claude Code, Codex
cpp-testingAeonDave/malskillSkill466d agononeA51Claude Code, Codex
cpp-testinggongyijie85/dsh-eccSkill1312d agoMITA34Claude Code, Codex
cpp-testingx-cmd/skillSkill264mo agoApache-2.0A34Claude Code, Codex