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:
28
skills/k8s-quick-status/scripts/quick-status.sh
Executable file
28
skills/k8s-quick-status/scripts/quick-status.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Quick Kubernetes cluster status check
|
||||
# Returns structured output for easy parsing
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Node Status ==="
|
||||
kubectl get nodes -o wide 2>/dev/null || echo "Error: Cannot reach cluster"
|
||||
|
||||
echo ""
|
||||
echo "=== Unhealthy Pods ==="
|
||||
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded 2>/dev/null | grep -v "^NAMESPACE" || echo "All pods healthy"
|
||||
|
||||
echo ""
|
||||
echo "=== High Restart Pods ==="
|
||||
kubectl get pods -A -o jsonpath='{range .items[?(@.status.containerStatuses[0].restartCount>5)]}{.metadata.namespace}/{.metadata.name}: {.status.containerStatuses[0].restartCount} restarts{"\n"}{end}' 2>/dev/null || echo "No high restart pods"
|
||||
|
||||
echo ""
|
||||
echo "=== Recent Warning Events ==="
|
||||
kubectl get events -A --field-selector=type=Warning --sort-by='.lastTimestamp' 2>/dev/null | tail -10 || echo "No warning events"
|
||||
|
||||
echo ""
|
||||
echo "=== ArgoCD Apps ==="
|
||||
if command -v argocd &>/dev/null; then
|
||||
argocd app list --output wide 2>/dev/null || echo "ArgoCD not accessible"
|
||||
else
|
||||
echo "ArgoCD CLI not installed"
|
||||
fi
|
||||
Reference in New Issue
Block a user