chhuax

Zigent — Development skill for Claude Code

Development community

用 Zig 从零实现的编码 Agent 内核(对标 Claude Code)· A coding-agent kernel built from scratch in Zig.

How to install Zigent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open chhuax/Zigent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Zigent does

用 Zig 从零实现的编码 Agent 内核(对标 Claude Code)· A coding-agent kernel built from scratch in Zig.

Alternatives in Development

  • Claudes C Compiler — Claude Opus 4.6 wrote a dependency-free C compiler in Rust, with backends targeting x86 (64- and 32-bit), ARM 2.6k ★
  • React Native Movie App — Get hands-on with React Native and Expo in this crash course 787 ★
  • Deep Research From Scratch — Deep research has broken out as one of the most popular agent applications 768 ★

README

Zigent

[![CI](https://github.com/chhuax/Zigent/actions/workflows/ci.yml/badge.svg)](https://github.com/chhuax/Zigent/actions/workflows/ci.yml)

**用 Zig 从零实现的编码 Agent 内核** —— 对标 Claude Code:读写代码、执行命令、跨轮次保持上下文,并把过程实时流式吐给客户端。

**A coding-agent kernel built from scratch in Zig** — in the spirit of Claude Code: it reads and writes code, runs commands, keeps context across turns, and streams everything to the client in real time.

**本仓库只做内核。** 设计文档(`docs/`)为本机专属,**不随仓库发布**,因此下文不含指向它们的链接。 **This repository is the kernel only.** The design documents (`docs/`) live on the author's machine and are **not published with this repository**; no links to them appear below.

**AI Agent 请先读 [`AGENTS.md`](AGENTS.md)** —— 背景、已定决策、禁区、阅读顺序都在那里。 ***AI agents: read [`AGENTS.md`](AGENTS.md) first** — background, settled decisions, no-go zones, reading order.*


状态 / Status

项 / Item 状态 / Status
内核实现 / Kernel ✅ src/ 12 个模块可编译 · 537 个测试全绿 · 12 modules compile · 537 tests green
端到端冒烟 / E2E smoke ✅ 12/12(bash tests/smoke.sh)
架构约束检查 / Architecture guard ✅ zig build guard
spike 契约测试 / Spike contract tests ✅ 63 个(spike/zig-m0/)· 63 tests
真实 provider / Real provider ⏳ 未接;无凭据时自动退回 mock · Not wired; falls back to mock without credentials
桌面壳 / Desktop shell ⏳ 未做(计划 Tauri + Rust)· Not started (planned: Tauri + Rust)

这是什么 / What this is

  • 一个内核,不是平台。 提供 common/ 契约层、主循环、工具、权限、记忆、压缩、恢复、transcript,以及一个本地 HTTP + SSE 服务。 A kernel, not a platform: contract layer, main loop, tools, permissions, memory, compaction, recovery, transcript, plus a local HTTP + SSE server.
  • 8 个工具:Read / Write / Edit / Bash / Glob / Grep / TodoWrite / ask_user_question。 Eight tools — Read, Write, Edit, Bash, Glob, Grep, TodoWrite, ask_user_question.
  • Turn 配对不变量:tool_use 与 tool_result 必须紧邻配对,由类型承载而非靠约定。 *A Turn pairing invariant: every tool_use is paired with its `tool_re