🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

System Maintenance

by @jazzqi

Complete maintenance system for OpenClaw with unified architecture, filesystem governance, and cross-platform design

Versionv1.3.2
Downloads1,719
Installs10
Stars⭐ 1
TERMINAL
clawhub install system-maintenance

πŸ“– About This Skill


name: system-maintenance description: Complete maintenance system for OpenClaw with unified architecture, filesystem governance, and cross-platform design version: 1.3.2 metadata: openclaw: homepage: https://github.com/jazzqi/openclaw-system-maintenance

πŸ“– Layer 1: Immediate Value (30-Second Overview)

What You Get

The System Maintenance Skill provides a complete, unified maintenance solution for OpenClaw systems. It includes real-time monitoring, automated cleanup, log management, and health reporting - all in a modular, easy-to-maintain architecture.

Key Benefits:

  • βœ… Automated monitoring every 5 minutes
  • βœ… Auto-recovery of failed services
  • βœ… 50% reduction in cron tasks
  • βœ… Full backup and one-click rollback
  • βœ… Weekly optimization reports
  • Core Value: Replaces fragmented maintenance scripts with a professional, unified system maintenance solution.

    πŸš€ Layer 2: Quick Start (5-Minute Setup)

    Installation

    #### Method 1: ClawHub Install (Recommended)

    bunx clawhub@latest install system-maintenance
    

    #### Method 2: GitHub Clone

    git clone https://github.com/jazzqi/openclaw-system-maintenance.git \
      ~/.openclaw/skills/system-maintenance
    cd ~/.openclaw/skills/system-maintenance
    chmod +x scripts/*.sh
    

    #### One-Click Setup

    bash scripts/install-maintenance-system.sh
    

    #### Verification

    # Check cron tasks
    crontab -l | grep -i openclaw

    Test monitoring

    bash scripts/real-time-monitor.sh --test

    Quick health check

    bash scripts/daily-maintenance.sh --quick-check

    πŸ—οΈ Layer 3: Architecture & Components

    Maintenance Schedule

    | Frequency | Task | Description | Script | |-----------|------|-------------|--------| | Every 5 min | Real-time Monitoring | Gateway monitoring & auto-recovery | real-time-monitor.sh | | Daily 2:00 AM | Log Management | Log cleanup, rotation, compression | log-management.sh | | Daily 3:30 AM | Daily Maintenance | Comprehensive cleanup & health checks | daily-maintenance.sh | | Sunday 3:00 AM | Weekly Optimization | Deep system analysis & reporting | weekly-optimization.sh |

    Core Functions

    #### πŸ—οΈ Unified Architecture

  • Modulardesign with 5 core scripts
  • Configuration-driven management
  • Safe migration from old systems
  • Professional directory layout
  • #### ⏱️ Smart Monitoring & Recovery

  • Real-time gateway monitoring
  • Automatic service recovery
  • Health scoring system (0-100)
  • Resource tracking (CPU, memory, disk)
  • macOS compatibility
  • #### πŸ“Š Professional Reporting

  • Weekly optimization reports (Markdown)
  • Execution summaries
  • Optimization suggestions
  • Performance metrics tracking
  • #### πŸ›‘οΈ Safety & Reliability

  • Complete backup system
  • One-click rollback
  • Error recovery with graceful handling
  • Security checks for sensitive info
  • Proper permission management
  • #### πŸ”„ Maintenance Automation

  • Log rotation & cleanup
  • Temporary file cleanup
  • Daily health checks
  • Automatic .learnings/ updates
  • πŸ“š Layer 4: Resources & Reference

    File Structure

    system-maintenance/
    β”œβ”€β”€ πŸ“„ entry.js                 # Skill entry point
    β”œβ”€β”€ πŸ“„ package.json             # NPM configuration
    β”œβ”€β”€ πŸ“„ SKILL.md                 # This file
    β”œβ”€β”€ πŸ› οΈ  scripts/                # Core scripts
    β”‚   β”œβ”€β”€ weekly-optimization.sh      # Weekly deep optimization
    β”‚   β”œβ”€β”€ real-time-monitor.sh        # Real-time monitoring (5 min)
    β”‚   β”œβ”€β”€ log-management.sh           # Log cleanup & rotation
    β”‚   β”œβ”€β”€ daily-maintenance.sh        # Daily maintenance (3:30 AM)
    β”‚   β”œβ”€β”€ install-maintenance-system.sh # Installation tool
    β”‚   └── check-before-commit.sh      # Pre-commit quality check
    β”œβ”€β”€ πŸ“š  examples/               # Examples & templates
    β”‚   β”œβ”€β”€ setup-guide.md              # Quick setup guide
    β”‚   β”œβ”€β”€ migration-guide.md          # Safe migration guide
    β”‚   β”œβ”€β”€ final-status-template.md    # Status report template
    β”‚   └── optimization-suggestions.md # Optimization suggestions
    β”œβ”€β”€ πŸ“  docs/                   # Additional documentation
    β”‚   β”œβ”€β”€ FILE_SYSTEM_GOVERNANCE.md   # FS Governance Standard
    β”‚   └── cross-platform-architecture.md
    └── πŸ“ assets/                  # Static resources
        └── README.md
    

    Command Reference

    #### Real-time Monitor

    # Test mode (no actual operations)
    bash scripts/real-time-monitor.sh --test

    Force execution

    bash scripts/real-time-monitor.sh --force

    View status

    bash scripts/real-time-monitor.sh --status

    #### Log Management

    # Dry run (preview changes)
    bash scripts/log-management.sh --dry-run

    Manual rotation

    bash scripts/log-management.sh --rotate

    Cleanup only

    bash scripts/log-management.sh --cleanup

    #### Daily Maintenance

    # Quick health check only
    bash scripts/daily-maintenance.sh --quick-check

    Full maintenance cycle

    bash scripts/daily-maintenance.sh --full

    Skip backup (emergency mode)

    bash scripts/daily-maintenance.sh --no-backup

    #### Weekly Optimization

    # Generate report only (no optimization)
    bash scripts/weekly-optimization.sh --report-only

    Analysis only (no changes)

    bash scripts/weekly-optimization.sh --analyze-only

    Full optimization cycle

    bash scripts/weekly-optimization.sh --optimize

    Version History

    | Version | Date | Changes | |---------|------|---------| | 1.3.2 | 2026-03-16 | Reorganized SKILL.md with progressive disclosure; cleaned up backup files | | 1.3.1 | 2026-03-16 | Added FS Governance; improved error handling | | 1.3.0 | 2026-03-12 | Archival version, initial ClawHub release |

    πŸ”§ Layer 5: Advanced Configuration

    Customization Options

  • Configuration file: scripts/config.json
  • Monitoring intervals: Adjust in real-time-monitor.sh
  • Log policies: Modify in log-management.sh
  • Health thresholds: Configure in health check scripts
  • Integration Points

  • System Status API: Emergency endpoints
  • Logging Forwarding: External log aggregation
  • Metrics Export: Prometheus/Grafana compatible
  • Webhook Notifications: Slack, Discord, email
  • Security Features

  • Encrypted Backups: Optional GPG encryption
  • Access Controls: File permission management
  • Audit Logging: All maintenance actions logged
  • Secrets Management: Integration with vault systems
  • πŸ› οΈ Usage Examples

    Quick Health Check

    # Run all health checks in sequence
    bash scripts/daily-maintenance.sh --quick-check
    bash scripts/log-management.sh --status
    bash scripts/real-time-monitor.sh --status
    

    Emergency Recovery

    # Force restore from latest backup
    bash scripts/install-maintenance-system.sh --restore-latest

    Manual service restart

    pkill -f openclaw-gateway && openclaw gateway start

    Performance Tuning

    # Adjust monitoring frequency (edit config)
    

    Default: 5 minutes, can be set to 1-60 minutes

    Example: Set to 2 minutes for critical systems

    🀝 Contributing

    Please read CONTRIBUTING.md before submitting pull requests.

    πŸ“œ License

    MIT License - see LICENSE file for details.


    *Built with ❀️ for the OpenClaw community*