Skip to content

MAXHONG/openclaw-debug-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

[English] | δΈ­ζ–‡

OpenClaw Debug Master Agent

Version License OpenClaw

A professional system diagnosis and troubleshooting agent for OpenClaw

Features β€’ Quick Start β€’ Installation β€’ Documentation β€’ Contributing


🎯 What is Debug Master?

Debug Master is a specialized OpenClaw agent designed for system diagnosis, troubleshooting, and debugging. Unlike general-purpose agents, Debug Master is optimized for:

  • βœ… System service diagnostics (systemd, Docker, Nginx, etc.)
  • βœ… Log analysis and error tracking
  • βœ… Port conflict detection
  • βœ… Remote server diagnostics via SSH
  • βœ… OCR-based error screenshot analysis
  • βœ… Automatic web search for solutions
  • βœ… Self-learning new diagnostic skills

πŸ†š Main Agent vs Debug Master

Task Main Agent Debug Master
General conversation βœ… Expert ❌
Code generation βœ… Expert ❌
Web scraping βœ… Expert ❌
Service diagnosis ⚠️ Basic βœ… Expert
Log analysis ⚠️ Basic βœ… Expert
System troubleshooting ⚠️ Basic βœ… Expert
OCR error analysis ❌ βœ… Expert
Auto-search solutions ❌ βœ… Expert

✨ Features

πŸ› οΈ Core Diagnostic Skills

  1. Service Status Check - service-check.sh

    • Systemd service status (user/system)
    • Process monitoring
    • Auto-restart suggestions
  2. System Health Check - health-check.sh

    • CPU, memory, disk usage
    • Load average
    • Top processes
  3. Port Conflict Detection - port-check.sh

    • Find which process occupies a port
    • Kill process guidance
    • Alternative port suggestions
  4. Application Debugging - app-debug.sh

    • Process tree inspection
    • Environment variables
    • Open files and connections
  5. Image Error Analysis - analyze-image.sh

    • Tesseract OCR text extraction
    • Ollama LLaVA AI image understanding (optional)
    • Error message parsing
  6. Web Search - search-web.sh

    • DuckDuckGo free search (no API key)
    • Auto-format results
    • Find solutions online
  7. Web Crawling - crawl-page.sh

    • wget + html2text
    • Extract documentation
    • Plain text output for LLM
  8. Remote Diagnostics - remote-diagnose.sh

    • SSH automation
    • Remote system checks
    • Log collection

🧠 Three-Layer Self-Learning

  1. Layer 1: Search External Knowledge

    • Auto-search DuckDuckGo for solutions
    • Crawl official documentation
  2. Layer 2: Install Public Skills

    • Use Vercel Skills CLI
    • Install from trusted sources (vercel-labs, openclaw community)
    • Safety verification before installation
  3. Layer 3: Create New Skills

    • Generate diagnostic scripts with Qwen3-Coder-Plus
    • Record learning history
    • Continuous improvement

πŸ’° 100% Free & Open Source

All tools are completely free and open source:

Function Proprietary Solution Our Solution Cost
Image OCR Vision API (~$0.01/image) Tesseract OCR $0
Web Search Search API (~$0.002/query) DuckDuckGo $0
Web Crawl Crawling API (~$0.001/page) wget + html2text $0
LLM Model Claude 3.5 Sonnet Qwen3-Coder-Plus ~70% cheaper
Total Paid Free 100% savings

πŸš€ Quick Start

Prerequisites

  • OpenClaw >= 2026.3
  • Ubuntu 24.04 LTS (or similar Linux)
  • Bash, Node.js 22+

One-Command Installation

curl -fsSL https://raw.githubusercontent.com/MAXHONG/openclaw-debug-master/main/install.sh | bash

Or manual installation:

git clone https://github.com/MAXHONG/openclaw-debug-master.git
cd openclaw-debug-master
./install.sh

What the Installer Does

  1. Creates agent workspace at ~/.openclaw/workspace/agents/debugger/
  2. Copies 8 diagnostic skill scripts
  3. Installs dependencies (Tesseract OCR, lynx, html2text)
  4. Configures Debug Master agent in ~/.openclaw/openclaw.json
  5. Sets up intelligent routing (optional)
  6. Restarts OpenClaw Gateway

Post-Installation

Test the agent:

# Switch to Debug Master
openclaw chat --agent debugger

# Or check agent list
openclaw agents list --bindings

πŸ“– Documentation

Basic Usage

Method 1: Dedicated Diagnostic Channel (Recommended)

Configure a Feishu/Slack/Discord group to auto-route to Debug Master:

# Get group ID from logs
journalctl --user -u openclaw-gateway | grep "group:"

# Add routing rule
openclaw config set agents.routing[0] '{"agent":"debugger","channel":"feishu","peer":"group:YOUR_GROUP_ID"}' --json

# Restart gateway
systemctl --user restart openclaw-gateway

Now all messages in that group are handled by Debug Master automatically!

Method 2: Manual Switching

In your chat client:

/agent debugger
# Now in Debug Master mode

