Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/advent259141/astrbot_self_manager_skill --skill system-monitor명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | system-monitor |
| description | 查看 AstrBot 系统运行状态和性能统计 |
| version | 2.0.0 |
| author | AstrBot Community |
| requires_admin | true |
| requires_computer_use | true |
查看 AstrBot 系统状态。
async def get_system_status(context):
try:
import psutil
import time
from datetime import datetime, timedelta
# 系统信息
cpu_percent = psutil.cpu_percent(interval=1)
memory = psutil.virtual_memory()
disk = psutil.disk_usage('/')
# AstrBot 信息
uptime = time.time() - context.start_time
uptime_str = str(timedelta(seconds=int(uptime)))
# 统计
plugins_count = len(context.get_registered_stars())
skills_count = len(context.skill_mgr.list_skills(active_only=True))
providers_count = len(context.get_llm_providers())
lines = [
"📊 系统状态:\n",
"## 资源使用",
f"- CPU: {cpu_percent}%",
f"- 内存: {memory.percent}% ({memory.used / 1024**3:.1f}GB / {memory.total / 1024**3:.1f}GB)",
f"- 磁盘: {disk.percent}% ({disk.used / 1024**3:.1f}GB / {disk.total / 1024**3:.1f}GB)",
"",
"## AstrBot 状态",
f"- 运行时长: {uptime_str}",
f"- 插件数量: {plugins_count}",
f"- Skills 数量: {skills_count}",
f"- 模型提供商: {providers_count}",
"",
"## 版本信息",
f"- AstrBot 版本: {context.get_astrbot_version()}",
f"- Python 版本: {context.get_python_version()}",
]
return "\n".join(lines)
except Exception as e:
return f"❌ 获取系统状态失败:{e}"
event = globals().get('event')
if not event.is_admin():
print("❌ 错误:仅管理员可用")
import sys; sys.exit(1)
context = globals().get('context')
result = await get_system_status(context)
print(result)