Zig cross-compilation skill. An agent skill from mohitmishra786/low-level-dev-skills.

MITAuto-check passed

Install Zig Cross

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill zig-cross -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills zig-cross --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/zig/zig-cross .claude/skills/zig-cross && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
zig-cross
GitHub stars
253
Token cost
~1.6k tokens
SKILL.md length
242 words
Files
2 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

Zig cross-compilation skill. An agent skill from mohitmishra786/low-level-dev-skills.

  • Works in 7 steps: Zig's native cross-compilation → Common target triples → CPU feature targeting → …
  • Cross-compiling Zig programs to different targets
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Calls python3

What it does

Zig Cross is an agent skill from mohitmishra786/low-level-dev-skills. Zig cross-compilation skill. Use when cross-compiling Zig programs to different targets, using Zig's built-in cross-compilation for embedded, WASM, Windows, ARM, or using zig cc to cross-compile C code without a system cross-toolchain. Activates on queries about Zig cross-compilation, zig target triples, zig cc cross-compile, Zig embedded targets, or Zig WASM.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/zig-target-triples.md`).

It works with WebAssembly, Linux, macOS and Rust. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Cross-compiling Zig programs to different targets
  • Using Zigs built-in cross-compilation for embedded
  • Using zig cc to cross-compile C code without a system cross-toolchain

Example prompts

  • “/zig-cross”

Requirements

  • Python 3
  • Docker

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Zig's native cross-compilation
  2. Common target triples
  3. CPU feature targeting
  4. zig cc for C cross-compilation
  5. Build system cross-compilation
  6. Embedded (bare-metal) targets
  7. WebAssembly

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Zig Cross loads about 1.6k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 242 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 242 words, ~1,553 tokens.

Download SKILL.mdSave it as .claude/skills/zig-cross/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
zig-cross
description
Zig cross-compilation skill. Use when cross-compiling Zig programs to different targets, using Zig's built-in cross-compilation for embedded, WASM, Windows, ARM, or using zig cc to cross-compile C code without a system cross-toolchain. Activates on queries about Zig cross-compilation, zig target triples, zig cc cross-compile, Zig embedded targets, or Zig WASM.

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:

bash
# 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 triplePlatform
x86_64-linux-gnuLinux x86-64 (glibc)
x86_64-linux-muslLinux x86-64 (musl, static)
aarch64-linux-gnuARM64 Linux (Pi 4, AWS Graviton)
aarch64-linux-muslARM64 Linux static
armv7-linux-gnueabihfARM 32-bit Linux (Pi 2/3)
x86_64-windows-gnuWindows x86-64
aarch64-macos-nonemacOS Apple Silicon
x86_64-macos-nonemacOS Intel
wasm32-freestandingWASM (browser, no OS)
wasm32-wasiWASM with WASI
thumbv7m-freestanding-eabiCortex-M3 bare metal
thumbv7em-freestanding-eabihfCortex-M4/M7 with FPU
riscv32-freestandingRISC-V 32-bit bare metal
3. CPU feature targeting
bash
# Native CPU (auto-detect, only for native builds)
zig build-exe src/main.zig -mcpu native

# Baseline for architecture (most compatible)
zig build-exe src/main.zig -target x86_64-linux-gnu -mcpu baseline

# x86-64 with AVX2
zig build-exe src/main.zig -target x86_64-linux-gnu -mcpu x86_64+avx2+bmi2

# Raspberry Pi 4 (Cortex-A72)
zig build-exe src/main.zig -target aarch64-linux-gnu -mcpu cortex_a72

# Cortex-M4 with FPU
zig build-exe src/main.zig \
    -target thumbv7em-freestanding-eabihf \
    -mcpu cortex_m4+vfp4

# List CPU features for a target
zig targets | python3 -c "
import sys,json
d=json.load(sys.stdin)
for c in d['cpus']:
    if 'cortex' in c['name']:
        print(c['name'])
"
4. zig cc for C cross-compilation

zig cc cross-compiles C without a system cross-toolchain:

bash
# Cross-compile C for ARM64 Linux
zig cc -target aarch64-linux-gnu -O2 -o myapp-arm64 main.c

# Cross-compile C for Windows
zig cc -target x86_64-windows-gnu main.c -o myapp.exe

# Cross-compile C with static musl linking
zig cc -target x86_64-linux-musl -static main.c -o myapp-static

# Use in Makefile for all platforms
CC_LINUX_AMD64 = zig cc -target x86_64-linux-gnu
CC_LINUX_ARM64 = zig cc -target aarch64-linux-gnu
CC_WINDOWS     = zig cc -target x86_64-windows-gnu
5. Build system cross-compilation
zig
// build.zig — cross-build all targets
pub fn build(b: *std.Build) void {
    const targets = [_]std.Target.Query{
        .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .gnu },
        .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .gnu },
        .{ .cpu_arch = .x86_64, .os_tag = .windows, .abi = .gnu },
        .{ .cpu_arch = .aarch64, .os_tag = .macos },
    };

    for (targets) |t| {
        const target = b.resolveTargetQuery(t);
        const exe = b.addExecutable(.{
            .name = b.fmt("myapp-{s}", .{@tagName(t.cpu_arch.?)}),
            .root_source_file = b.path("src/main.zig"),
            .target = target,
            .optimize = .ReleaseFast,
        });
        b.installArtifact(exe);
    }
}
bash
# Build all targets
zig build
# Creates: zig-out/bin/myapp-x86_64, myapp-aarch64, myapp-x86_64.exe, myapp-aarch64
6. Embedded (bare-metal) targets
bash
# Cortex-M4 with FPU (STM32F4xx)
zig build-exe src/main.zig \
    -target thumbv7em-freestanding-eabihf \
    -mcpu cortex_m4+vfp4 \
    -O ReleaseSmall \
    --script linker.ld
