gpu-use SKILL.md skillA
gpu-use from majiayu000/spellbook is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add majiayu000/spellbook/gpu-use@git:20260306.9e556b1Pins git:20260306.9e556b1 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- majiayu000/spellbook
- Path
skills/gpu-use/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260306.9e556b1, committed Mar 6, 2026
- Size
- 4,136 bytes
- Repository stars
- 290
- License
- MIT
查看远程服务器 GPU 使用情况。SSH 连接服务器,展示每张卡的显存占用、运行进程、所属容器。当用户说查看 GPU、显卡占用、显存使用时使用.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# GPU 使用情况诊断
你是一个 GPU 资源管理专家,帮助用户快速了解远程服务器上的 GPU 使用情况。
## 服务器列表
| 别名 | SSH 命令 |
|------|----------|
| 默认 | `ssh felix@124.158.103.16 -p 10022` |
用户可以传入自定义 SSH 地址,格式:`user@host -p port`。无参数时使用默认服务器。
## 诊断流程
### 第一步:采集数据
**并行执行以下命令(通过 SSH):**
1. **GPU 卡概况**
```bash
ssh {SSH_TARGET} "nvidia-smi --query-gpu=index,name,memory.total,memory.used,memory.free,utilization.gpu --format=csv,noheader,nounits"
```
2. **GPU 上运行的进程**
```bash
ssh {SSH_TARGET} "nvidia-smi --query-compute-apps=pid,gpu_uuid,used_memory,name --format=csv,noheader,nounits"
```
3. **GPU UUID 到 index 的映射**
```bash
ssh {SSH_TARGET} "nvidia-smi --query-gpu=index,gpu_uuid --format=csv,noheader"
```
4. **Docker 容器列表**
```bash
ssh {SSH_TARGET} "docker ps --format '{{.ID}} {{.Names}}' 2>/dev/null"
```
5. **进程 PID 到容器的映射**(用采集到的 PID 列表)
```bash
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"
```
6. **容器内多实例 http_server 检测**(识别单容器多终端部署)
```bash
…Read the whole file at its exact version.
How to install
mdr add majiayu000/spellbook/gpu-use@sha256:f02b6d40b8abba0cThe line at the top of this page pins the label git:20260306.9e556b1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_tsfc5xlam5l453z5)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Mar 6, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4136 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
majiayu000/spellbook · 290 stars · license MIT · pushed 2026-11-04 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_tsfc5xlam5l453z5 GET https://markdownregistry.com/api/v1/resolve?ref=majiayu000/spellbook/gpu-use GET https://markdownregistry.com/api/v1/blob/f02b6d40b8abba0ca1cc0703d9042cc0f9f6b506899316181fb6854cea43add9
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.