ZENG3LD

Gate4agent — AI skill for Claude Code

AI community

Universal Rust wrapper for CLI AI agents (Claude Code, Codex, Gemini).

How to install Gate4agent

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

What Gate4agent does

Universal Rust wrapper for CLI AI agents (Claude Code, Codex, Gemini). PTY mirror and pipe/NDJSON modes with tokio broadcast fan-out.

Alternatives in AI

  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • Cc Mirror — Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM) 2.1k ★
  • Claude Fable 5 System Prompt Clean — the optimized, token-efficient version of the leaked Claude Fable 5 / Mythos 5 system prompt 475 ★

README

gate4agent

gate4agent is a library that drives CLI coding agents — Claude Code, Codex, Kimi, Grok — over PTY, pipe, ACP, and daemon transports behind one API: spawn, stream, resume; see [Transport core](#transport-core) below. On top of that transport core it also carries the session runtime a node embeds to run those agents as managed sessions: an adapter/tool catalog, a session kernel, the native runtime, and per-CLI process hooks and history readers. The node/c2/harness/TUI stack that used to live in this repository is now `hatchery`, built on this library.

Provider tiers

Provider Tier Support path
Claude Code first tier full workbench: PTY sessions, native history, hooks, spawn/observe through node → harness; transport core verified on 2.1.224
Codex CLI first tier full workbench; transport core verified on 0.144.6
Kimi Code first tier full workbench via the adapter registry; current transport-core PTY canary is failing (see the matrix below)
Grok CLI first tier full workbench via the adapter registry (gate4agent-adapters): PTY sessions, native history (~/.grok/sessions), hooks; a resume gap is tracked
qwen-code wired, unverified adapter registry entry exists; no verification claim
Gemini, OpenCode legacy transport-core paths last live-verified in the 0.2.5–0.2.6 era; outside the product target

Repository layout

The root `src/` tree is the **transport core** — spawning, streaming, resuming, and owning interactive CLI-agent subprocesses through one API, published as the `gate4agent` crate. See [Source layout](#source-layout) below for its internal module structure.

`crates/` holds the session runtime that a node embeds on top of the transport core, plus the in-house PTY backend:

  • gate4agent-pty — the in-house PTY backend (std-only, zero external PTY dependencies: Windows ConPTY + a unix macOS/Linux backend).
  • gate4agent-types — shared wire/data types.