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 agentmods add skills/majiayu000/spellbook/gpu-usenpx skills add majiayu000/spellbook --skill gpu-usegit 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/gpu-use)<a href="https://agentmods.dev/skills/majiayu000/spellbook/gpu-use"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/gpu-use.svg" alt="Measured on agentmods" height="20"></a>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.00049 | $0.01346 |
| Opus 5 | $0.00024 | $0.00673 |
| Sonnet 5 | $0.00010 | $0.00269 |
| Haiku 4.5 | $0.00005 | $0.00135 |
Grade A, and why
gpu-use 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 6d 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 — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GPU 使用情况诊断
你是一个 GPU 资源管理专家,帮助用户快速了解远程服务器上的 GPU 使用情况。
服务器列表
| 别名 | SSH 命令 |
|---|---|
| 默认 | ssh [email protected] -p 10022 |
用户可以传入自定义 SSH 地址,格式:user@host -p port。无参数时使用默认服务器。
诊断流程
第一步:采集数据
并行执行以下命令(通过 SSH):
- GPU 卡概况
ssh {SSH_TARGET} "nvidia-smi --query-gpu=index,name,memory.total,memory.used,memory.free,utilization.gpu --format=csv,noheader,nounits"
- GPU 上运行的进程
ssh {SSH_TARGET} "nvidia-smi --query-compute-apps=pid,gpu_uuid,used_memory,name --format=csv,noheader,nounits"
- GPU UUID 到 index 的映射
ssh {SSH_TARGET} "nvidia-smi --query-gpu=index,gpu_uuid --format=csv,noheader"
- Docker 容器列表
ssh {SSH_TARGET} "docker ps --format '{{.ID}} {{.Names}}' 2>/dev/null"
- 进程 PID 到容器的映射(用采集到的 PID 列表)
ssh {SSH_TARGET} "for cid in \$(docker ps -q); do name=\$(docker inspect --format '{{.Name}}' \$cid | sed 's/^\///'); pids=\$(docker top \$cid -o pid 2>/dev/null | tail -n +2); for p in \$pids; do echo \"\$p \$name\"; done; done 2>/dev/null"
- 容器内多实例 http_server 检测(识别单容器多终端部署)
ssh {SSH_TARGET} "for cid in \$(docker ps -q); do name=\$(docker inspect --format '{{.Name}}' \$cid | sed 's/^\///'); servers=\$(docker exec \$cid ps aux 2>/dev/null | grep 'http_server -p' | grep -v grep | awk '{for(i=1;i<=NF;i++) if(\$i==\"-p\") print \$(i+1)}'); if [ -n \"\$servers\" ]; then echo \"\$name: \$servers\"; fi; done 2>/dev/null"
第二步:生成报告
将 GPU UUID 映射回 index,将 PID 映射回容器名,按以下格式输出:
## GPU 使用概况
| GPU | 型号 | 显存占用 | 空闲 | GPU 利用率 | 状态 |
|-----|------|----------|------|------------|------|
| 0 | H200 | 107 / 141 GB | 34 GB | 85% | 🔴 繁忙 |
| 1 | H200 | 12 / 141 GB | 129 GB | 10% | 🟢 空闲 |
| 2 | H200 | 0 / 141 GB | 141 GB | 0% | ⚪ 无任务 |
## 进程详情
| GPU | 显存占用 | 容器 | 进程 |
|-----|----------|------|------|
| 0 | 107 GB | vllm_qwen35 | VLLM::EngineCore |
| 0 | 2 GB | truetranslate-api-bin | truetranslate_api.bin |
| 1 | 12 GB | atlas_video | python |
## 多实例服务(单容器多终端部署)
如果检测到容器内运行多个 http_server 实例,单独列出:
| 容器 | 端口 | GPU | 状态 |
|------|------|-----|------|
| atlas_video | :5001 | GPU 2 | 运行中 |
| atlas_video | :5002 | GPU 3 | 运行中 |
## 空闲资源
可用于新服务部署的 GPU:
- GPU 4: 141 GB 完全空闲
- GPU 5: 141 GB 完全空闲
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.
- 6d ago First seen · 120 lines · 49 tokens per session scan A f02b6d40b8ab
gpu-use is a skill published in the GitHub repository majiayu000/spellbook (265 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,346 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-08-30.
Other skills, from other repositories
cao-session-management
Interact with CAO (CLI Agent Orchestrator) — launch multi-agent sessions, check status, send follow-up instructions, unblock stuck terminals, or shut down sessions. Use when working with CAO sessions in any capacity.
workflow
Skill "workflow" from zhinkgit/embeddedskills, covering workflow 编排层, 命令, 配置说明, 配置结构 and 参数解析顺序.
pneuma-session
Rewrite the active Pneuma session's UI title + one-line summary so the launcher and ProjectPanel rows reflect what the session is actually about. Use this skill whenever the user asks to "整理 / 概括 / refresh / re-title / summarize this session", whenever the conversation has produced substantive work and the default…
fast-resume
Search local coding-agent session history and identify safe resume commands. Use when the user asks to find, inspect, continue, or recover previous work from Claude Code, Codex, Pi, or another agent indexed by fast-resume.
lov-finder-action
Generate Mac Finder right-click menu actions. Two modes: (A) Automator Quick Action for file/folder context menus, (B) Finder Sync Extension (Swift + xcodegen) for blank-space context menus. Automatically selects mode based on user intent. Trigger when user mentions "Finder右键", "右键菜单", "Quick Action", "Finder…
lov-personal-vocabulary
维护一份可跨语音输入法复用的个人词汇表:统一管理、去重、并同步到 Typeless、OpenLess 等 App。Trigger: 帮我维护词汇表、同步词汇、把词汇表填到 OpenLess、manage my personal vocabulary, sync dictation terms across apps.