Zhi · Developers Home GitHub

Developers

Everything an agent needs to drive Zhi: one local MCP server, nine content schemas, and a set of deterministic checks that decide whether a document is finished.

01 · Surface

There is no hosted Zhi API

Zhi is a locally installed skill and template system. Document rendering needs no Zhi account or hosted Zhi API. During private preview, an authorized GitHub account is required to obtain the source. Dependency installation and optional font downloads use their own external sources.

The integration surface is local: an MCP server for tool calls, JSON content schemas for structure, and CLI checks for verification. This website provides selected samples and machine-readable overviews. Runtime definitions, templates, and complete distribution files remain in the private checkout.

02 · Install

Private preview setup

Zhi is in private testing. Repository access is required, and no formal release or anonymous download is available yet.

Ask the repository owner for access before continuing. Use your authorized GitHub account, clone into a new directory, then keep the terminal in the directory containing zhi. Choose the commands for your client; the Claude Code slash commands run inside Claude Code.

# Authenticate and clone the private repository
gh auth login
gh repo clone okht/zhi ./zhi

# Claude Code (v2.1.142+)
/plugin marketplace add ./zhi
/plugin install zhi@zhi

# Codex plugin marketplace
codex plugin marketplace add ./zhi
codex plugin add zhi@zhi

# Generic agents that read ~/.agents/
npx skills add ./zhi/plugins/zhi -a universal -g -y

# MCP client, from a checkout
claude mcp add zhi -- python3 <checkout>/scripts/mcp_server.py

Claude Desktop: upload zhi/dist/zhi.zip from the authorized checkout under Customize > Skills. This Slim archive stays below 6 MB and excludes the six approved FangZheng and Charter font programs. The files are not served as public downloads.

For Chinese and English font testing, authorized users can build the Full bundle locally with Python 3 and Bash. Then run the installed skill's scripts/ensure-fonts.sh with the local bundle path. Replace <installed-skill> with the actual installation directory:

bash ./zhi/scripts/package-skill.sh --full-fonts
bash <installed-skill>/scripts/ensure-fonts.sh --bundle ./zhi/dist/zhi-fonts-full.zip --approved-only

The installer verifies all six separate font programs against the manifest. --approved-only covers Chinese and Latin fonts; Korean and other fallback fonts need their documented setup. Before rendering, make each document's local @font-face paths resolve and verify the PDF's actual fonts and glyphs. Installing fonts alone does not complete visual verification.

Keep your authenticated checkout for updates. Pull changes there and refresh the local marketplace or replace the Desktop ZIP. Automatic public release downloads are unavailable during private preview.

03 · MCP

Tools over stdio

Judgment stays in the skill prompt; execution lives in the server. An agent that already knows what it wants can render and verify without loading SKILL.md.

The server speaks newline-delimited JSON-RPC 2.0 on stdin and stdout and has no third-party dependency for the protocol itself. Tools that need WeasyPrint, pypdf, or PyMuPDF surface the install hint as a tool error instead of crashing. Its server card and runtime definitions are available in the authorized checkout.

04 · Contracts

Content schemas

Each document type has a JSON schema that states its structure and its quality bar. Fill the schema first, lay out second.

Nine schemas live under references/schemas/: changelog, equity-report, landing-page, letter, long-doc, one-pager, portfolio, resume, slides. A new content.json also carries a brief with audience, job, output contract, target, preserve boundary, evidence, and acceptance checks; older IR files remain valid. Validate the content object before layout, then check how much of it actually reached the page:

python3 scripts/build.py --check-content content.json
python3 scripts/build.py --check-content content.json filled.html

The second form reports coverage: fields that exist in the content object but never made it into the document are the most common failure in agent-generated layouts, and they are invisible to a human skim.

05 · Verification

Checks that decide "done"

Run python3 scripts/build.py --help for the authoritative list. Repository-wide checks, python3 scripts/build.py --check, cover template lint, design-token sync, and public-site fact drift.

06 · Catalog

Machine-readable files

These static overviews remain public during private preview. Full runtime files stay in the authorized checkout.