"Check system health"
# Debug Master responds with diagnostics

/agent main
# Switch back to main agent

Method 3: CLI

openclaw chat --agent debugger --message "Check if port 8080 is in use"

Skill Reference

All skills are in ~/.openclaw/workspace/agents/debugger/skills/:

# Check service status
bash skills/service-check.sh openclaw-gateway --user

# System health
bash skills/health-check.sh

# Port check
bash skills/port-check.sh 8080

# Analyze error screenshot
bash skills/analyze-image.sh /path/to/screenshot.png

# Search for solutions
bash skills/search-web.sh "openclaw gateway error"

# Crawl documentation
bash skills/crawl-page.sh "https://docs.openclaw.ai/troubleshooting"

# Remote diagnostics
bash skills/remote-diagnose.sh 192.168.1.100 admin 22

Advanced Configuration

Enable AI Image Understanding (Optional)

Install Ollama + LLaVA for deeper image analysis:

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Download LLaVA model (4.7GB)
ollama pull llava:7b

# Now analyze-image.sh will use AI
bash skills/analyze-image.sh screenshot.png

Install Skills CLI (Optional)

Enable auto-discovery of community skills:

npm install -g @vercel/skills

# Search skills
npx skills find "docker debugging"

# Install skill
npx skills add vercel-labs/agent-skills --skill docker-debug

Change Model

Edit ~/.openclaw/workspace/agents/debugger/agent.json:

{
  "id": "debugger",
  "model": {
    "primary": "aliyun/qwen3-coder-plus",
    "fallbacks": [
      "minimax/MiniMax-M2.5-highspeed",
      "tencent/hunyuan-2.0-thinking"
    ]
  }
}

Restart gateway: systemctl --user restart openclaw-gateway


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               OpenClaw Debug Master Agent                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚  System Prompt   β”‚       β”‚  8 Core Skills   β”‚        β”‚
β”‚  β”‚  (521 lines)     β”‚       β”‚  (Shell scripts) β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚           β”‚                           β”‚                  β”‚
β”‚           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                  β”‚
β”‚           β”‚                           β”‚                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚  Qwen3-Coder-    β”‚       β”‚  Open Source     β”‚        β”‚
β”‚  β”‚  Plus (LLM)      │◄───────  Tools           β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚  - Tesseract     β”‚        β”‚
β”‚                              β”‚  - DuckDuckGo    β”‚        β”‚
β”‚                              β”‚  - wget/lynx     β”‚        β”‚
β”‚                              β”‚  - ssh           β”‚        β”‚
β”‚                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚                                                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚  Three-Layer Self-Learning                  β”‚         β”‚
β”‚  β”‚  1. Search knowledge (DuckDuckGo)           β”‚         β”‚
β”‚  β”‚  2. Install skills (Vercel Skills)          β”‚         β”‚
β”‚  β”‚  3. Create scripts (LLM generation)         β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ§ͺ Testing

Run the test suite:

cd ~/.openclaw/workspace/agents/debugger
bash test-debugger.sh

Expected output:

βœ… System health check: PASSED
βœ… Service status check: PASSED
βœ… Port check: PASSED
βœ… Web search: PASSED

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-skill)
  3. Commit your changes (git commit -m 'Add amazing diagnostic skill')
  4. Push to the branch (git push origin feature/amazing-skill)
  5. Open a Pull Request

Adding New Skills

Create a new skill script in skills/:

cat > skills/my-diagnostic.sh << 'SCRIPT'
#!/bin/bash
# Description of what this skill does

# Your diagnostic logic here
echo "Diagnostic result..."
SCRIPT

chmod +x skills/my-diagnostic.sh

Update AGENTS.md to document the new skill.


πŸ“„ License

MIT License - see LICENSE file for details.


πŸ™ Acknowledgments


πŸ“ž Support


🌟 Star History

If you find this project useful, please consider giving it a ⭐!


Made with ❀️ by the OpenClaw Community

⬆ Back to Top

Model Configuration

Debug Master supports multiple models. Here's how to configure them:

Configuration Methods

Method 1: Via agent.json

Edit agent/agent.json:

{
  "id": "debugger",
  "name": "Debug Master", 
  "model": {
    "primary": "qwen3-coder-plus",
    "fallbacks": [
      "minimax/MiniMax-M2.5-highspeed",
      "tencent/hunyuan-2.0-thinking"
    ]
  }
}

Method 2: Via OpenClaw CLI

# List available models
openclaw models list

# Set model for Debug Master
openclaw agents set-model debugger --model qwen3-coder-plus

Recommended Models

Model Use Case
qwen3-coder-plus βœ… Recommended - Best for coding/diagnostics
minimax/MiniMax-M2.5-highspeed Fast, cheap
anthropic/claude-sonnet-4-20250514 Most capable

Environment Variables

export OPENAI_API_KEY="your-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"

Verify Configuration

cd ~/.openclaw/workspace/agents/debugger
bash test-debugger.sh

About

A professional system diagnosis agent for OpenClaw

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages