zig-cross

zig-cross is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 85 tokens per session (1,852 once invoked), scanned A, original, MIT.

A guide to compiling Zig programs for platforms other than the one being used. Cross-compilation means building software for another operating system, processor, or environment without changing development machines.

In plain words
What is it for?
Use it to select Zig target triples, build for another operating system or CPU, create embedded or WebAssembly output, or use `zig cc` for cross-compiling C projects.
Why use it?
It helps developers produce builds for targets such as Windows, ARM devices, embedded systems, or WebAssembly. It also covers using Zig to compile C code for another target.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 203repo +8 2mo ago A scan Socket: passSnyk: passSkillSpector: pass 85 tokens original MIT

Good fit Use it to select Zig target triples, build for another operating system or CPU, create embedded or WebAssembly output, or use zig cc for cross-compiling C projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/zig-cross
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 mohitmishra786/low-level-dev-skills --skill zig-cross
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

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 zig-cross

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/zig-cross"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/zig-cross.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,852 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. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 21 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00085 $0.01852
Opus 5 $0.00043 $0.00926
Sonnet 5 $0.00017 $0.00370
Haiku 4.5 $0.00009 $0.00185

Measured 9d ago against content hash 0e22bfaede7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

zig-cross 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 9d 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/zig/zig-cross/SKILL.md · 206 lines

How it starts

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

Zig Cross-Compilation

Purpose

Guide agents through Zig's built-in cross-compilation: target triple selection, CPU feature targeting, zig cc for cross-compiling C projects, embedded bare-metal targets, and WASM output — all without requiring a system cross-toolchain.

Triggers

  • "How do I cross-compile a Zig program for ARM?"
  • "How do I build Zig for a different OS?"
  • "How do I use Zig to cross-compile C code for another platform?"
  • "How do I build Zig for embedded/bare-metal?"
  • "How do I target WebAssembly with Zig?"
  • "What Zig target triple do I use for Raspberry Pi?"

Workflow

1. Zig's native cross-compilation

Zig has cross-compilation built in — no cross-toolchain, no Docker, no sysroot needed for pure Zig code:

# List all supported targets
zig targets | python3 -c "import sys,json; d=json.load(sys.stdin); [print(t) for t in d['libc']]"

# Build for a specific target
zig build-exe src/main.zig -target aarch64-linux-gnu -O ReleaseFast

# With build system (pass target as option)
zig build -Dtarget=aarch64-linux-gnu -Doptimize=ReleaseFast

# Cross-compile for Windows from Linux/macOS
zig build-exe src/main.zig -target x86_64-windows-gnu

# Cross-compile for macOS from Linux (requires macOS SDK)
zig build-exe src/main.zig -target aarch64-macos-none

2. Common target triples

Target triple Platform
x86_64-linux-gnu Linux x86-64 (glibc)
x86_64-linux-musl Linux x86-64 (musl, static)
aarch64-linux-gnu ARM64 Linux (Pi 4, AWS Graviton)
aarch64-linux-musl ARM64 Linux static
armv7-linux-gnueabihf ARM 32-bit Linux (Pi 2/3)
x86_64-windows-gnu Windows x86-64
aarch64-macos-none macOS Apple Silicon
x86_64-macos-none macOS Intel
wasm32-freestanding WASM (browser, no OS)
wasm32-wasi WASM with WASI
thumbv7m-freestanding-eabi Cortex-M3 bare metal
thumbv7em-freestanding-eabihf Cortex-M4/M7 with FPU
riscv32-freestanding RISC-V 32-bit bare metal

Read the full file on GitHub · 206 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 206 lines · 85 tokens per session scan A 0e22bfaede7f

Subscribe to this mod's changes

zig-cross is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (203 stars, last pushed 2mo ago), licensed MIT. It adds 85 tokens to every session and 1,852 once invoked, about $0.0004 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-09-03.