# 🚀 Claude Code & GLM Suite ## Master Integration Prompt > **Complete installation guide with ALL sources, explanations, and examples** --- ## 📑 Table of Contents 1. [Before You Begin](#-before-you-begin) 2. [How to Use](#-how-to-use-the-master-prompt) 3. [Copy-Paste Master Prompt](#-copy-the-master-prompt) 4. [Real-Life Examples](#-real-life-examples) 5. [Agent Reference](#-agent-departments) 6. [Configuration Files](#-configuration-files) 7. [Quick Reference](#-quick-reference) 8. [Troubleshooting](#-troubleshooting) --- ## ⚠️ Before You Begin ### Choose Your API Provider #### Option A: Z.AI / GLM Coding Plan (90% Cheaper) ⭐ **Recommended for cost savings** ```bash # Install Z.AI Coding Helper npm install -g @z_ai/coding-helper # Run the setup wizard npx @z_ai/coding-helper init # Start Claude Code claude ``` 📖 **Documentation:** https://docs.z.ai/devpack/tool/claude --- #### Option B: Anthropic Claude (Official) ```bash # Get API key from: https://console.anthropic.com/ # Configure Claude Code mkdir -p ~/.claude cat > ~/.claude/settings.json << 'EOF' { "env": { "ANTHROPIC_AUTH_TOKEN": "sk-ant-your-key-here", "ANTHROPIC_BASE_URL": "https://api.anthropic.com" } } EOF # Install Claude Code npm install -g @anthropic-ai/claude-code # Start claude ``` --- ## 📖 How to Use the Master Prompt ### Quick Start 1. **Configure your API** (choose Z.AI or Anthropic above) 2. **Start Claude Code:** `claude` 3. **Copy the prompt below** (one continuous block) 4. **Paste into Claude Code** 5. **Follow the step-by-step installation** --- ## 📋 Copy the Master Prompt ### ✂️ COPY FROM HERE (One Continuous Block) ```text ═══════════════════════════════════════════════════════════════════════════════ CLAUDE CODE & GLM SUITE - MASTER PROMPT ═══════════════════════════════════════════════════════════════════════════════ I want to install the complete Claude Code & GLM Customization Suite with ALL integrations including agents, MCP tools, code analysis, and automation. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📦 OVERVIEW: What We're Installing This suite includes 7 major components from open-source projects: 1. contains-studio/agents → 38 specialized AI agents with auto-triggering 2. @z_ai/mcp-server → 8 vision and analysis tools 3. @z_ai/coding-helper → Web search, GitHub integration 4. llm-tldr → Token-efficient code analysis (95% reduction) 5. ui-ux-pro-max → Professional UI/UX design guidance 6. @iannuttall/ralph → Autonomous agent looping (optional) 7. sync-agents.sh → Automated agent updates ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 1: Install Contains Studio Agents (38 agents) Source: https://github.com/contains-studio/agents Clone and install: git clone https://github.com/contains-studio/agents.git /tmp/contains-studio-agents cp -r /tmp/contains-studio-agents/agents/* ~/.claude/agents/ What you get: • 37 specialized agents across 8 departments • 7 PROACTIVELY auto-triggering coordinators • Automatic multi-agent coordination Departments: ├── Engineering (7): AI Engineer, Backend, DevOps, Frontend, Mobile, Prototyper, Tester ├── Marketing (7): TikTok, Growth Hacker, Content, Instagram, Reddit, Twitter, ASO ├── Design (6): Brand, UI Designer, UX Research, Visual Storyteller, Whimsy, UI/UX Pro Max ├── Product (3): Feedback, Sprint Prioritizer, Trend Researcher ├── Project Management (3): Experiment Tracker, Project Shipper, Studio Producer ├── Studio Operations (5): Analytics, Finance, Infrastructure, Legal, Support ├── Testing (5): API Tester, Performance, Test Results, Tool Evaluator, Workflow └── Bonus (3): Studio Coach, Agent Updater, Joker ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 1.5: Install UI/UX Pro Max Skill Source: https://github.rommark.dev/admin/claude-code-glm-suite Install the skill: mkdir -p ~/.claude/skills cd claude-code-glm-suite cp -r skills/ui-ux-pro-max ~/.claude/skills/ chmod +x ~/.claude/skills/ui-ux-pro-max/scripts/*.py What you get: • /ui-ux-pro-max slash command for design guidance • Search 50+ design patterns (minimalism, glassmorphism, etc.) • Color schemes, typography pairs, component examples • WCAG 2.1 accessibility compliance ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 1.75: Install Agent Sync Script Source: https://github.rommark.dev/admin/claude-code-glm-suite Download and install: wget -O ~/.claude/sync-agents.sh https://raw.githubusercontent.com/github.rommark.dev/admin/claude-code-glm-suite/main/sync-agents.sh chmod +x ~/.claude/sync-agents.sh What you get: • Automatic agent updates from official repository • Timestamped backups before updating • Preserves your customizations • Optional git push to your Gitea repository Usage: ~/.claude/sync-agents.sh ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 2: Install MCP Vision & Analysis Tools Source: https://github.com/zai-ai/mcp-server Install: npm install -g @z_ai/mcp-server Verify: npx @z_ai/mcp-server --help What you get (8 tools): • analyze_image → Understand any image • analyze_video → Analyze video content • ui_to_artifact → Convert UI screenshots to code • extract_text → OCR text extraction • diagnose_error → Understand errors from screenshots • ui_diff_check → Compare two UI screenshots • analyze_data_viz → Extract insights from charts • understand_diagram → Understand technical diagrams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 3: Install MCP Web & GitHub Tools Source: https://github.com/fcakyon/claude-codex-settings (inspired by) Install: npm install -g @z_ai/coding-helper Verify: npx @z_ai/coding-helper --help What you get (3 tools): • web-search-prime → AI-optimized web search • web-reader → Convert web pages to markdown • zread → Read and analyze GitHub repositories ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📥 STEP 4: Install TLDR (Token-Efficient Code Analysis) Source: https://github.com/parcadei/llm-tldr Install: pip install llm-tldr tldr warm . What you get: • 95% token reduction for large codebases • 5-layer analysis (AST, Call Graph, CFG, DFG, PDG) • 18 MCP tools for code analysis • Semantic search by behavior • Impact analysis for safe refactoring ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ STEP 5: Configure MCP Servers Create MCP configuration: mkdir -p ~/.claude cat > ~/.claude/claude_desktop_config.json << 'EOF' { "mcpServers": { "tldr": { "command": "tldr-mcp", "args": ["--project", "."] }, "zai-vision": { "command": "npx", "args": ["@z_ai/mcp-server"] }, "zai-web": { "command": "npx", "args": ["@z_ai/coding-helper"] } } } EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ STEP 6: Configure Ralph CLI (Optional - Advanced) Source: https://github.com/iannuttall/ralph ⚠️ SKIP THIS STEP if you want simple setup ✅ COMPLETE THIS STEP for autonomous infinite looping Install Ralph: npm install -g @iannuttall/ralph Create auto-trigger hook: mkdir -p ~/.claude/hooks cat > ~/.claude/hooks/ralph-auto-trigger.sh << 'HOOK_SCRIPT' #!/bin/bash # Ralph Auto-Trigger Hook # Modes: "always" | "agents" (default) | "off" # Background: Runs non-blocking, logs to ~/.claude/ralph-output.log CLAUDE_DIR="$HOME/.claude" RALPH_STATE_FILE="$CLAUDE_DIR/ralph-loop.local.md" RALPH_PID_FILE="$CLAUDE_DIR/ralph.pid" RALPH_LOCK_FILE="$CLAUDE_DIR/ralph.lock" RALPH_LOG_FILE="$CLAUDE_DIR/ralph-output.log" HOOK_INPUT=$(cat) USER_PROMPT=$(echo "$HOOK_INPUT" | jq -r '.prompt // empty' 2>/dev/null || echo "${1:-}") RALPH_AUTO_MODE="${RALPH_AUTO_MODE:-agents}" RALPH_MAX_ITERATIONS="${RALPH_MAX_ITERATIONS:-50}" if [[ "$RALPH_AUTO_MODE" == "off" ]]; then exit 0 fi if [[ -f "$RALPH_LOCK_FILE" ]]; then LOCK_PID=$(cat "$RALPH_LOCK_FILE" 2>/dev/null || echo "") if [[ -n "$LOCK_PID" ]] && kill -0 "$LOCK_PID" 2>/dev/null; then exit 0 else rm -f "$RALPH_LOCK_FILE" "$RALPH_PID_FILE" fi fi should_trigger=false if [[ "$RALPH_AUTO_MODE" == "always" ]]; then should_trigger=true elif [[ "$RALPH_AUTO_MODE" == "agents" ]]; then if echo "$USER_PROMPT" | grep -qiE "build|create|implement|develop|fix|add|refactor|optimize|write|generate|delegate|autonomous|agent|engineer|developer|designer|strategist"; then should_trigger=true fi fi if [[ "$should_trigger" == true ]]; then mkdir -p "$CLAUDE_DIR" cat > "$RALPH_STATE_FILE" << STATE # Ralph Loop State - Auto-Triggered # Generated: $(date -u +"%Y-%m-%d %H:%M:%S UTC") **User Request:** $USER_PROMPT **Mode:** $RALPH_AUTO_MODE **Max Iterations:** $RALPH_MAX_ITERATIONS **Timestamp:** $(date -Iseconds) ## Usage Monitor Ralph: tail -f ~/.claude/ralph-output.log Stop Ralph: kill $(cat ~/.claude/ralph.pid) rm ~/.claude/ralph.lock STATE if command -v ralph &> /dev/null; then touch "$RALPH_LOG_FILE" echo "[$(date -u +"%Y-%m-%d %H:%M:%S UTC")] Starting Ralph..." >> "$RALPH_LOG_FILE" echo "Mode: $RALPH_AUTO_MODE" >> "$RALPH_LOG_FILE" echo "---" >> "$RALPH_LOG_FILE" nohup ralph build "$RALPH_MAX_ITERATIONS" >> "$RALPH_LOG_FILE" 2>&1 & RALPH_PID=$! echo "$RALPH_PID" > "$RALPH_PID_FILE" echo "$RALPH_PID" > "$RALPH_LOCK_FILE" echo "🔄 Ralph auto-started (PID: $RALPH_PID)" >&2 echo " Monitor: tail -f ~/.claude/ralph-output.log" >&2 else echo "⚠️ Ralph CLI not installed" >&2 echo " Install: npm install -g @iannuttall/ralph" >&2 fi fi exit 0 HOOK_SCRIPT chmod +x ~/.claude/hooks/ralph-auto-trigger.sh Configure hooks: cat > ~/.claude/hooks.json << 'EOF' { "description": "Ralph auto-trigger hook", "hooks": { "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "/home/uroma/.claude/hooks/ralph-auto-trigger.sh", "timeout": 5 } ] } ] } } EOF Note: Replace "/home/uroma" with your actual home directory Control Modes: export RALPH_AUTO_MODE="agents" # Default export RALPH_AUTO_MODE="always" # Everything export RALPH_AUTO_MODE="off" # Disabled export RALPH_MAX_ITERATIONS="100" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ STEP 7: Verify Installation Run checks: ls -la ~/.claude/agents/ find ~/.claude/agents -name "*.md" | wc -l npx @z_ai/mcp-server --help npx @z_ai/coding-helper --help tldr --help tldr status . ralph --version 2>/dev/null || echo "Ralph optional" ls -la ~/.claude/hooks/ralph-auto-trigger.sh 2>/dev/null || echo "Ralph hook optional" Expected results: ✅ 39+ agent files (38 agents + README) ✅ All 8 departments present ✅ MCP tools accessible ✅ TLDR ready ✅ Settings configured ⚠️ Ralph (optional) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 SUMMARY: What You Now Have ┌─────────────────────────────────────────────────────────────┐ │ COMPONENTS INSTALLED │ ├─────────────────────────────────────────────────────────────┤ │ • 40+ AI Agents (8 departments) │ │ • 15+ MCP Tools (vision, web, code analysis) │ │ • PROACTIVELY Auto-Triggering (7 coordinators) │ │ • Ralph CLI (optional autonomous looping) │ │ • Agent Sync Script (keep everything updated) │ └─────────────────────────────────────────────────────────────┘ Benefits: • Token Efficiency: 95% reduction via TLDR • Code Understanding: 5-layer analysis • Visual Capabilities: Screenshot-to-code • Automation: Auto-tests, auto-UI, auto-coordination • Current Info: Real-time web search Please execute this complete integration step by step and confirm when each component is installed. ═══════════════════════════════════════════════════════════════════════════════ ``` ### ✂️ COPY ENDS HERE --- ## 💡 Real-Life Examples > **Note:** These are illustrative examples showing the conceptual difference between auto-triggering and manual workflows. ### Example 1: Adding OAuth **❌ Without Auto-Trigger** ``` You: Add OAuth to my app Claude: [Writes code, no tests] You: [Manually write tests later] ``` **✅ With Auto-Trigger** ``` You: Add OAuth to my app Claude: [Writes code] [test-writer-fixer PROACTIVELY triggers] → Tests written automatically ``` --- ### Example 2: Creating a Spinner **❌ Without Auto-Trigger** ``` You: Create a loading spinner Claude: [Basic spinner] You: [Manually request improvements] ``` **✅ With Auto-Trigger** ``` You: Create a loading spinner Claude: [Creates spinner] [whimsy-injector PROACTIVELY triggers] → Adds bounce animation + messages ``` --- ### Example 3: Launching a Feature **❌ Without Auto-Trigger** ``` You: We're launching next week Claude: [Unclear what to prepare] You: [Manual launch checklist] ``` **✅ With Auto-Trigger** ``` You: We're launching next week [project-shipper PROACTIVELY triggers] → Complete launch plan created ``` --- ## 📚 Agent Departments ### Engineering (7) - ai-engineer → ML/LLM integration - backend-architect → API design - devops-automator → CI/CD - frontend-developer → React/Vue/Angular - mobile-app-builder → iOS/Android - rapid-prototyper → Quick MVPs - test-writer-fixer → Auto tests ⚡ ### Marketing (7) - tiktok-strategist → Viral TikTok - growth-hacker → Growth loops - content-creator → Multi-platform - instagram-curator → Visual strategy - reddit-builder → Community - twitter-engager → Twitter growth - app-store-optimizer → ASO ### Design (6) - brand-guardian → Brand consistency - ui-designer → Interface design - ux-researcher → User research - visual-storyteller → Visual narratives - whimsy-injector → Delight ⚡ - ui-ux-pro-max → Professional UI/UX ⚡ ### Product (3) - feedback-synthesizer → User feedback - sprint-prioritizer → Feature priority - trend-researcher → Market trends ### Project Management (3) - experiment-tracker → A/B tests ⚡ - project-shipper → Launch coordination ⚡ - studio-producer → Team coordination ⚡ ### Studio Operations (5) - analytics-reporter → Data insights - finance-tracker → Financial tracking - infrastructure-maintainer → System maintenance - legal-compliance-checker → Legal compliance - support-responder → Customer support ### Testing (5) - api-tester → API testing - performance-benchmarker → Performance - test-results-analyzer → Test analysis - tool-evaluator → Tool assessment - workflow-optimizer → Process improvement ### Bonus (3) - studio-coach → Agent coordination ⚡ - agent-updater → Agent updates - joker → Humor injection ⚡ = PROACTIVELY auto-triggers --- ## ⚙️ Configuration Files ### ~/.claude/settings.json Main Claude Code configuration: ```json { "env": { "ANTHROPIC_AUTH_TOKEN": "your-api-key", "ANTHROPIC_BASE_URL": "https://api.anthropic.com", "API_TIMEOUT_MS": "3000000" } } ``` **For Z.AI / GLM:** ```json { "env": { "ANTHROPIC_AUTH_TOKEN": "your-zai-key", "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air", "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7", "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7" } } ``` ### ~/.claude/claude_desktop_config.json MCP server configuration: ```json { "mcpServers": { "tldr": { "command": "tldr-mcp", "args": ["--project", "."] }, "zai-vision": { "command": "npx", "args": ["@z_ai/mcp-server"] }, "zai-web": { "command": "npx", "args": ["@z_ai/coding-helper"] } } } ``` --- ## 🎯 Quick Reference ### Common Commands ```bash # Sync agents (get latest updates) ~/.claude/sync-agents.sh # Check TLDR status tldr status . # Verify Claude Code claude --version # Monitor Ralph (if installed) tail -f ~/.claude/ralph-output.log # Stop Ralph kill $(cat ~/.claude/ralph.pid) ``` ### Environment Variables ```bash # Auto-push to Gitea after sync export GITEA_REPO_URL="https://github.rommark.dev/admin/claude-code-glm-suite.git" # Ralph control export RALPH_AUTO_MODE="agents" # Options: always, agents, off export RALPH_MAX_ITERATIONS="50" # Max loop iterations ``` --- ## 🔧 Troubleshooting ### Agents not triggering? - Check `~/.claude/agents/` directory exists - Verify agent files are present - Restart Claude Code ### MCP tools missing? - Check `~/.claude/claude_desktop_config.json` - Verify tools are installed: `npm list -g` - Restart Claude Code ### TLDR not working? - Run `tldr warm .` in project directory - Check Python is installed - Verify `tldr-mcp` is in PATH ### Ralph not starting? - Check hook is executable: `ls -la ~/.claude/hooks/` - Verify mode: `echo $RALPH_AUTO_MODE` - Check log: `cat ~/.claude/ralph-output.log` --- ## 📖 Resources ### Official Documentation - **Claude Code:** https://docs.anthropic.com/en/docs/claude-code - **Z.AI / GLM:** https://docs.z.ai/devpack/tool/claude - **contains-studio/agents:** https://github.com/contains-studio/agents - **@z_ai/mcp-server:** https://github.com/zai-ai/mcp-server - **llm-tldr:** https://github.com/parcadei/llm-tldr ### Repository - **Gitea:** https://github.rommark.dev/admin/claude-code-glm-suite --- **Last Updated:** 2025-01-16 **Version:** 3.0 **Maintained By:** rommark.dev ---

For updates, check the repository regularly and run ~/.claude/sync-agents.sh