claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
Delegates tasks to Z.ai GLM-5.x via the stock claude binary and an endpoint swap. Use when delegation-core selects GLM or a 1M-token context is needed.
Claude Code
$ npx -y skills add athola/claude-night-market --skill glm-delegation --agent claude-code
Codex
$ npx skills add athola/claude-night-market --skill glm-delegation -a codex -y
Cursor
$ npx skills add athola/claude-night-market --skill glm-delegation -a cursor -y
Gemini CLI
$ npx skills add athola/claude-night-market --skill glm-delegation -a gemini-cli -y
GitHub Copilot
$ npx skills add athola/claude-night-market --skill glm-delegation -a github-copilot -y
OpenCode
$ npx skills add athola/claude-night-market --skill glm-delegation -a opencode -y
Windsurf
$ npx skills add athola/claude-night-market --skill glm-delegation -a windsurf -y
name: glm-delegation description: Delegates tasks to Z.ai GLM-5.x via the stock claude binary and an endpoint swap. Use when delegation-core selects GLM or a 1M-token context is needed. alwaysApply: false category: delegation-implementation tags: - glm - zai - endpoint-swap - delegation - large-context dependencies: - delegation-core tools: - claude - delegation_executor.py usage_patterns: - endpoint-swap-integration - large-context-analysis - coding-plan-routing complexity: intermediate estimated_tokens: 650 references: - delegation-core/shared-shell-execution.md
GLM ships no CLI of its own. Z.ai serves an Anthropic-compatible endpoint, so the stock `claude` binary reaches GLM by changing two environment variables and nothing else. This is the endpoint-swap archetype: the redirection is environment, never argv.
GLM-5.3 was released on 2026-08-14 and claims a large coding gain over GLM-5.2 from post-training alone.
Anthropic quota
unauthenticated request
Only the stock Claude Code binary is needed:
npm install -g @anthropic-ai/claude-code
export ZAI_API_KEY="<your-zai-key>"
The delegation service builds the child environment from that one variable. Z.ai requires `ANTHROPIC_AUTH_TOKEN`, not `ANTHROPIC_API_KEY`. Putting the key in the wrong one is the most common way to get a 401 here, so the service names the correct variable and the overlay references `${ZAI_API_KEY}` rather than storing a secret.
uv run python scripts/delegation_executor.py glm "Review this design" \ --files docs/
make -C plugins/conjure delegate-glm PROMPT='Review this design'
ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic \ ANTHROPIC_AUTH_TOKEN="$ZAI_API_KEY" \ claude --model glm-5.3 -p "Review this design"
`glm` declares `code_execution` and `large_context` strengths and ranks behind gemini, qwen and minimax in the candidate order. It declares `glm-5.3` as its default, `glm-5.3[1m]` for large context, and `glm-5.3-flash` for fast response.
| Property | Value | |----------|-------| | Binary | `claude` (stock) | | Base URL | `https://api.z.ai/api/anthropic` | | Auth variable | `ANTHROPIC_AUTH_TOKEN`, from `ZAI_API_KEY` | | Default model | `glm-5.3` | | Large context | `glm-5.3[1m]` | | Fast response | `glm-5.3-flash` | | OpenAI-compatible URL | `https://api.z.ai/api/coding/paas/v4` |
The `[1m]` suffix is what unlocks the 1M-token window. Omitting it is a documented setup mistake. Pair it with `CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000` when driving `claude` directly.
Two operational notes. Environment changes only take effect in a freshly launched shell, so an already-open session keeps reaching Anthropic's real endpoint. And `claude` shows a first-run trust prompt when it sees a non-Anthropic base URL. The `-p` non-interactive form this service uses does not block on it.
Prices per 1M tokens, from the [Z.ai pricing page](https://docs.z.ai/guides/overview/pricing) on 2026-10-26: `glm-5.3` is $1.40 input and $4.40 output, and `glm-5.3-flash` is $0.15 and $0.50. Both have a 1M-token context. `GLM_52` stays defined for callers that pin it.
The same archetype generalizes: MiniMax, Moonshot/Kimi, DeepSeek and OpenRouter all expose Anthropic-compatible endpoints, so adding one is a `ServiceConfig` with a different base URL.
available rather than naming an unset variable
the child environment, not argv
`ANTHROPIC_API_KEY`
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use…
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily…
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use…
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled…
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.