Skip to content
Back to skills

Gpu Mode

ASecurity

Coordinate which vLLM owns the single DGX GPU before using a local vLLM endpoint. Checks the active mode (code/research/idle/BROKEN-BOTH) read-only, and switches only on explicit request. Use before pointing any tool at a local vLLM (http://<dgx>:9000/v1 or :8003/v1), when a vLLM call fails to connect, or when asked to bring the coder-next or autoresearch vLLM up or down. Switching is shared-state — never switch without explicit approval.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 16, 2026
ai-agentsgoshellbash

Security analysis

A100/100

Scanned October 16, 2026

npx -y skills add chipi/agentic-ai-homelab --skill gpu-mode --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gpu Mode?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gpu Mode
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chipi-gpu-mode/badge)](https://www.skillsdirectory.com/skills/chipi-gpu-mode)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gpu-mode
description: Coordinate which vLLM owns the single DGX GPU before using a local vLLM endpoint. Checks the active mode (code/research/idle/BROKEN-BOTH) read-only, and switches only on explicit request. Use before pointing any tool at a local vLLM (http://<dgx>:9000/v1 or :8003/v1), when a vLLM call fails to connect, or when asked to bring the coder-next or autoresearch vLLM up or down. Switching is shared-state — never switch without explicit approval.
---

# gpu-mode

The DGX has one GB10 GPU; the `coder-next` and `autoresearch` vLLMs can't both
hold it (both want ~90% of VRAM). `gpu-mode-swap.sh` is the authoritative
coordinator. This skill wraps it: **check freely, switch only on explicit go.**

## Connect

The script lives on the DGX host, symlinked at `~/bin/gpu-mode-swap.sh`. Reach it
over the tailnet with ssh (non-interactive → always the absolute path; the
`gpu-mode` zsh alias is not loaded in agent shells):

```bash
ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh <args>'
```

## Check the mode — read-only, always safe

Before ANY local vLLM call, confirm the right stack owns the GPU:

```bash
ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh --mode-only'    # → code | research | idle | BROKEN-BOTH
ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh status --json'  # full machine-readable state
```

- **code** — coder-next up on `:9000`
- **research** — autoresearch up on `:8003`
- **idle** — both down; GPU free for ML training / Ollama
- **BROKEN-BOTH** — both listening (bad state); needs a human, do not pile on

If the mode already matches what you need, proceed. If not, see below — but do
not switch on your own.

## Switch the mode — SHARED-STATE, explicit approval required every time

Switching brings one vLLM up and the other down; it interrupts whatever is using
the GPU right now (a sweep, a training job, Ollama). Treat the DGX as production:

- Never switch as a side effect of "I need the endpoint." Ask first.
- `idle` does not mean the GPU is idle — a training job or Ollama can hold it
  directly while gpu-mode-swap reports `idle`. Confirm with the operator before
  taking the GPU.
- Only after an explicit go, and by absolute path:
  ```bash
  ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh code --json'      # coder-next up, autoresearch down
  ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh research --json'  # autoresearch up, coder-next down
  ssh dgx-llm-1 '~/bin/gpu-mode-swap.sh idle --json'      # both down
  ```

## Report

- State the current mode plainly. If a switch happened, show the `--json` result
  and the resulting mode.
- On `BROKEN-BOTH` or a failed `wait_for_port`, stop and surface it — follow the
  troubleshooting in `docs/recipes/gpu-mode-swap.md`; do not retry blindly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.