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>
103 lines
2.4 KiB
Markdown
103 lines
2.4 KiB
Markdown
# Claude Automation
|
|
|
|
Scheduled automation for Claude agent workflows using systemd user timers.
|
|
|
|
## Active Timers
|
|
|
|
| Timer | Schedule | Purpose |
|
|
|-------|----------|---------|
|
|
| `k8s-agent-health-check.timer` | Every 6 hours | Comprehensive cluster health check |
|
|
| `k8s-agent-daily-summary.timer` | Daily at 8am | Lightweight cluster status digest |
|
|
| `claude-log-rotation.timer` | Weekly (Sunday midnight) | Clean up old log files |
|
|
| `restic-backup.timer` | Hourly | Backup automation |
|
|
| `omarchy-battery-monitor.timer` | Every 30 seconds | Battery status monitoring |
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
# List all timers with next run time
|
|
systemctl --user list-timers
|
|
|
|
# Check timer status
|
|
systemctl --user status k8s-agent-health-check.timer
|
|
|
|
# Manually trigger a workflow
|
|
systemctl --user start k8s-agent-health-check
|
|
|
|
# View logs
|
|
journalctl --user -u k8s-agent-health-check
|
|
|
|
# View recent logs with follow
|
|
journalctl --user -u k8s-agent-health-check -f
|
|
|
|
# Check for failed services
|
|
systemctl --user --failed
|
|
```
|
|
|
|
## Timer Locations
|
|
|
|
All timers and services are in: `~/.config/systemd/user/`
|
|
|
|
## Workflows
|
|
|
|
Workflows are in: `~/.claude/workflows/`
|
|
|
|
- `health/cluster-health-check.yaml` - Full health check (6-hourly)
|
|
- `health/cluster-daily-summary.yaml` - Quick status digest (daily)
|
|
|
|
## Scheduler
|
|
|
|
The `scheduler.sh` script wraps Claude CLI invocations:
|
|
|
|
```bash
|
|
./scheduler.sh <workflow-name>
|
|
./scheduler.sh cluster-health-check
|
|
./scheduler.sh cluster-daily-summary
|
|
```
|
|
|
|
## Logs
|
|
|
|
- Workflow logs: `~/.claude/logs/workflows/`
|
|
- Journal logs: `journalctl --user -u <service-name>`
|
|
|
|
## Utility Scripts
|
|
|
|
| Script | Purpose |
|
|
|--------|---------|
|
|
| `validate-setup.sh` | Validate configuration |
|
|
| `quick-status.sh` | Dashboard status overview |
|
|
| `backup.sh` | Create configuration backup |
|
|
| `restore.sh` | Restore from backup |
|
|
| `generate-registry.py` | Regenerate component registry |
|
|
| `validate-registry.py` | Validate component registry |
|
|
|
|
### Usage
|
|
|
|
```bash
|
|
# Validate setup
|
|
./validate-setup.sh
|
|
|
|
# Quick status
|
|
./quick-status.sh
|
|
|
|
# Backup
|
|
./backup.sh
|
|
|
|
# Restore (lists backups, or restores specific file)
|
|
./restore.sh
|
|
./restore.sh ~/.claude/backups/claude-config-TIMESTAMP.tar.gz
|
|
```
|
|
|
|
## Maintenance
|
|
|
|
```bash
|
|
# Reload after editing timer/service files
|
|
systemctl --user daemon-reload
|
|
|
|
# Enable a new timer
|
|
systemctl --user enable --now <timer-name>.timer
|
|
|
|
# Disable a timer
|
|
systemctl --user disable --now <timer-name>.timer
|
|
```
|