zig
// src/main.zig — bare metal entry point
const std = @import("std");

// Custom panic handler for embedded (no OS)
pub fn panic(msg: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
    // Toggle LED or halt
    while (true) {}
}

// Entry point (matches linker script)
export fn _start() void {
    main() catch |err| {
        _ = err;
        while (true) {}
    };
}

fn main() !void {
    // Hardware initialization...
}
7. WebAssembly
bash
# WASM freestanding (browser)
zig build-exe src/main.zig \
    -target wasm32-freestanding \
    -O ReleaseSmall \
    --export=init \
    --export=update \
    -fno-entry

# WASM WASI (wasmtime, wasmer)
zig build-exe src/main.zig \
    -target wasm32-wasi \
    -O ReleaseSafe
wasmtime myapp.wasm

# Optimize WASM size
wasm-opt -Oz myapp.wasm -o myapp.opt.wasm

For target triple reference and embedded linker script setup, see references/zig-target-triples.md.

  • Use skills/zig/zig-compiler for single-file compilation flags
  • Use skills/zig/zig-build-system for multi-target build.zig configuration
  • Use skills/compilers/cross-gcc for system cross-toolchain setup when needed
  • Use skills/rust/rust-cross for Rust's cross-compilation approach comparison

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/zig/zig-cross of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/zig-target-triples.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Zig Cross next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Zig Cross compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Zig Cross this skillmohitmishra786/low-level-dev-skills253—~1.6kAutomated safety check: PassMIT
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT
RmuxHelvesec/rmux2.7k—~1.3kAutomated safety check: PassCustom licence
Waku Computer Useegoist/waku1.6k—~3.6kAutomated safety check: PassGPL-3.0
OpenLogi Device DiagnosisAprilNEA/OpenLogi23k—~1.6kAutomated safety check: PassApache-2.0
Ccapwysaid/CameraCapture191—~1.4kAutomated safety check: PassMIT

Similar skills

  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • Rmux

    Helvesec/rmux

    Guide for using RMUX with Claude Code, including the tmux-compatible CLI, agent automation waits, the typed SDK, browser web-share, and the rmux claude launcher.

    2.7k GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Control local macOS, Windows, and Linux apps through Waku Computer Use.

    1.6k GitHub stars~3.6k tokensUpdated 6 days ago
    Productivity & AutomationAuto-check passed
  • OpenLogi Device Diagnosis

    AprilNEA/OpenLogi

    Finds the first failing layer when an OpenLogi Logitech device is missing or misbehaving across enumeration, open, probe, IPC and UI.

    23k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Ccap

    wysaid/CameraCapture

    Install or use the ccap CLI for camera capture, webcam inspection, device listing, frame capture, and video metadata.

    191 GitHub stars~1.4k tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Apple Pickup Watcher

    ENCHIGO/apple-pickup-watcher

    Query Apple Retail pickup availability and monitor specified stores and SKUs with the apw CLI.

    154 GitHub stars~1.6k tokensUpdated 5 days ago
    Auto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    253 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    253 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Zig Cross

What does Zig Cross do?

Zig cross-compilation skill. An agent skill from mohitmishra786/low-level-dev-skills. Zig Cross is an agent skill from mohitmishra786/low-level-dev-skills. Zig cross-compilation skill.

When should I use Zig Cross?

Zig Cross fits situations like: cross-compiling Zig programs to different targets; using Zigs built-in cross-compilation for embedded; using zig cc to cross-compile C code without a system cross-toolchain.

How do I install Zig Cross in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill zig-cross -a claude-code`. Or copy the skill folder (skills/zig/zig-cross in mohitmishra786/low-level-dev-skills) into .claude/skills/zig-cross in your project. Claude Code loads it when a task matches its description.

How do I install Zig Cross in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill zig-cross -a codex`. Or copy the skill folder (skills/zig/zig-cross in mohitmishra786/low-level-dev-skills) into .agents/skills/zig-cross in your project. Codex loads it when a task matches its description.

Can I use Zig Cross in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill zig-cross -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zig-cross, .gemini/skills/zig-cross, .github/skills/zig-cross and .opencode/skills/zig-cross in your project.

What does Zig Cross need to run?

Going by SKILL.md and its folder, Zig Cross needs the command-line tools its instructions call (python3). Our summary lists: Python 3; Docker.

Does Zig Cross access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Zig Cross safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Zig Cross use?

Zig Cross is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Zig Cross use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Zig Cross?

Skills that share tags, products or a category with Zig Cross: Apple Container Test Runner (RustPython/RustPython, 22k stars), Rmux (Helvesec/rmux, 2.7k stars), Waku Computer Use (egoist/waku, 1.6k stars) and OpenLogi Device Diagnosis (AprilNEA/OpenLogi, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Zig Cross?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 253 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.