--- name: maintain description: Configuration maintenance operations (backup, validate, etc.) aliases: [maintenance, admin] --- # /maintain Command Configuration maintenance operations. ## Subcommands | Subcommand | Description | |------------|-------------| | `validate` | Validate configuration setup | | `backup` | Create configuration backup | | `restore` | Restore from backup | | `registry` | Regenerate component registry | | `clean` | Clean up temporary files | ## Usage ``` /maintain validate # Run validation checks /maintain backup # Create timestamped backup /maintain restore # List and restore from backups /maintain registry # Regenerate component-registry.json /maintain clean # Remove temp files, old logs ``` ## Implementation ### validate ```bash ~/.claude/automation/validate-setup.sh ``` ### backup ```bash ~/.claude/automation/backup.sh ``` ### restore ```bash # List backups ~/.claude/automation/restore.sh # Restore specific backup ~/.claude/automation/restore.sh ~/.claude/backups/claude-config-TIMESTAMP.tar.gz ``` ### registry ```bash python3 ~/.claude/automation/generate-registry.py ``` ### clean Remove: - `~/.claude/logs/workflows/*.log` older than 30 days - `~/.claude/backups/*.tar.gz` beyond last 10 - `~/.claude/todos/*.json` (managed by Claude Code) ## Output Format ``` 🔧 Maintenance: validate Running validation... [validation output] ✓ Validation complete ``` ## When to Use - After making configuration changes - Before/after major updates - Periodically for housekeeping - When troubleshooting issues