
zcode-executor
中文 · English
Claude plans. ZCode codes. Git verifies.
A plugin for Claude Code and other coding agents that hands a well-specified development task to the local ZCode agent (GLM), runs it in an isolated git worktree, guards every write with a hard-rule check plus a model-based review, and lets you verify the result with git diff and tests instead of trusting the agent's own report.
Why
Claude Code is good at thinking a task through. ZCode grinds out the code at a fraction of the cost. Left alone, either one will happily go off-script. This plugin puts the two in their places:
- The task file is the contract. Claude writes
tasks/T-xxx.md; the message to ZCode is just a doorbell.
- The worktree is the sandbox. ZCode works in
~/.zcode-executor/worktrees/<repo>, never in your main checkout.
- The gate decides who gets asked. Every tool call ZCode wants to make passes hard rules, model review, and a human if needed. Optional Jev pre-screening can allow early; otherwise the original ZCode
fast + low screen runs, followed by slow review only when needed. The models can only allow or ask; they never deny on your behalf.
- Evidence beats narrative. You accept with
git diff and your test suite.
Quick start
Paste this to your agent (Claude Code, Codex, or anything with a shell):
Read https://github.com/kyomio/zcode-executor/blob/main/README.md and install zcode-executor by following its Install section, then run zcode-executor doctor.
How to use
You don't drive the CLI yourself. You describe the task to your agent, and it runs the skill: writes a task file, adds a worktree, dispatches to ZCode, waits, then checks the result with git diff and your tests before telling you it's done. If ZCode asks for something the gate won't pass on its own, the agent stops and asks you.
Two ways to trigger it:
Call the skill directly
/zcode-executor add a --json flag to the status command, keep the tests green
(The full name is /zcode-executor:zcode-executor; the short form works unless another plugin claims it.)
Or just say so in plain language
Hand the lib/queue.mjs refactor off to zcode.
Either way, say what "done" looks like — which command should pass, which file should exist, what output you expect. The agent turns that into the acceptance criteria in the task file, and the task file is the contract; the message sent to ZCode is only a doorbell.
Two layers
- Workflow layer — dispatch and acceptance: task file → isolated worktree → local session id → background runner →
git diff and tests. This is what the CLI commands and the skill are about.
- Safety layer — automatic handling of ZCode's permission requests. Its logic follows Claude Code's auto mode: a fixed table of hard rules that nothing can override, then optional Jev pre-screening → ZCode fast screen → slow review if needed, then a human when review cannot pass. Jev adds an early-pass path; it does not replace the ZCode fast screen. The reviewers can allow or ask; they can never deny on your behalf.
How it works

Sequence diagram rendered with archify from assets/how-it-works.en.json.
One runner process per session, always in the background; the CLI only reads files under ~/.zcode-executor/runs/<id>/. Nothing costs tokens except send and the review calls.
Measured cost
The workload below is what it took to build this project: 35 task files, 4 executor sessions, 957M prompt tokens and 2.39M output tokens on the executor side. The same tokens priced three ways at public API list prices, with the cache-read rate fixed at 95% for both models:

