zig-docs

A set of working rules for writing and reviewing Zig, a systems programming language. It requires checking current Zig documentation and the local compiler version before making technical decisions.

In plain words
What is it for?
Use it to check Zig versions and documentation, review language behavior, plan performance-sensitive code, and measure optimization results.
Why use it?
Zig APIs can change between releases, so relying on memory can lead to incorrect code or outdated advice.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/gbrlpzz/zig-docs-mcp/zig-docs
Any agent
npx skills add gbrlpzz/zig-docs-mcp --skill zig-docs
Clone the repo
git clone --depth 1 https://github.com/gbrlpzz/zig-docs-mcp

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 483 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00069 $0.00483
Opus 5 $0.00034 $0.00242
Sonnet 5 $0.00014 $0.00097
Haiku 4.5 $0.00007 $0.00048

Measured yesterday against content hash 9e8f1dec211e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zig-docs 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 yesterday.

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/zig-docs/SKILL.md · 38 lines

What it actually says

Zig work rules (fresh docs + lightweight-performance discipline)

Use with the zig-docs-mcp skill (zdoc singleton). The point: never trust memory about Zig APIs (they churn between minor releases), always serve the LATEST release's truth, and default to high-performance lightweight patterns.

Workflow

  1. Version gateawait zdoc.zig_version_status() at the start of any Zig task that touches the local toolchain. If up_to_date is false:
    • tell the user plainly: local X < latest Y,
    • run await zdoc.zig_update() and summarize the dry-run plan,
    • update only after they agree: await zdoc.zig_update(dry_run=False, confirm=True).
  2. Docs before code — for any non-trivial API use:
    • await zdoc.zig_std(symbol="std.the.Symbol") for exact signatures/docs,
    • await zdoc.zig_langref(section=...) for language semantics,
    • await zdoc.zig_changelog() when upgrading across versions.
  3. Performance by default — consult await zdoc.perf_guidance(topic=...) when designing modules: allocation strategy first, data layout second, comptime third.
  4. Claims need mechanics — justify performance claims mechanically (bytes copied, cache misses, syscalls, pages mapped). Cite the doc version you used.
  5. Lightweight bias — prefer fewer dependencies, smaller binaries, lazy init, zero-copy parsing, arena lifecycles. Delete work; don't optimize it.

Anti-patterns

  • Answering Zig API questions from training memory without checking zdoc.
  • Writing Zig against an old release's std layout after seeing up_to_date:false.
  • Running zig_update with confirm without explicit user consent.
  • Micro-optimizing before checking allocation/layout choices.
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. yesterday First seen · 38 lines · 69 tokens per session scan A 9e8f1dec211e

Subscribe to this mod's changes

zig-docs is a skill published in the GitHub repository gbrlpzz/zig-docs-mcp (1 stars, last pushed 11d ago), licensed MIT. It adds 69 tokens to every session and 483 once invoked, about $0.0003 per session on Opus 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-08-31.

Related

Other skills, from other repositories

next

One-step rpm orchestrator, or a bounded internal sequence when given a count or scope. Runs preflight maintenance, then starts the next obvious backlog action (or, in direct use, asks for clarification when nothing is clearly next). With no argument it runs one step; with N, blocked, all, or a group name it runs…

dppdppd/rpm · 239 tokens

research

Exhaustive multi-agent research on any topic. Parallel search, URL fetching, gap analysis, adversarial validation, citation check. TRIGGER whenever the user asks for research, investigation, or an external look-up — phrasings like 'research X', 'look into X', 'investigate X', 'find out about X', 'what's the latest on…

dppdppd/rpm · 108 tokens

init-rpm

Project setup and verification. First run creates rpm context for a project. Repeat runs verify that an existing rpm setup matches the latest expected layout and apply safe migrations.

dppdppd/rpm · 48 tokens

audit

On-demand audit. Target quick runs the mechanical scan.sh only (zero-LLM drift check). Target documents scans docs + agent instructions + memory + session drift via the rpm:auditor review agent. Target project runs a full consultant review — code, architecture, inward + outward research, 7-dimension analysis, saved…

dppdppd/rpm · 98 tokens

backlog

Manage the rpm backlog (long-term project tasks in docs/rpm/future/tasks.org — distinct from Claude's native TaskCreate list, which is session-scoped). Add, list, review, postpone, or complete entries. TRIGGER on natural-language backlog operations — phrasings like "backlog X", "add X to backlog", "add to backlog"…

dppdppd/rpm · 156 tokens

rpm

Explain the rpm plugin and list its commands. Use when the user asks what rpm is, how /rpm works, which rpm commands are available, or needs an overview of the session-lifecycle / audit / research surface.

dppdppd/rpm · 46 tokens