Help us improve
Share bugs, ideas, or general feedback.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin makfly-cc-delegatorHow this command is triggered — by the user, by Claude, or both
Slash command
/glm-delegator:setupThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Setup Configure GLM (4.7/5) as specialized expert subagents via MCP. Five domain experts that can advise OR implement. ## Flags - `--non-interactive` or `-y`: Skip all prompts, use defaults - `--api-key KEY`: Pass API key directly (skip env check) - `--model MODEL`: Override default model (default: glm-5) - `--no-rules`: Skip rule file installation ## Exit Codes | Code | Meaning | |------|---------| | 0 | Success | | 1 | Missing dependencies | | 2 | Missing API key | | 3 | Config write error | | 4 | User cancelled | ## Step 1: Check Python and Dependencies ### If Missing Tell user...
/setupConfigures Codex (GPT) or Gemini as MCP servers for claude-delegator, installs orchestration rules to ~/.claude/rules/, and verifies setup.
/setupConfigures deliberation with MCP servers for GPT (Codex), Gemini, Grok, and OpenRouter. Seeds config, checks provider CLIs, installs orchestration rules, and prints status.
/model-switchSwitches Claude Code between Claude and GLM AI models by updating settings.json with secure API token and endpoint configuration. Supports status checks and setup.
/cc-setupAnalyzes current repo, detects tech stack and infra, deploys full 4-layer Claude Code setup (CLAUDE.md routing, Skills, Hooks, Agents), MCP servers, LSP hints, memory, and cost optimization. Supports --auto, --dry-run, --audit flags.
/model-configInteractive wizard that detects installed AI providers and displays or guides configuration of models, routing, and cost for the Claude Octopus workflow system.
/consensus-setupRuns interactive wizard to detect CLIs (kilo, codex, gemini, qwen), set OpenRouter key, and configure models/quorum for multi-model consensus reviews.
Share bugs, ideas, or general feedback.
Configure GLM (4.7/5) as specialized expert subagents via MCP. Five domain experts that can advise OR implement.
--non-interactive or -y: Skip all prompts, use defaults--api-key KEY: Pass API key directly (skip env check)--model MODEL: Override default model (default: glm-5)--no-rules: Skip rule file installation| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Missing dependencies |
| 2 | Missing API key |
| 3 | Config write error |
| 4 | User cancelled |
python3 --version 2>&1 || echo "PYTHON_MISSING"
pip3 show httpx 2>/dev/null | grep Version || echo "HTTPX_MISSING"
Tell user:
Python 3.8+ or httpx library not found.
Install dependencies with:
cd /path/to/glm-delegator
pip3 install -r requirements.txt
After installation, re-run /glm-delegator:setup
STOP here if dependencies are missing.
echo "GLM_API_KEY: ${GLM_API_KEY:+SET}"
echo "Z_AI_API_KEY: ${Z_AI_API_KEY:+SET}"
Tell user:
Z.AI API key not found.
Get your API key from: https://platform.z.ai/
Then set it:
export GLM_API_KEY="your_api_key_here"
Or add to ~/.bashrc or ~/.zshrc for persistence.
echo "${CLAUDE_PLUGIN_ROOT}"
This should output the path to glm-delegator.
cat ~/.claude.json 2>/dev/null || cat ~/.claude/settings.json 2>/dev/null || echo "{}"
Merge into ~/.claude.json (or ~/.claude/settings.json):
{
"mcpServers": {
"glm-delegator": {
"command": "python3",
"args": ["${CLAUDE_PLUGIN_ROOT}/glm_mcp_server.py"],
"env": {
"GLM_API_KEY": "${GLM_API_KEY:-${Z_AI_API_KEY}}"
}
}
}
}
CRITICAL:
mcpServers entries${CLAUDE_PLUGIN_ROOT} with actual pathmkdir -p ~/.claude/rules/glm-delegator && cp ${CLAUDE_PLUGIN_ROOT}/rules/*.md ~/.claude/rules/glm-delegator/
Run these checks and report results:
# Check 1: Python version
python3 --version 2>&1
# Check 2: httpx installed
pip3 show httpx 2>&1 | grep Version || echo "Not installed"
# Check 3: MCP server configured
cat ~/.claude.json 2>/dev/null | jq -r '.mcpServers["glm-delegator"].command' 2>/dev/null || \
cat ~/.claude/settings.json 2>/dev/null | jq -r '.mcpServers["glm-delegator"].command' 2>/dev/null || \
echo "Not configured"
# Check 4: Server script exists
ls -la ${CLAUDE_PLUGIN_ROOT}/glm_mcp_server.py 2>/dev/null || echo "Script not found"
# Check 5: Rules installed (count files)
ls ~/.claude/rules/glm-delegator/*.md 2>/dev/null | wc -l
# Check 6: API key set
echo "GLM_API_KEY: ${GLM_API_KEY:+SET}"
echo "Z_AI_API_KEY: ${Z_AI_API_KEY:+SET}"
Display actual values from the checks above:
glm-delegator Status
───────────────────────────────────────────────────
Python: ✓ [version from check 1]
Dependencies: ✓ httpx [version] (or ✗ if missing)
MCP Config: ✓ ~/.claude.json (or ✗ if missing)
Server Script: ✓ glm_mcp_server.py (or ✗ if missing)
Rules: ✓ [N] files in ~/.claude/rules/glm-delegator/
API Key: ✓ SET (or ✗ if missing)
───────────────────────────────────────────────────
If any check fails, report the specific issue and how to fix it.
Setup complete!
Next steps:
1. Restart Claude Code to load MCP server
2. Set API key if not already: export GLM_API_KEY="your_key"
Five GLM experts available:
┌──────────────────┬─────────────────────────────────────────────┐
│ Architect │ "How should I structure this service?" │
│ │ "What are the tradeoffs of Redis vs X?" │
│ │ → System design, architecture decisions │
├──────────────────┼─────────────────────────────────────────────┤
│ Plan Reviewer │ "Review this migration plan" │
│ │ "Is this implementation plan complete?" │
│ │ → Plan validation before execution │
├──────────────────┼─────────────────────────────────────────────┤
│ Scope Analyst │ "Clarify the scope of this feature" │
│ │ "What am I missing in these requirements?" │
│ │ → Pre-planning, catches ambiguities │
├──────────────────┼─────────────────────────────────────────────┤
│ Code Reviewer │ "Review this PR" (EN/FR/CN) │
│ │ "Find issues in this implementation" │
│ │ → Code quality, bugs, maintainability │
├──────────────────┼─────────────────────────────────────────────┤
│ Security Analyst │ "Is this authentication flow secure?" │
│ │ "Harden this endpoint" │
│ │ → Vulnerabilities, threat modeling │
└──────────────────┴─────────────────────────────────────────────┘
Every expert can advise (read-only) OR implement (write).
Expert is auto-detected based on your request.
Explicit: "Ask GLM to review..." or "Have GLM fix..."
Documentation: https://github.com/kev/glm-delegator
Use AskUserQuestion to ask the user if they'd like to ⭐ star the glm-delegator repository on GitHub to support the project.
Options: "Yes, star the repo" / "No thanks"
If yes: Check if gh CLI is available and run:
gh api -X PUT /user/starred/kev/glm-delegator
If gh is not available or the command fails, provide the manual link:
https://github.com/kev/glm-delegator
If no: Thank them and complete setup without starring.