agent-kreal

Claude Glm Stack — AI skill for Claude Code

AI community

Run Claude Desktop on Z.AI GLM (GLM Coding Plan) via third-party 3P gateway mode + tier-rewriting local proxy: opus→glm-5.3, sonnet/haiku→glm-5.3-flash.

How to install Claude Glm Stack

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

What Claude Glm Stack does

Run Claude Desktop on Z.AI GLM (GLM Coding Plan) via third-party 3P gateway mode + tier-rewriting local proxy: opus→glm-5.3, sonnet/haiku→glm-5.3-flash. Vision-verified model mapping, one-command macOS setup, AGENTS.md playbook for coding agents. Claude Code, quotas, web-search notes.

Alternatives in AI

  • System Prompts Leaks — Extracted system prompts from ChatGPT (GPT-5.4, GPT-5.3, Codex), Claude (Opus 4.6, Sonnet 4.6, Claude Code), G 38.6k ★
  • Optimization — ai-research-skills AWQ, GPTQ, GGUF, Flash Attention, bitsandbytes 5.4k ★
  • Debate — AI Debate Hub - Structured four-way debates between Claude, Sonnet, Gemini, and Codex 2.8k ★

README

claude-glm-stack

Run **Claude Desktop, Claude Code (and friends) on Z.AI GLM** — with honest, verified model tiers and one API key.

Give this repo to your coding agent (Claude Code, Codex, Cursor, ...) on a Mac, give it your Z.AI API key, and get a working Claude Desktop whose model picker says GLM and *means it*. The only manual step that may remain is 4 clicks in the app (the agent will tell you if and when).

Claude Desktop (3P gateway mode)
   │  model: claude-opus-5          model: claude-sonnet-4-5
   ▼                                        ▼
local rewriting gateway  127.0.0.1:8788  (launchd, auto-start)
   │  model: glm-5.3               model: glm-5.3-flash
   ▼                                        ▼
https://api.z.ai/api/anthropic  (Anthropic Messages API, GLM Coding Plan key)

Why this exists (the two walls)

  1. Claude Desktop refuses non-Claude model names. In third-party (3P) gateway mode its validator rejects any model ID containing glm, gpt, qwen, ... So you cannot just write glm-5.3 into the config.
  2. Z.AI accepts claude-* names — and routes every single one to GLM-5.3-Flash. Verified with a vision probe (docs/findings.md §2): claude-opus-5 happily describes images, while real glm-5.3 is text-only and cannot. Without a translator your whole "GLM-5.3" Desktop is silently running on the flash tier.

The local gateway solves both: the app keeps sending Claude-shaped names, the gateway rewrites the `model` field to the real GLM model per tier:

Desktop tier (label) Sends Actually runs Like the CLI slot
opus — "GLM-5.3" claude-opus-5 glm-5.3 (text-only, heavy) ANTHROPIC_DEFAULT_OPUS_MODEL
sonnet — "GLM-5.3 Flash" claude-sonnet-4-5 glm-5.3-flash (vision, fast) sonnet/haiku slots
haiku claude-haiku-* glm-5.3-flash

SSE streaming and server-side tools (z.ai's `web_search_prime`) pass through untouched. The gateway never logs