| Executor |
New input |
Cache read |
Output |
Total |
vs Sonnet 5 |
| Claude Sonnet 5 |
$119.6 |
$181.9 |
$23.9 |
$325 |
1× |
| GLM-5.3-Flash, list price |
$7.2 |
$27.3 |
$1.2 |
$35.7 |
1/9.1, saves 89% |
| GLM-5.3-Flash via ZCode (67% of list) |
$4.8 |
$18.3 |
$0.8 |
$23.9 |
1/13.6, saves 93% |
Prices used (USD per million tokens): Sonnet 5 $2.50 cache write / $0.20 cache read / $10 output; GLM-5.3-Flash $0.15 / $0.03 / $0.50. Sonnet's new input is billed at the cache-write rate because Claude Code writes every turn into the cache. Cache reads dominate: in an agent loop the whole context is re-read every turn, so the cache-read price is what decides the gap. The measured cache-read rate was actually 99.3%; at that rate the ratio is 7.5× and 11.2×. The planner's cost is the same in every scenario and is left out. Prices as of September 2026: Claude, Z.ai.
Install
Claude Code (plugin marketplace)
This repository is both the plugin and its own marketplace.
claude plugin marketplace add kyomio/zcode-executor # or a local path
claude plugin install zcode-executor@zcode-executor --scope user
bin/zcode-executor is added to Bash's PATH while the plugin is enabled; the skill appears as /zcode-executor:zcode-executor. Saying "let zcode do it" triggers it.
The plugin also ships a Claude Code mod (a module of function hooks, hooks/): type /zcode to open the watch pane, a live view of this project's zcode sessions. It also opens by itself when Claude sends a task, and adds a status-line summary and toasts. Nothing to configure; it needs a Claude Code version with function-hook mods (the API is in early access).
DeepSeek Harness (DSH)
The npm package is the DSH plugin: the root package.json carries the dsh definition (cordis.patch.yml bundle + right-sidebar client), and the plugin code is the built output under dsh-plugin/lib/ (sources in dsh-plugin/). In the DSH desktop app's plugin page, just install by the npm package name zcode-executor — the app registers the bundle by itself; no manual link: or config editing. The plugin teaches the DSH agent the full dispatch flow (the skill auto-symlinks into ~/.dsh/skills/) and adds the "zcode 任务" tab to the official right sidebar — the same live watch pane, refreshing about once a second at zero quota. Local development: pnpm install && npm run build inside dsh-plugin/, then restart the desktop app.
Kimi Work
The repo root ships a native kimi.plugin.json (skills only; the Claude Code mod above is Claude-only and not included). Register it into the personal market once, then install from the 个人 tab:
kimi-daimon kimi-plugin register-personal /path/to/zcode-executor
Like the agents below, Kimi Work does not put the plugin's bin/ on PATH — the skill falls back to bin/zcode-executor relative to the plugin root, or npx zcode-executor. Saying 「让 zcode 去做」「派给 zcode」 triggers the skill.
Codex
codex plugin marketplace add kyomio/zcode-executor # or a local path
codex plugin add zcode-executor@zcode-executor
Two differences from Claude Code: Codex does not put a plugin's bin/ on PATH (the skill tells the agent where the binary lives), and the default workspace-write sandbox blocks writes to ~/.zcode-executor — add it to [sandbox_workspace_write] writable_roots in ~/.codex/config.toml or approve when prompted.
GitHub Copilot CLI
This repository doubles as a Copilot CLI plugin marketplace.
copilot plugin marketplace add kyomio/zcode-executor
copilot plugin install zcode-executor@zcode-executor
Gemini CLI
A gemini-extension.json at the repo root makes it a Gemini CLI extension; the bundled skills/ are discovered automatically.
gemini extensions install https://github.com/kyomio/zcode-executor
Antigravity
Antigravity (agy) loads the native .antigravity-plugin/plugin.json; skills under skills/ load automatically.
agy plugin install https://github.com/kyomio/zcode-executor
pi
pi reads the pi field in package.json and installs the package directly.
pi install npm:zcode-executor
OpenClaw
No manifest needed — link the skill into its user skills directory:
ln -s "$(npm root -g)/zcode-executor/skills/zcode-executor" ~/.openclaw/skills/zcode-executor
Hermes
The repo root ships a Hermes plugin.yaml; install, then enable:
hermes plugins install kyomio/zcode-executor
hermes plugins enable zcode-executor
Grok Build
.grok-plugin/ carries its marketplace manifests, and the skill itself is one symlink away (it also reads ~/.agents/skills/):
ln -s "$(npm root -g)/zcode-executor/skills/zcode-executor" ~/.grok/skills/zcode-executor
None of the seven agents above puts the plugin's bin/ on PATH the way Claude Code does — run npm install -g zcode-executor once, or let the skill fall back to npx zcode-executor; the SKILL.md covers both.
npm (any agent, or no agent)
npm install -g zcode-executor # zero dependencies, nothing to build
zcode-executor doctor # zero-token self-check
Or run it without installing: npx zcode-executor doctor. The skill ships in the package at $(npm root -g)/zcode-executor/skills/zcode-executor/; copy or symlink it into your agent's skills directory. The CLI itself has no Claude-specific dependency.
SKILL=$(npm root -g)/zcode-executor/skills/zcode-executor
mkdir -p ~/.claude/skills && ln -s "$SKILL" ~/.claude/skills/zcode-executor
Swap in your own agent's directory from this table:
| Agent |
User skills directory |
| Claude Code |
~/.claude/skills |
| Codex |
~/.codex/skills |
| Gemini CLI / Antigravity |
~/.gemini/skills |
| Grok Build |
~/.grok/skills |
| Hermes |
~/.hermes/skills |
| OpenClaw |
~/.openclaw/skills |
| opencode |
~/.config/opencode/skills |
| Shared (several agents read it) |
~/.agents/skills |
From source
git clone https://github.com/kyomio/zcode-executor && cd zcode-executor
npm link && zcode-executor doctor
ln -s "$PWD/skills/zcode-executor" ~/.claude/skills/zcode-executor
Swap in your agent's directory from the table in the npm section above.
Requirements
- macOS or Linux. Windows is not supported yet. The ZCode app bundle is looked up where each platform puts it (
/Applications/…, /opt/ZCode/…, /usr/share/zcode/…); installed anywhere else, point ZCODE_BIN at zcode.cjs.
- Node ≥ 22 (ZCode's app-server needs
node:sqlite).
- ZCode desktop app ≥ 3.12.2 installed and logged in (3.11 and earlier are not supported). Both login styles work: an account (OAuth) Coding Plan — the CLI decrypts the platform key the App stores in
~/.zcode/v2/credentials.json (individual and team plans; only the four keys it needs are ever read, plus zcodejwttoken for off-peak sends) — or an API-key provider in ~/.zcode/v2/config.json. Both files are read-only; nothing is ever written back.
Recommended workflow
This is how zcode-executor itself was built:
- Plan with Claude Fable. The strongest reasoning model does the grilling, writes the spec, and turns it into task files with machine-checkable acceptance criteria.
- Execute with ZCode. Each task goes to a GLM session in its own worktree through
zcode-executor; the permission gate handles the routine approvals.
- Fable does a coarse pass, Opus does the review. Fable checks
git diff and runs the tests; if they hold, it dispatches an Opus subagent for a line-by-line code review. Findings go back to the same ZCode session as a follow-up task file.
- Merge on evidence. Nothing lands until the tests and the review both pass.
The split keeps the expensive model on judgment and the cheap one on typing.
Watch pane
The pane is not Claude Code-only: the Claude Code plugin and the DSH plugin each ship one, both fed by the same watch --json stream.
Claude Code (terminal or the desktop Code tab): type /zcode to open a live pane showing what this project's zcode sessions are doing: