···88## Project contracts
991010- [Homepage](https://nate.tngl.io/zigman/)
1111+- [Agent setup prompt](https://nate.tngl.io/zigman/prompt.md)
1112- [Practical guide](https://nate.tngl.io/zigman/guide.html)
1313+- [Canonical skill](https://nate.tngl.io/zigman/skill.md)
1214- [Install script](https://nate.tngl.io/zigman/install.sh)
1315- [Source repository](https://tangled.org/zzstoatzz.io/zigman)
1416- [Zig language reference](https://ziglang.org/documentation/master/)
15171618## Agent guidance
17192020+- If you are setting up an environment, fetch and follow `https://nate.tngl.io/zigman/prompt.md`.
1821- Use `zigman <query>` when unsure about Zig language semantics.
1922- Use `zigman -l <word>` to discover exact section names.
2023- Use `zigman --no-pager <query>` in non-interactive tools.
···11+These are official instructions from zigman to set up a good AI development
22+environment for reading the Zig language reference while writing or reviewing
33+Zig. Commands are intended to be run by the agent directly when it has permission
44+to modify the local development environment. Do not ask the user to run commands
55+you can safely run yourself.
66+77+Complete the relevant steps below:
88+99+- Install the `zigman` CLI
1010+- Install or register the zigman skill/instructions for your agent
1111+- Verify the setup with a real langref lookup
1212+1313+---
1414+1515+## Install the `zigman` CLI
1616+1717+Run:
1818+1919+```sh
2020+curl -fsSL https://nate.tngl.io/zigman/install.sh | sh
2121+```
2222+2323+Then ensure the install directory is on `PATH`. The installer writes to
2424+`$ZIGMAN_INSTALL` or `~/.local/bin`.
2525+2626+Verify:
2727+2828+```sh
2929+zigman --no-pager comptime | head -40
3030+```
3131+3232+If `zigman` is not on `PATH` after install, use the absolute path:
3333+3434+```sh
3535+~/.local/bin/zigman --no-pager comptime | head -40
3636+```
3737+3838+---
3939+4040+## Install the zigman skill/instructions
4141+4242+The canonical skill is published at:
4343+4444+```text
4545+https://nate.tngl.io/zigman/skill.md
4646+```
4747+4848+### Codex
4949+5050+Install the skill into the user's Codex skills directory:
5151+5252+```sh
5353+mkdir -p ~/.codex/skills/zigman
5454+curl -fsSL https://nate.tngl.io/zigman/skill.md -o ~/.codex/skills/zigman/SKILL.md
5555+```
5656+5757+Then tell the user to restart Codex or start a fresh thread so the skill list is
5858+reloaded.
5959+6060+### Claude Code and other skill-aware agents
6161+6262+Add `https://nate.tngl.io/zigman/skill.md` as a skill named `zigman`, or copy the
6363+file into the agent's local skills directory following that agent's conventions.
6464+6565+### Agents without skills
6666+6767+Add this rule to the agent's project or user instructions:
6868+6969+```text
7070+When writing or reviewing Zig, use `zigman --no-pager <query>` to read the
7171+official Zig language reference before guessing about language semantics. zigman
7272+covers the language, not the standard library.
7373+```
7474+7575+---
7676+7777+## Expected agent behavior
7878+7979+- Use `zigman --no-pager <query>` when unsure about Zig language semantics.
8080+- Use `zigman -l <word>` when the exact section name is not known.
8181+- Read compiler errors, then query the named language concept before editing.
8282+- Do not use zigman for `std` APIs; inspect the Zig standard library source for
8383+ those.
8484+8585+---
8686+8787+## Setup complete message
8888+8989+Once done, tell the user:
9090+9191+```text
9292+zigman agent setup complete
9393+9494+CLI: <path to zigman>
9595+Skill: <installed skill path, or "instruction rule added">
9696+Check: `zigman --no-pager comptime` returned the Zig langref section
9797+```
9898+9999+These instructions are published at `https://nate.tngl.io/zigman/prompt.md` so
100100+you can re-verify their authenticity at any time.
···88## Project contracts
991010- [Homepage](https://nate.tngl.io/zigman/)
1111+- [Agent setup prompt](https://nate.tngl.io/zigman/prompt.md)
1112- [Practical guide](https://nate.tngl.io/zigman/guide.html)
1313+- [Canonical skill](https://nate.tngl.io/zigman/skill.md)
1214- [Install script](https://nate.tngl.io/zigman/install.sh)
1315- [Source repository](https://tangled.org/zzstoatzz.io/zigman)
1416- [Zig language reference](https://ziglang.org/documentation/master/)
15171618## Agent guidance
17192020+- If you are setting up an environment, fetch and follow `https://nate.tngl.io/zigman/prompt.md`.
1821- Use `zigman <query>` when unsure about Zig language semantics.
1922- Use `zigman -l <word>` to discover exact section names.
2023- Use `zigman --no-pager <query>` in non-interactive tools.
···11+These are official instructions from zigman to set up a good AI development
22+environment for reading the Zig language reference while writing or reviewing
33+Zig. Commands are intended to be run by the agent directly when it has permission
44+to modify the local development environment. Do not ask the user to run commands
55+you can safely run yourself.
66+77+Complete the relevant steps below:
88+99+- Install the `zigman` CLI
1010+- Install or register the zigman skill/instructions for your agent
1111+- Verify the setup with a real langref lookup
1212+1313+---
1414+1515+## Install the `zigman` CLI
1616+1717+Run:
1818+1919+```sh
2020+curl -fsSL https://nate.tngl.io/zigman/install.sh | sh
2121+```
2222+2323+Then ensure the install directory is on `PATH`. The installer writes to
2424+`$ZIGMAN_INSTALL` or `~/.local/bin`.
2525+2626+Verify:
2727+2828+```sh
2929+zigman --no-pager comptime | head -40
3030+```
3131+3232+If `zigman` is not on `PATH` after install, use the absolute path:
3333+3434+```sh
3535+~/.local/bin/zigman --no-pager comptime | head -40
3636+```
3737+3838+---
3939+4040+## Install the zigman skill/instructions
4141+4242+The canonical skill is published at:
4343+4444+```text
4545+https://nate.tngl.io/zigman/skill.md
4646+```
4747+4848+### Codex
4949+5050+Install the skill into the user's Codex skills directory:
5151+5252+```sh
5353+mkdir -p ~/.codex/skills/zigman
5454+curl -fsSL https://nate.tngl.io/zigman/skill.md -o ~/.codex/skills/zigman/SKILL.md
5555+```
5656+5757+Then tell the user to restart Codex or start a fresh thread so the skill list is
5858+reloaded.
5959+6060+### Claude Code and other skill-aware agents
6161+6262+Add `https://nate.tngl.io/zigman/skill.md` as a skill named `zigman`, or copy the
6363+file into the agent's local skills directory following that agent's conventions.
6464+6565+### Agents without skills
6666+6767+Add this rule to the agent's project or user instructions:
6868+6969+```text
7070+When writing or reviewing Zig, use `zigman --no-pager <query>` to read the
7171+official Zig language reference before guessing about language semantics. zigman
7272+covers the language, not the standard library.
7373+```
7474+7575+---
7676+7777+## Expected agent behavior
7878+7979+- Use `zigman --no-pager <query>` when unsure about Zig language semantics.
8080+- Use `zigman -l <word>` when the exact section name is not known.
8181+- Read compiler errors, then query the named language concept before editing.
8282+- Do not use zigman for `std` APIs; inspect the Zig standard library source for
8383+ those.
8484+8585+---
8686+8787+## Setup complete message
8888+8989+Once done, tell the user:
9090+9191+```text
9292+zigman agent setup complete
9393+9494+CLI: <path to zigman>
9595+Skill: <installed skill path, or "instruction rule added">
9696+Check: `zigman --no-pager comptime` returned the Zig langref section
9797+```
9898+9999+These instructions are published at `https://nate.tngl.io/zigman/prompt.md` so
100100+you can re-verify their authenticity at any time.
···11+---
22+name: zigman
33+description: Read the official Zig language reference from the terminal while writing or reviewing Zig. Use whenever you are unsure about Zig language semantics — slices, pointers, comptime, error sets, switch/for/while, casting, or a builtin (@TypeOf, @intCast, ...) — instead of guessing. Requires the `zigman` CLI on PATH.
44+---
55+66+# zigman — read the Zig reference instead of guessing
77+88+Zig moves fast and small syntax/semantic details matter. When writing or reviewing Zig,
99+look the answer up in the language reference rather than recalling it. One lookup is cheaper
1010+than a wrong compile.
1111+1212+## when to reach for it
1313+1414+- unsure about a language feature: slices vs arrays vs pointers, `comptime`, error unions,
1515+ optionals, `switch`/`for`/`while`, `defer`, casting, result-location semantics
1616+- need a builtin's exact behavior: `@TypeOf`, `@import`, `@intCast`, `@bitCast`, `@Type`, ...
1717+- a compile error names a concept you're not 100% sure of — read that section first
1818+- before asserting "Zig does X" in a review
1919+2020+## how to use it
2121+2222+```bash
2323+zigman comptime # print the matching section (markdown, real code examples)
2424+zigman slice # fuzzy: if several match, it lists them — pick one
2525+zigman -l # full table of contents (discover exact section names)
2626+zigman -l error # list sections whose name matches a word
2727+zigman -V 0.15.1 comptime # read a specific Zig version (default: master)
2828+```
2929+3030+Output is plain markdown on stdout, so it pipes: `zigman comptime | head -40`. Workflow:
3131+`zigman -l <word>` to find the section, then `zigman <name>` to read it.
3232+3333+## scope
3434+3535+The reference documents the **language**, not the standard library. For `std.ArrayList`,
3636+`std.Io`, `std.fmt`, allocators, etc., read the std source instead (`zig env` reports
3737+`.std_dir`, relative to `$HOME`) — `zigman` won't have those.
3838+3939+## install
4040+4141+`curl -fsSL https://nate.tngl.io/zigman/install.sh | sh`
4242+(source: https://tangled.org/zzstoatzz.io/zigman)