Add session, maintenance, and backup commands
New commands: - /summarize: Save session decisions/preferences to memory - /maintain: Configuration maintenance (validate, backup, restore, etc.) New automation scripts: - backup.sh: Create timestamped config backup (excludes secrets) - restore.sh: Restore config from backup (with validation) Updates: - component-registry.json: Added new commands - commands/README.md: Updated with new entries - automation/README.md: Documented utility scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
84
commands/maintain.md
Normal file
84
commands/maintain.md
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
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
|
||||
Reference in New Issue
Block a user