Fix GLM chicken-and-egg problem in Master Prompt workflow
BREAKING CHANGES to workflow: - Add 'BEFORE YOU BEGIN' section to MASTER-PROMPT.md - GLM users MUST configure GLM FIRST before using Claude Code - Add clear GLM pre-configuration steps at top of file - Add clear copy boundaries (✂️ COPY FROM HERE / ✂️ COPY ENDS HERE) - Add visual separator lines for copy-paste section README.md updates: - Add prominent GLM warning at top of Installation Options - Add quick GLM setup commands - Clarify Master Prompt workflow with step-by-step - Emphasize GLM pre-configuration requirement This fixes the issue where GLM users couldn't use Claude Code to paste the master prompt without first configuring GLM.
This commit is contained in:
243
MASTER-PROMPT.md
243
MASTER-PROMPT.md
@@ -1,35 +1,91 @@
|
|||||||
# 🚀 Claude Code & GLM Suite - Master Integration Prompt
|
# 🚀 Claude Code & GLM Suite - Master Integration Prompt
|
||||||
|
|
||||||
> **Copy and paste this entire prompt into Claude Code to automatically install the complete customization suite.**
|
> **Quick installation by copy-pasting a prompt into Claude Code**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📋 Master Integration Prompt
|
## ⚠️ BEFORE YOU BEGIN - Read This First!
|
||||||
|
|
||||||
**Copy everything below this line and paste into Claude Code:**
|
### **If Using Z.AI / GLM Coding Plan (90% cheaper):**
|
||||||
|
|
||||||
```
|
**You MUST configure GLM FIRST before using Claude Code!**
|
||||||
I want to install the Ultimate Claude Code & GLM Customization Suite with 40+ agents, MCP tools, and auto-triggering automation. Please perform the following integration:
|
|
||||||
|
|
||||||
## Prerequisites: Install Claude Code
|
|
||||||
|
|
||||||
**Before installing agents and tools, ensure Claude Code is installed:**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install Claude Code (requires Node.js 18+)
|
# Step 1: Get your API key
|
||||||
|
# Visit: https://z.ai/
|
||||||
|
# Sign up for GLM Coding Plan and copy your API key
|
||||||
|
|
||||||
|
# Step 2: Create Claude Code settings
|
||||||
|
mkdir -p ~/.claude
|
||||||
|
cat > ~/.claude/settings.json << 'EOF'
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_AUTH_TOKEN": "YOUR_ZAI_API_KEY_HERE",
|
||||||
|
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
||||||
|
"API_TIMEOUT_MS": "3000000",
|
||||||
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
||||||
|
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
||||||
|
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Step 3: Install Claude Code (if not installed)
|
||||||
npm install -g @anthropic-ai/claude-code
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
# Verify installation (recommended: 2.0.14+)
|
# Step 4: Verify installation
|
||||||
claude --version
|
claude --version # Should be 2.0.14 or higher
|
||||||
|
|
||||||
# If needed, upgrade to latest
|
# Step 5: Start Claude Code
|
||||||
claude update
|
claude
|
||||||
|
|
||||||
|
# Step 6: When prompted, enter /status to verify GLM is working
|
||||||
|
/status
|
||||||
```
|
```
|
||||||
|
|
||||||
**Reference:** https://docs.anthropic.com/en/docs/claude-code/overview
|
**📖 Official GLM Documentation:** https://docs.z.ai/devpack/tool/claude
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### **If Using Anthropic Claude (Official API):**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Step 1: Get your API key
|
||||||
|
# Visit: https://console.anthropic.com/
|
||||||
|
|
||||||
|
# Step 2: Create Claude Code settings
|
||||||
|
mkdir -p ~/.claude
|
||||||
|
cat > ~/.claude/settings.json << 'EOF'
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_AUTH_TOKEN": "sk-ant-your-api-key-here",
|
||||||
|
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Step 3: Install Claude Code (if not installed)
|
||||||
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
|
# Step 4: Start Claude Code
|
||||||
|
claude
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 HOW TO USE THE MASTER PROMPT
|
||||||
|
|
||||||
|
**Once Claude Code is running and configured:**
|
||||||
|
|
||||||
|
### **Option 1: Copy From This File**
|
||||||
|
|
||||||
|
**✂️ COPY FROM HERE:**
|
||||||
|
|
||||||
|
```text
|
||||||
|
═══════════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
I want to install the Ultimate Claude Code & GLM Customization Suite with 40+ agents, MCP tools, and auto-triggering automation. Please perform the following integration:
|
||||||
|
|
||||||
## Step 1: Install Contains Studio Agents (37 agents with PROACTIVELY auto-triggering)
|
## Step 1: Install Contains Studio Agents (37 agents with PROACTIVELY auto-triggering)
|
||||||
|
|
||||||
Clone the contains-studio/agents repository:
|
Clone the contains-studio/agents repository:
|
||||||
@@ -67,83 +123,19 @@ This provides 15+ MCP tools including:
|
|||||||
- Web search and page reading
|
- Web search and page reading
|
||||||
- GitHub repository reading
|
- GitHub repository reading
|
||||||
|
|
||||||
## Step 3: Configure Model (Choose ONE)
|
## Step 3: Configure Hooks-Based Auto-Triggering (Optional)
|
||||||
|
|
||||||
### Option A: Anthropic Claude (Official API)
|
|
||||||
|
|
||||||
**Best for:** Production, highest quality, official support
|
|
||||||
|
|
||||||
1. Get your API key: https://console.anthropic.com/
|
|
||||||
2. Create ~/.claude/settings.json:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"env": {
|
|
||||||
"ANTHROPIC_AUTH_TOKEN": "sk-ant-your-actual-api-key-here",
|
|
||||||
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
3. Verify installation: `claude --version`
|
|
||||||
|
|
||||||
### Option B: Z.AI / GLM Coding Plan (90% cheaper, Official Integration)
|
|
||||||
|
|
||||||
**Best for:** Development, testing, cost-sensitive projects
|
|
||||||
|
|
||||||
**Follow official Z.AI documentation:** https://docs.z.ai/devpack/tool/claude
|
|
||||||
|
|
||||||
1. **Get your GLM Coding Plan API key:**
|
|
||||||
- Visit: https://z.ai/
|
|
||||||
- Sign up for GLM Coding Plan
|
|
||||||
- Copy your API key
|
|
||||||
|
|
||||||
2. **Configure Claude Code for GLM:**
|
|
||||||
Create ~/.claude/settings.json with:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"env": {
|
|
||||||
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
|
|
||||||
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
|
||||||
"API_TIMEOUT_MS": "3000000",
|
|
||||||
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
|
||||||
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
|
||||||
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Verify and test:**
|
|
||||||
```bash
|
|
||||||
# Check Claude Code version (recommended: 2.0.14+)
|
|
||||||
claude --version
|
|
||||||
|
|
||||||
# Start Claude Code
|
|
||||||
claude
|
|
||||||
|
|
||||||
# Check model status (enter /status when prompted)
|
|
||||||
/status
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Troubleshooting (if configuration doesn't take effect):**
|
|
||||||
- Close all Claude Code windows
|
|
||||||
- Open new terminal and run `claude` again
|
|
||||||
- Or delete ~/.claude/settings.json and reconfigure
|
|
||||||
- Verify JSON format is correct (no missing/extra commas)
|
|
||||||
|
|
||||||
**GLM Models Available:**
|
|
||||||
- `glm-4.5-air` - Fast, efficient (Haiku equivalent)
|
|
||||||
- `glm-4.7` - High quality (Sonnet/Opus equivalent)
|
|
||||||
|
|
||||||
## Step 4: Configure Hooks-Based Auto-Triggering (Optional)
|
|
||||||
|
|
||||||
Create ~/.claude/hooks.json for additional auto-triggering:
|
Create ~/.claude/hooks.json for additional auto-triggering:
|
||||||
|
cat > ~/.claude/hooks.json << 'EOF'
|
||||||
{
|
{
|
||||||
"userPromptSubmitHook": "test-writer-fixer@agent",
|
"userPromptSubmitHook": "test-writer-fixer@agent",
|
||||||
"toolOutputHook": "whimsy-injector@agent"
|
"toolOutputHook": "whimsy-injector@agent"
|
||||||
}
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
Note: PROACTIVELY agents (studio-coach, experiment-tracker) work automatically without hooks.
|
Note: PROACTIVELY agents (studio-coach, experiment-tracker) work automatically without hooks.
|
||||||
|
|
||||||
## Step 5: Verify Installation
|
## Step 4: Verify Installation
|
||||||
|
|
||||||
Run these checks:
|
Run these checks:
|
||||||
1. List agents: ls -la ~/.claude/agents/
|
1. List agents: ls -la ~/.claude/agents/
|
||||||
@@ -185,43 +177,17 @@ Expected results:
|
|||||||
2. Hooks-Based (our implementation) - Event-driven, explicit control
|
2. Hooks-Based (our implementation) - Event-driven, explicit control
|
||||||
|
|
||||||
Please execute this integration step by step and confirm when complete.
|
Please execute this integration step by step and confirm when complete.
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════════════════════
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
**✂️ COPY ENDS HERE**
|
||||||
|
|
||||||
## 🎯 How to Use
|
|
||||||
|
|
||||||
1. **Copy** the entire prompt above (including the code block)
|
|
||||||
2. **Paste** into Claude Code
|
|
||||||
3. **Follow** the step-by-step installation
|
|
||||||
4. **Verify** your installation
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📚 Source Repositories
|
## 📖 Detailed Installation Guide
|
||||||
|
|
||||||
This integration pulls from multiple open-source projects:
|
### What Gets Installed:
|
||||||
|
|
||||||
### Core Agents
|
|
||||||
- **[contains-studio/agents](https://github.com/contains-studio/agents)** - 37 agents with PROACTIVELY auto-triggering
|
|
||||||
- **[claude-codex-settings](https://github.com/fcakyon/claude-codex-settings)** - MCP configuration patterns
|
|
||||||
|
|
||||||
### Design Inspiration
|
|
||||||
- **[ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)** - UI/UX design patterns
|
|
||||||
|
|
||||||
### Coordination Framework
|
|
||||||
- **[Ralph](https://github.com/iannuttall/ralph)** - Multi-agent coordination patterns
|
|
||||||
|
|
||||||
### MCP Tools
|
|
||||||
- **[@z_ai/mcp-server](https://github.com/zai-ai/mcp-server)** - Vision and analysis tools
|
|
||||||
- **[Model Context Protocol](https://github.com/modelcontextprotocol)** - Open standard for AI tools
|
|
||||||
|
|
||||||
### Official Tools
|
|
||||||
- **[Claude Code](https://github.com/anthropics/claude-code)** - Official Claude Code CLI
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 What Gets Installed
|
|
||||||
|
|
||||||
| Component | Source | Count |
|
| Component | Source | Count |
|
||||||
|-----------|--------|-------|
|
|-----------|--------|-------|
|
||||||
@@ -234,9 +200,9 @@ This integration pulls from multiple open-source projects:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ✅ After Installation
|
## 🎯 Quick Reference
|
||||||
|
|
||||||
Test your setup:
|
**After Installation, Test With:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start Claude Code
|
# Start Claude Code
|
||||||
@@ -267,11 +233,48 @@ claude
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📖 Documentation
|
## 📚 Source Repositories
|
||||||
|
|
||||||
- **[Integration Guide](https://github.rommark.dev/admin/claude-code-glm-suite/src/main/INTEGRATION-GUIDE.md)** - Technical details
|
This integration pulls from multiple open-source projects:
|
||||||
- **[Contains Studio Integration](https://github.rommark.dev/admin/claude-code-glm-suite/src/main/CONTAINS-STUDIO-INTEGRATION.md)** - PROACTIVELY mechanism
|
|
||||||
- **[README](https://github.rommark.dev/admin/claude-code-glm-suite)** - Complete documentation
|
### Core Agents
|
||||||
|
- **[contains-studio/agents](https://github.com/contains-studio/agents)** - 37 agents with PROACTIVELY auto-triggering
|
||||||
|
- **[claude-codex-settings](https://github.com/fcakyon/claude-codex-settings)** - MCP configuration patterns
|
||||||
|
|
||||||
|
### Design Inspiration
|
||||||
|
- **[ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)** - UI/UX design patterns
|
||||||
|
|
||||||
|
### Coordination Framework
|
||||||
|
- **[Ralph](https://github.com/iannuttall/ralph)** - Multi-agent coordination patterns
|
||||||
|
|
||||||
|
### MCP Tools
|
||||||
|
- **[@z_ai/mcp-server](https://github.com/zai-ai/mcp-server)** - Vision and analysis tools
|
||||||
|
- **[Model Context Protocol](https://github.com/modelcontextprotocol)** - Open standard for AI tools
|
||||||
|
|
||||||
|
### Official Tools
|
||||||
|
- **[Claude Code](https://github.com/anthropics/claude-code)** - Official Claude Code CLI
|
||||||
|
- **[Z.AI GLM Documentation](https://docs.z.ai/devpack/tool/claude)** - Official GLM integration guide
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✅ After Installation
|
||||||
|
|
||||||
|
Test your setup:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Verify agents are installed
|
||||||
|
ls ~/.claude/agents/
|
||||||
|
find ~/.claude/agents -name "*.md" | wc -l
|
||||||
|
|
||||||
|
# 2. Start Claude Code
|
||||||
|
claude
|
||||||
|
|
||||||
|
# 3. Check status (enter /status when prompted)
|
||||||
|
/status
|
||||||
|
|
||||||
|
# 4. Try an agent
|
||||||
|
> Use the studio-coach agent to help me plan a complex project
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -29,12 +29,47 @@ chmod +x interactive-install-claude.sh
|
|||||||
|
|
||||||
Choose the installation method that works best for you:
|
Choose the installation method that works best for you:
|
||||||
|
|
||||||
|
### ⚠️ IMPORTANT: For Z.AI / GLM Users
|
||||||
|
|
||||||
|
**If using the GLM Coding Plan (90% cheaper), you MUST configure GLM FIRST before using Claude Code!**
|
||||||
|
|
||||||
|
The Master Prompt file includes complete GLM setup instructions at the top. Read the "BEFORE YOU BEGIN" section first.
|
||||||
|
|
||||||
|
**Quick GLM Setup:**
|
||||||
|
```bash
|
||||||
|
# Get API key: https://z.ai/
|
||||||
|
mkdir -p ~/.claude
|
||||||
|
cat > ~/.claude/settings.json << 'EOF'
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_AUTH_TOKEN": "YOUR_ZAI_API_KEY_HERE",
|
||||||
|
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
||||||
|
"API_TIMEOUT_MS": "3000000",
|
||||||
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
||||||
|
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
||||||
|
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
claude # Start Claude Code with GLM
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Option 1: Master Prompt (Recommended for First-Time Users)
|
### Option 1: Master Prompt (Recommended for First-Time Users)
|
||||||
|
|
||||||
**Copy and paste this prompt into Claude Code** - it will guide you through the entire installation step-by-step:
|
**Copy and paste into Claude Code** - it will guide you through the entire installation step-by-step:
|
||||||
|
|
||||||
📄 **[MASTER-PROMPT.md](https://github.rommark.dev/admin/claude-code-glm-suite/src/main/MASTER-PROMPT.md)**
|
📄 **[MASTER-PROMPT.md](https://github.rommark.dev/admin/claude-code-glm-suite/src/main/MASTER-PROMPT.md)**
|
||||||
|
|
||||||
|
**⚡ Quick Start:**
|
||||||
|
1. **If using GLM:** Configure GLM first (see above)
|
||||||
|
2. Start Claude Code: `claude`
|
||||||
|
3. Copy the prompt from MASTER-PROMPT.md (clearly marked with ✂️ COPY FROM HERE)
|
||||||
|
4. Paste into Claude Code
|
||||||
|
5. Done!
|
||||||
|
|
||||||
**Benefits:**
|
**Benefits:**
|
||||||
- ✅ See all steps before executing
|
- ✅ See all steps before executing
|
||||||
- ✅ Easy to customize and understand
|
- ✅ Easy to customize and understand
|
||||||
|
|||||||
Reference in New Issue
Block a user