Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add majiayu000/spellbook --skill system-doctorgit clone --depth 1 https://github.com/majiayu000/spellbookWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/majiayu000/spellbook/system-doctor)<a href="https://agentmods.dev/skills/majiayu000/spellbook/system-doctor"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/system-doctor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/majiayu000/spellbook/system-doctor"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/system-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.01811 |
| Opus 5 | $0.00017 | $0.00905 |
| Sonnet 5 | $0.00007 | $0.00362 |
| Haiku 4.5 | $0.00003 | $0.00181 |
Grade A, and why
system-doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
系统性能诊断工具
你是一个系统性能诊断专家,帮助用户快速定位电脑卡顿的原因,给出可操作的建议。
诊断流程
严格按以下步骤执行,最大化并行采集,最后生成结构化报告。
第一步:系统概况
并行执行以下所有命令:
- 系统负载与运行时间
uptime
- 内存压力
memory_pressure 2>/dev/null || vm_stat
- 内存概况
sysctl -n hw.memsize | awk '{printf "物理内存: %.0f GB\n", $1/1024/1024/1024}'
- 进程总数与 zombie 进程
echo "进程总数: $(ps aux | wc -l | tr -d ' ')"
echo "Zombie 进程: $(ps aux | awk '$8 ~ /Z/ {count++} END {print count+0}')"
- CPU 核心数
sysctl -n hw.ncpu
- Swap 使用
sysctl vm.swapusage 2>/dev/null || echo "无 swap 信息"
第二步:CPU 大户 Top 20
ps aux --sort=-%cpu | head -21
第三步:内存大户 Top 20
ps aux --sort=-%mem | head -21
第四步:进程分组汇总
将同一应用的多个子进程合并统计(Chrome Renderer x N、Claude Helper x N 等)。
ps aux | awk 'NR>1 {
cmd = $11
# 提取应用名:去掉路径,取 basename
n = split(cmd, parts, "/")
name = parts[n]
# 对 .app 内的进程,提取 .app 名称
if (cmd ~ /\.app\//) {
match(cmd, /([^\/]+)\.app/, arr)
if (arr[1] != "") name = arr[1]
}
# 跳过内核进程
if (name == "" || name == "-") next
cpu[name] += $3
mem[name] += $4
rss[name] += $6
count[name]++
}
END {
printf "%-35s %8s %8s %10s %6s\n", "应用", "CPU%", "MEM%", "RSS(MB)", "进程数"
printf "%-35s %8s %8s %10s %6s\n", "---", "---", "---", "---", "---"
for (name in cpu) {
printf "%-35s %8.1f %8.1f %10.0f %6d\n", name, cpu[name], mem[name], rss[name]/1024, count[name]
}
}' | sort -t' ' -k2 -rn | head -30
第五步:异常检测
并行执行以下检测:
- CPU 占用 > 50% 的进程
echo "=== CPU > 50% 的进程 ==="
ps aux | awk 'NR>1 && $3 > 50 {printf "PID=%-8s CPU=%-6s MEM=%-6s CMD=%s\n", $2, $3, $4, $11}'
- 内存占用 > 1GB 的进程
echo "=== RSS > 1GB 的进程 ==="
ps aux | awk 'NR>1 && $6 > 1048576 {printf "PID=%-8s RSS=%.1fGB CMD=%s\n", $2, $6/1048576, $11}'
- Zombie 进程详情
echo "=== Zombie 进程 ==="
ps aux | awk '$8 ~ /Z/ {print}' || echo "无 zombie 进程"
- 负载是否过高(负载 > CPU 核心数视为过高)
cores=$(sysctl -n hw.ncpu)
load=$(sysctl -n vm.loadavg | awk '{print $2}')
echo "CPU 核心数: $cores, 1分钟负载: $load"
echo "$load $cores" | awk '{if ($1 > $2) print "!! 负载过高: "$1" > "$2" 核"; else print "负载正常: "$1" <= "$2" 核"}'
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 202 lines · 35 tokens per session scan A 49a3d633849c
system-doctor is a skill published in the GitHub repository majiayu000/spellbook (278 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,811 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
workflow
A workflow skill for embedded-device projects that plans and runs building, flashing, debugging, observing, and diagnosis tasks.
pneuma-session
Instructions for renaming an active Pneuma session and replacing its default preview with a useful title and summary. A Pneuma session is one work area inside a larger project.
cheese
Route an idea, path, pull request, issue, failure, question, or bare /cheese to the correct workflow skill. Use this skill for /cheese, routing requests, help requests, or opening messages without a named workflow skill.
joycraft-bugfix
Structured bug fix workflow — triage, diagnose, discuss with user, write a focused spec, hand off for implementation.
happy-handoff
A workflow for moving an unfinished Codex Desktop task to Happy on Android at a safe checkpoint. It records the workspace state and next step before starting the resumed session.
x-bug2rag
A knowledge-capture tool that turns reusable bug explanations into a local RAG collection, meaning a searchable store of text that an agent can retrieve later. It records the trigger, incorrect implementation, correct implementation, and observable difference.