Refactor remaining skills with resources pattern and allowed-tools
- k8s-quick-status: Add scripts/quick-status.sh, allowed-tools - sysadmin-health: Add scripts/health-check.sh, allowed-tools - usage: Add scripts/usage_report.py, simplify SKILL.md - programmer-add-project: Add allowed-tools All skills now: - Have executable scripts for main operations - Use allowed-tools to restrict capabilities - Have improved descriptions with trigger phrases - Follow the "Skill with Bundled Resources" pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,51 +1,70 @@
|
||||
---
|
||||
name: sysadmin-health
|
||||
description: Run comprehensive health check on Arch Linux workstation
|
||||
model: haiku
|
||||
description: Comprehensive health check on Arch Linux workstation. Use when asked about system health, disk space, memory, updates, or services.
|
||||
allowed-tools:
|
||||
- Bash
|
||||
- Read
|
||||
---
|
||||
|
||||
# Sysadmin Health Check Skill
|
||||
|
||||
Performs a comprehensive health check on the local Arch Linux workstation.
|
||||
|
||||
## Quick Command
|
||||
|
||||
```bash
|
||||
~/.claude/skills/sysadmin-health/scripts/health-check.sh
|
||||
```
|
||||
|
||||
Or run individual checks:
|
||||
|
||||
```bash
|
||||
# Resources
|
||||
df -h / /home
|
||||
free -h
|
||||
uptime
|
||||
|
||||
# Packages
|
||||
checkupdates | wc -l
|
||||
yay -Qua | wc -l
|
||||
pacman -Qtdq | wc -l
|
||||
|
||||
# Services
|
||||
systemctl --failed
|
||||
systemctl --user --failed
|
||||
|
||||
# Logs
|
||||
journalctl -p err --since "24 hours ago" -n 10
|
||||
```
|
||||
|
||||
## Checks Performed
|
||||
|
||||
### System Resources
|
||||
- Disk usage (`df -h`)
|
||||
- Memory usage (`free -h`)
|
||||
- Swap usage
|
||||
- CPU load (`uptime`)
|
||||
- Top processes by resource usage
|
||||
|
||||
### Package Status
|
||||
- Pending pacman updates (`checkupdates`)
|
||||
- AUR updates available (`yay -Qua`)
|
||||
- Orphaned packages (`pacman -Qtdq`)
|
||||
- Package cache size (`du -sh /var/cache/pacman/pkg`)
|
||||
|
||||
### Service Status
|
||||
- Failed systemd services (`systemctl --failed`)
|
||||
- Key services status (NetworkManager, sshd, etc.)
|
||||
|
||||
### User Timers (Claude Automation)
|
||||
- Active user timers (`systemctl --user list-timers`)
|
||||
- Failed user services (`systemctl --user --failed`)
|
||||
- Recent timer runs (`journalctl --user -u k8s-agent-health-check --since "24 hours ago" -n 5`)
|
||||
|
||||
### Security
|
||||
- Recent failed login attempts (`journalctl -u sshd --since "24 hours ago" | grep -i failed`)
|
||||
- Last logins (`last -n 5`)
|
||||
|
||||
### Logs
|
||||
- Recent errors in journal (`journalctl -p err --since "24 hours ago" -n 20`)
|
||||
| Category | Checks |
|
||||
|----------|--------|
|
||||
| **Resources** | Disk, memory, swap, CPU load |
|
||||
| **Packages** | Pacman updates, AUR updates, orphans |
|
||||
| **Services** | Failed systemd services (system + user) |
|
||||
| **Security** | Recent logins, failed SSH attempts |
|
||||
| **Logs** | Recent errors in journal |
|
||||
|
||||
## Output Format
|
||||
|
||||
Report as structured summary with:
|
||||
- Overall health status (healthy/warning/critical)
|
||||
- Issues found (if any)
|
||||
- Recommended actions
|
||||
Report as structured summary:
|
||||
- **Overall health**: healthy/warning/critical
|
||||
- **Resource usage**: disk %, memory %
|
||||
- **Pending updates**: count
|
||||
- **Failed services**: list
|
||||
- **Issues found**: with recommendations
|
||||
|
||||
## Thresholds
|
||||
|
||||
| Metric | Warning | Critical |
|
||||
|--------|---------|----------|
|
||||
| Disk usage | >80% | >95% |
|
||||
| Memory usage | >80% | >95% |
|
||||
| Pending updates | >20 | >50 |
|
||||
| Failed services | any | any critical |
|
||||
|
||||
## Autonomy
|
||||
|
||||
This skill is read-only and can run without confirmation.
|
||||
Read-only - runs without confirmation.
|
||||
|
||||
Reference in New Issue
Block a user