Zig portable application

From jordanhubbard/literate-ai · View interactive version

Zig portable application is an AI agent skill from the GitHub repository jordanhubbard/literate-ai. Zig portable JSON application. Use for Literate AI workflow tasks.

How to use this skill

Skill file

Zig portable JSON application

Implement the selected Zig Flavor as straightforward, auditable Zig source rooted at

source/main.zig, compilable by one direct `zig build-exe source/main.zig

-femit-bin=run` invocation with no package manager. Put the native generated-test

implementation at source/tests/litai_test.zig and dispatch the Standard --litai-test

and --litai-smoke modes before ordinary argument parsing without reading

source/tests/manifest.json.

portable-application-implementation fixes the general argument contract (one JSON

array argument). In Zig terms: parse std.os.argv[1] as JSON — never the raw argument

slice, which still carries the program name at index 0.

Read that one complete UTF-8 JSON arguments array from the first argument, validate

every shape and domain invariant used by the specification, perform the general

computation rather than matching examples, and write exactly one deterministic JSON

value plus a trailing newline to standard output. Keep output field ordering explicit.

Before completing generation, locate zig on PATH and compile plus run the generated

--litai-test mode. Repair until that command exits successfully. Treat this as a

generation-time self-check only.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.