System Maintenance
by @jazzqi
Complete maintenance system for OpenClaw with unified architecture, filesystem governance, and cross-platform design
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:
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 openclawTest monitoring
bash scripts/real-time-monitor.sh --testQuick 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
#### β±οΈ Smart Monitoring & Recovery
#### π Professional Reporting
#### π‘οΈ Safety & Reliability
#### π Maintenance Automation
π 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 --testForce execution
bash scripts/real-time-monitor.sh --forceView status
bash scripts/real-time-monitor.sh --status
#### Log Management
# Dry run (preview changes)
bash scripts/log-management.sh --dry-runManual rotation
bash scripts/log-management.sh --rotateCleanup only
bash scripts/log-management.sh --cleanup
#### Daily Maintenance
# Quick health check only
bash scripts/daily-maintenance.sh --quick-checkFull maintenance cycle
bash scripts/daily-maintenance.sh --fullSkip backup (emergency mode)
bash scripts/daily-maintenance.sh --no-backup
#### Weekly Optimization
# Generate report only (no optimization)
bash scripts/weekly-optimization.sh --report-onlyAnalysis only (no changes)
bash scripts/weekly-optimization.sh --analyze-onlyFull 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
scripts/config.jsonreal-time-monitor.shlog-management.shIntegration Points
Security Features
π οΈ 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-latestManual 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*