logoalt Hacker News

miroljubtoday at 1:51 PM4 repliesview on HN

Looking for a resource (MCP, CLI, Skill, ...) that would improve Zig support in LLMs.

Currently, doing something with Zig as a target language would spend many more tokens and produce subpar results.


Replies

anonfunctiontoday at 2:55 PM

One of the preeminent Zig software projects, Tigerbeetle[1], has a great website[2] and markdown file[3] for what they call TigerStyle.

It's honestly a great read as a human but also I packaged it as a skill and saw coding agent improvement, especially around memory usage.

1. https://tigerbeetle.com/

2. https://tigerstyle.dev/

3. https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TI...

brodotoday at 3:31 PM

Wrapping this [1] in a skill will help a lot: Also add this [2] and `zig fmt` to your buid.zig.

[1]: https://github.com/rockorager/zigdoc [2]: https://github.com/rockorager/ziglint

all2today at 3:11 PM

Best bet is tight integration with a language server and the zig docs as MD locally. You may also pull in the zig source code as canonical reference for best practices.

From there you can derive a set of tools and references that you can build skills on.

Any LLM can scratch together an MCP server, its basically FastAPI + functionality. Your goal, then, is to identify the subset of tools and data required to get 'good' output.

If you want to test your MCP server implementation, grab the source of several popular zig projects, rewind their git history, and have your LLM of choice attempt to address PRs for issues on those repos. Compare LLM solutions with the repo solutions, grade on token spend, LOC produced, variance from Zig best practices, and so on.

voidUpdatetoday at 2:37 PM

If you worked through this and learnt to use zig, your token usage would be even lower!

show 2 replies