Skip to content

Agent skill: anole-zig, written by anole init - #274

Merged
xuckless merged 3 commits into
mainfrom
skill/anole-zig
Nov 27, 2026
Merged

xuckless merged 3 commits into
mainfrom
skill/anole-zig

Conversation

@xuckless

@xuckless xuckless commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

An agent skill for Anole 0.7.0, and anole init / anole new writing it into new projects.

AI coding agents have no training data on Anole and mostly know older Zig, so they hand-roll middleware, auth, pools, rate limits, rooms and jobs that Anole already has. The skill makes them look things up first.

What changed

  • skills/anole-zig/: SKILL.md (the look-it-up-first rule, a capability index, a minimal app), references/ with one file per topic, and apis.txt, every public name the skill mentions. After merging main I brought it in line with docs: match the code (#271) #272: the notes about stale docs are gone (the Kafka try req.body(), the 30 s WebSocket drain, the NATS fake server), the docs/database.md line references moved with the file, and app.rateLimit is described as installing itself rather than going through use. I checked every relative link and every docs/*.md#anchor it uses.
  • anole new and anole init write the skill as .claude/skills/anole-zig/ and add a line to AGENTS.md: "This project uses Anole; agents: load the anole-zig skill in .claude/skills/anole-zig/ before writing server code." There is one source: skills/index.zig (generated by tools/anole/gen_index.py, like templates/index.zig) embeds skills/anole-zig into the CLI, so no template carries a copy. An existing AGENTS.md gets the line appended (once); an existing .claude/skills/anole-zig/ is left as it is. A cli-test checks that the index lists every skill file; tests/templates/run.sh checks the skill and the AGENTS.md line for every template and both anole init cases.
  • zig build skill-test (tests/skill_apis_test.zig) resolves every name in apis.txt at compile time: each part must be a public declaration or field of the part before it, anole.auth.jwt (the anole_jwt dependency) included, and a type function such as anole.Server(Ctx) is entered with an empty context. It prints every name that does not resolve. CI runs it in the existing test job (zig build test skill-test). I checked that it fails on made-up names.
  • build.zig.zon .paths carries skills, so a fetched package has the skill.
  • zig fmt --check in CI covers skills/; docs/templates.md and the CLI help mention the skill; CHANGELOG Unreleased has an "Added" section.

Tests

On the box and the Mac, through build.sh:

  • zig build cli-test -Dprofile=minimal: 10/10 passed.
  • zig build skill-test: passed (all 530 names resolve); with three made-up names appended it failed and listed exactly those three.
  • tests/templates/run.sh as CI runs it (without DATABASE_URL): all five templates built, tested and wrote a checked OpenAPI document, each with the skill and the AGENTS.md line; both anole init cases passed, the existing project keeping its own AGENTS.md text. The rest-postgres database tests skipped (no PostgreSQL); CI runs them.

SKILL.md with the look-it-up-first rule, a capability index of 62 rows
linking to one reference per topic, and the minimal template app.
references/ covers http, middleware-auth, realtime, databases,
messaging, storage-email-clients, deployment, observability,
config-cli, testing, the shared runtime rules and Zig 0.17.
apis.txt lists the 530 public names the skill mentions, for a later
CI check.
…names

anole new and anole init write skills/anole-zig into the project as
.claude/skills/anole-zig/ (embedded in the CLI through skills/index.zig,
generated by tools/anole/gen_index.py) and add a line to AGENTS.md that
points agents at it. A project that has the skill keeps its copy; an
existing AGENTS.md gets the line appended.

zig build skill-test resolves every name in skills/anole-zig/apis.txt
(tests/skill_apis_test.zig, at compile time); CI runs it in the test job.
build.zig.zon carries skills/. The skill follows #272's docs fixes (stale
notes removed, docs/database.md line references moved, app.rateLimit
installs itself).
@xuckless
xuckless merged commit fa82428 into main Nov 27, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant