gpu-mode

gpu-mode is a skill for Claude Code, Codex from chipi/agentic-ai-homelab. It costs 117 tokens per session (763 once invoked), scanned A, original, MIT.

A coordination procedure for sharing one GPU between two local vLLM services. vLLM is software that runs language models on a computer, and the GPU is the processor used for that work.

In plain words
What is it for?
It is for checking which service owns the GPU, switching ownership when explicitly requested, and safely preparing calls to the local endpoints.
Why use it?
It prevents both services from trying to use the same GPU at once and checks for a broken state before making a request.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for checking which service owns the GPU, switching ownership when explicitly requested, and safely preparing calls to the local endpoints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/gpu-mode
Install

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.

Any agent
npx skills add chipi/agentic-ai-homelab --skill gpu-mode
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for gpu-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/gpu-mode.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/gpu-mode)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/gpu-mode"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/gpu-mode.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 763 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.00763
Opus 5 $0.00059 $0.00381
Sonnet 5 $0.00023 $0.00153
Haiku 4.5 $0.00012 $0.00076

Measured 7d ago against content hash e8212f849259, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

gpu-mode 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 7d 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.

workstation/claude/skills/gpu-mode/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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):

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:

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:
    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.

Read the full file on GitHub · 61 lines

Changes

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.

  1. 7d ago First seen · 61 lines · 117 tokens per session scan A e8212f849259

Subscribe to this mod's changes

gpu-mode is a skill published in the GitHub repository chipi/agentic-ai-homelab (2 stars, last pushed 4d ago), licensed MIT. It adds 117 tokens to every session and 763 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

agent-v3-memory-specialist

Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.

ruvnet/ruflo · 25 tokens

agent-neural-network

Agent skill for neural-network - invoke with $agent-neural-network.

ruvnet/ruflo · 18 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

neural-training

Neural pattern training with SONA (Self-Optimizing Neural Architecture), MoE (Mixture of Experts), and EWC++ for knowledge consolidation. Use when: pattern learning, model optimization, knowledge transfer, adaptive routing. Skip when: simple tasks, no learning required, one-off operations.

ruvnet/ruflo · 64 tokens

spark-training-gotchas

Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.

wshobson/agents · 63 tokens

cupynumeric-migration-readiness

Pre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment…

NVIDIA/skills · 173 tokens