Zig
Recommend AXM extensions from a Zig package and target Zig packages from an extension.
AXM reads Zig extension metadata from an agent-extensions.json sidecar at the
package root. This is the two-way linking
model applied to the Zig ecosystem.
Recommend extensions from a package
Section titled Recommend extensions from a packageAdd an agent-extensions.json file at the package root with an
agentExtensions array. Each entry is an extension reference
(@owner/<type>/<name>):
// agent-extensions.json
{
"$schema": "https://axm.sh/schemas/agent-extensions.schema.json",
"agentExtensions": [{ "ref": "@examples/packs/zig-zon-tinyflags" }],
}Zig packages are fetched as content-addressed archives, so include the sidecar
by listing it in the .paths field of build.zig.zon:
// build.zig.zon
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"agent-extensions.json",
},Keep recommendations identity-only — omit versionRange. AXM resolves the
reference to the newest matching extension version and pins it in the user's
axm.lock. Prefer recommending a single pack so you keep one stable
reference while its contents evolve.
Add a semver versionRange only when your package genuinely pairs with a
bounded major line of the extension:
{
"agentExtensions": [
{
"ref": "@examples/packs/zig-zon-tinyflags",
"versionRange": "^1.0.0",
},
],
}Target Zig packages from an extension
Section titled Target Zig packages from an extensionOn the extension manifest (skill.json, pack.json, subagent.json, …), add a
packages array with a Zig purl.
Use the package name from build.zig.zon as the purl name:
// pack.json
{
"packages": [{ "purl": "pkg:zig/agentxm_example_tinyflags" }],
}Version ranges
Section titled Version rangesDefault to identity-only. Add a VERS
versionRange with the zig scheme only when the extension depends on package
APIs introduced or removed in a known range:
{
"packages": [
{
"purl": "pkg:zig/agentxm_example_tinyflags",
"versionRange": "vers:zig/>=0.1.0|<1.0.0",
},
],
}Official status
Section titled Official statusWhen the Zig package recommends an extension through the AgentXM Registry and that extension names the package as a companion via its purl, AXM derives official status for the pair — no extra flag. See Official extensions.
Reference fixture
Section titled Reference fixtureThe
zig-zon-lib
and
zig-zon-app
directories in polyglot-examples are the working fixtures for everything
above. The package publishes a TinyFlags companion pack and recommends it from
the agent-extensions.json sidecar (listed in .paths); the pack and each
skill declare the package's pkg:zig purl as an identity-only companion
package.