hpc-gpu-stack

hpc-gpu-stack is a skill for Claude Code, Codex from SciMate-AI/HPC-Skills. It costs 71 tokens per session (835 once invoked), scanned A, original, MIT.

Guidance for building, reviewing, debugging, and running CUDA programs on high-performance computing systems. It covers the connected choices between the GPU toolkit, compiler, parallel launcher, scheduler, and visible devices.

In plain words
What is it for?
Use it for CUDA compilation, CUDA-aware MPI, Slurm GPU jobs, rank-to-GPU assignment, GPU memory and streams, runtime failures, and profiling.
Why use it?
GPU failures often come from mismatched compilers, schedulers, MPI settings, or device assignments rather than from the GPU code itself. The guidance helps trace those problems across the full setup.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/scimate-ai/hpc-skills/hpc-gpu-stack
Any agent
npx skills add SciMate-AI/HPC-Skills --skill hpc-gpu-stack
Clone the repo
git clone --depth 1 https://github.com/SciMate-AI/HPC-Skills

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 hpc-gpu-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/scimate-ai/hpc-skills/hpc-gpu-stack.svg)](https://agentmods.dev/skills/scimate-ai/hpc-skills/hpc-gpu-stack)
Your own site
<a href="https://agentmods.dev/skills/scimate-ai/hpc-skills/hpc-gpu-stack"><img src="https://agentmods.dev/badge/skills/scimate-ai/hpc-skills/hpc-gpu-stack.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 835 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00071 $0.00835
Opus 5 $0.00036 $0.00417
Sonnet 5 $0.00014 $0.00167
Haiku 4.5 $0.00007 $0.00084

Measured 5d ago against content hash f21a9ef9608b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hpc-gpu-stack 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 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/templates/cuda_mpi_gpu_slurm.sh, assets/templates/cuda_single_gpu_slurm.sh, assets/templates/nvcc_build_example.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/hpc-gpu-stack/SKILL.md · 69 lines

How it starts

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

HPC GPU Stack

Treat GPU execution as one coherent stack: CUDA toolchain, host compiler, launcher, scheduler mapping, and device visibility must agree before kernel tuning matters.

Start

  1. Read references/cuda-and-host-compiler-matrix.md before choosing nvcc, host compiler, or a CUDA build baseline.
  2. Read references/gpu-aware-mpi-and-rank-mapping.md when the workflow spans MPI ranks, one-rank-per-GPU layouts, or CUDA-aware MPI.
  3. Read references/device-visibility-and-scheduler-integration.md when Slurm, CUDA_VISIBLE_DEVICES, MIG, or scheduler-provided GPU allocation is involved.
  4. Read references/memory-streams-and-overlap-playbook.md when debugging device memory pressure, pinned-memory transfers, streams, or overlap assumptions.
  5. Read references/build-and-launch-workflow.md when turning a CUDA code path into a reproducible compile-and-run workflow.
  6. Read references/runtime-debugging-and-profiling.md when kernels fail at runtime, ranks see the wrong device, or performance is unexpectedly poor.
  7. Read references/error-recovery.md when configure, compile, launch, or runtime CUDA behavior fails.
  8. Read references/error-pattern-dictionary.md when a GPU failure needs a fast pattern match.

Work sequence

  1. Confirm the execution model first:
    • single GPU
    • one MPI rank per GPU
    • hybrid MPI plus threads with explicit rank-to-GPU placement
  2. Keep CUDA toolkit, host compiler, and MPI stack mutually compatible.
  3. Let the scheduler expose the intended GPU allocation before forcing manual device selection.
  4. Get a minimal kernel and launch baseline working before tuning streams, overlap, or transport variables.
  5. Reproduce failures on one node and the smallest GPU count that still shows the issue before scaling out.

Guardrails

  • Do not assume nvcc accepts any host compiler visible in PATH.
  • Do not mix rank-to-GPU mapping logic from Open MPI, MPICH-family, and Slurm without checking which environment variables are actually set.
  • Do not tune streams or overlap to compensate for a broken device-mapping or memory-capacity issue.
  • Do not debug multi-node GPU failures before a single-node baseline is trustworthy.

Read the full file on GitHub · 69 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. 5d ago First seen · 69 lines · 71 tokens per session scan A f21a9ef9608b

Subscribe to this mod's changes

hpc-gpu-stack is a skill published in the GitHub repository SciMate-AI/HPC-Skills (84 stars, last pushed 5mo ago), licensed MIT. It adds 71 tokens to every session and 835 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

latchbio-integration

Build, register, debug, and operate bioinformatics workflows on Latch using the Python SDK, CLI, Latch Data and Registry, Nextflow, Snakemake, programmatic execution, and Latch MCP. Use when authoring or deploying Latch workflows, configuring resources or interfaces, moving data, integrating Registry, or launching and…

K-Dense-AI/scientific-agent-skills · 76 tokens

modal-compute

Run explicitly chosen research benchmark or replication jobs on Modal's serverless infrastructure. Use when a Feynman research workflow needs burst remote GPU compute and the Modal CLI is available.

companion-inc/feynman · 39 tokens

remote-compute-ssh

Evaluate and use SSH Remote Compute before choosing where to run GPU, high-memory, parallel, batch, model-inference, bioinformatics, or other long-running scientific work; supports short remote commands and asynchronous jobs with automatic harvest and analysis.

aipoch/open-science · 53 tokens

dnanexus-integration

DNAnexus cloud genomics platform. Build apps/applets, manage data (upload/download), dxpy Python SDK, run workflows, FASTQ/BAM/VCF, for genomics pipeline development and execution.

synthetic-sciences/openscience · 49 tokens

latchbio-integration

Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.

synthetic-sciences/openscience · 45 tokens

modal-serverless-gpu

Run approved CPU or GPU work through OpenScience computejob on the user's configured Modal account. Use for isolated scientific scripts, dependency provisioning, durable outputs, logs, status, cancellation, and recovery. Never invoke the Modal SDK or CLI directly.

synthetic-sciences/openscience · 54 tokens