Initial commit with translated description

This commit is contained in:
2026-03-29 13:15:01 +08:00
commit 8915eef073
4 changed files with 58 additions and 0 deletions

20
SKILL.md Normal file
View File

@@ -0,0 +1,20 @@
---
name: system_resource_monitor
description: "用于CPU负载、RAM、交换和磁盘使用的干净可靠的系统资源监视器。"
version: 1.0.0
author: Yennefer & Geralt
---
# System Resource Monitor
A specialized skill designed to provide concise, real-time server health reports. Unlike bloated alternatives, it uses native system calls for maximum reliability and speed.
## Features
- **CPU Load**: Displays 1, 5, and 15-minute averages.
- **Memory**: Tracks both physical RAM and Swap usage.
- **Disk**: Monitors root partition capacity and percentage.
- **Uptime**: Shows how long your "horse" has been running.
## Usage
Simply ask the agent for "system status", "resource usage", or "server health".
The skill executes the local `./scripts/monitor.sh` script.

6
_meta.json Normal file
View File

@@ -0,0 +1,6 @@
{
"ownerId": "kn7djtky87zsphjfss7j8b6cb18103c4",
"slug": "system-resource-monitor",
"version": "1.0.0",
"publishedAt": 1770880998112
}

7
package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"name": "system-resource-monitor",
"version": "1.0.0",
"description": "A clean, reliable system resource monitor for CPU load, RAM, Swap, and Disk usage.",
"main": "SKILL.md",
"author": "Yennefer & Geralt"
}

25
scripts/monitor.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# System Resource Monitor Script v1.0.0
# Colors for better readability if supported
printf "\n\033[1;34m--- System Resource Report ---\033[0m\n"
# Uptime
UPTIME=$(uptime -p)
printf "\033[1;32mUptime:\033[0m %s\n" "$UPTIME"
# Load Average
LOAD=$(uptime | awk -F'load average:' '{ print $2 }' | sed 's/^ //')
printf "\033[1;32mSystem Load:\033[0m %s\n" "$LOAD"
# RAM & Swap
MEM=$(free -h | awk '/^Mem:/ {print $3 " / " $2}')
SWAP=$(free -h | awk '/^Swap:/ {print $3 " / " $2}')
printf "\033[1;32mMemory Usage:\033[0m %s\n" "$MEM"
printf "\033[1;32mSwap Usage:\033[0m %s\n" "$SWAP"
# Disk Usage
DISK=$(df -h / | awk 'NR==2 {print $3 " / " $2 " (" $5 ")"}')
printf "\033[1;32mDisk Usage:\033[0m %s\n" "$DISK"
printf "\033[1;34m------------------------------\033[0m\n\n"