zcode-subagent

A bridge that lets one coding agent send programming work to a ZCode desktop application, which runs it as a separate coding assistant and returns the result.

In plain words
What is it for?
Use it to delegate coding tasks, parallelize implementation work, and send follow-up prompts in the same ZCode conversation.
Why use it?
It allows coding work to be handed off or split up without requiring a separate ZCode API key, while avoiding the captcha problem that affects headless requests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/itechmeat/llm-code/zcode-subagent
Any agent
npx skills add itechmeat/llm-code --skill zcode-subagent
Clone the repo
git clone --depth 1 https://github.com/itechmeat/llm-code

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.02909
Opus 5 $0.00028 $0.01455
Sonnet 5 $0.00011 $0.00582
Haiku 4.5 $0.00006 $0.00291

Measured 2d ago against content hash 696ee8f8adf2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zcode-subagent scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/zcode_agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**agent-browser** (drives the app over CDP); **node**; **python3**; **curl** (macOS
skills/zcode-subagent/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ZCode Subagent

Lets the current agent call the ZCode (z.ai, GLM engine) desktop app as a coding subagent: hand it a task, then detect completion and read the result, all from the shell. The calling agent dispatches a prompt into the app, detects when the turn finishes, and reads a small structured digest of the result. It never screenshots or scrapes the full transcript, so the caller spends a fixed, tiny token cost per task regardless of how long ZCode worked.

When to use

  • You (a parent agent) need to hand a coding task to ZCode and understand the outcome cheaply.
  • You want ZCode automation without a standalone z.ai API key (the app's logged-in "coding plan" is enough).
  • You need a follow-up prompt in the same ZCode conversation.

Why the desktop app, not the headless CLI

ZCode ships a headless CLI (ZCode.app/Contents/Resources/glm/zcode.cjs -p), and it loads and reaches the API. But the "coding plan" endpoint (.../zcode-plan/...) gates every model request behind an interactive Aliyun captcha that only the app's webview solves, so headless prompts fail with code 3007 captcha verify failed. Driving the app reuses the already-solved captcha and needs no API key. Non-model CLI commands (doctor, skills list --json, plugins list --json) do work headless. Full internals: references/architecture.md.

Do not pre-check or pre-install anything

Just run the script. It resolves its own dependencies and fails with a clear, actionable message naming exactly what is missing. Only when a run actually fails that way do you diagnose - and even then, confirm the thing is really absent before installing (never install on a first negative signal). Pre-emptively "checking prerequisites" wastes turns and, worse, tends to reinstall software that is already present.

Dependencies (for reference when a run does fail): ZCode.app signed in; agent-browser (drives the app over CDP); node; python3; curl (macOS also uses open + osascript).

Read the full file on GitHub · 247 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 247 lines · 55 tokens per session scan A 696ee8f8adf2

Subscribe to this mod's changes

zcode-subagent is a skill published in the GitHub repository itechmeat/llm-code (22 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 2,909 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.