optimize-for-gpu

optimize-for-gpu is a skill for Claude Code from ualberta-rcg/drac-agent-skills. It costs 79 tokens per session (1,588 once invoked), scanned A, original, MIT.

A set of Python tools for running scientific calculations on NVIDIA graphics processors, also called GPUs. It covers GPU versions of arrays, tables, machine-learning methods, graph algorithms, image operations, and custom kernels.

In plain words
What is it for?
Use it to accelerate NumPy or SciPy calculations with CuPy, process tables with cuDF, run compatible machine-learning or graph workloads, and benchmark CUDA code.
Why use it?
It helps move suitable CPU-based calculations to a GPU and check whether that change actually improves end-to-end speed. It also helps detect numerical differences and unnecessary transfers between the computer and GPU.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the community-science plugin — 10 skills shipped together

Good fit Use it to accelerate NumPy or SciPy calculations with CuPy, process tables with cuDF, run compatible machine-learning or graph workloads, and benchmark CUDA code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu
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 ualberta-rcg/drac-agent-skills --skill optimize-for-gpu
Clone the repo
git clone --depth 1 https://github.com/ualberta-rcg/drac-agent-skills

Made for: Claude Code.

Or install community-science, the plugin that ships this one along with the rest of its 10 skills.

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 optimize-for-gpu

README.md
[![agentmods](https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu/github.svg)](https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu)
Your own site
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for optimize-for-gpu

Your own site · 80×15
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/optimize-for-gpu.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,588 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.00079 $0.01588
Opus 5.5 $0.00032 $0.00635
Sonnet 5.5 $0.00016 $0.00318
Haiku 4.5 $0.00008 $0.00159

Measured 6d ago against content hash 57899ef171b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

optimize-for-gpu 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.

community-skills/skills/optimize-for-gpu/SKILL.md · 93 lines

How it starts

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

GPU Optimization for Scientific Python (NVIDIA CUDA & RAPIDS)

Treat GPU acceleration as an evidence-driven engineering step, not an automatic rewrite. Preserve the numerical contract, benchmark with proper CUDA synchronization on representative shapes, and retain the GPU path only when end-to-end latency or throughput genuinely improves.

Choose the Least Disruptive Layer First

Workload Preferred GPU Path Notes
PyTorch / JAX / TensorFlow Stay in framework Remove host↔device round trips, enable bf16/fp16, torch.compile, and batched tensor ops before reaching for another library.
NumPy / SciPy CuPy (cupy, cupyx.scipy) Drop-in NDArray, FFTs, sparse linear algebra, custom ElementwiseKernel / RawKernel.
pandas cudf.pandas -> cuDF Try zero-code python -m cudf.pandas accelerator mode first; drop to native cudf where needed.
scikit-learn cuml.accel -> cuML Accelerator mode first, native estimators for fine control.
NetworkX nx-cugraph -> cuGraph Backend dispatch (NETWORKX_AUTOMATIC_BACKENDS=cugraph) before rewriting graph code.
scikit-image / WSI cuCIM GPU morphology, filtering, and whole-slide pathology I/O.
Faiss / k-NN / ANN cuVS Exact and approximate GPU vector search (report recall@k vs. exact baseline).
High-speed GPU file I/O KvikIO Direct file/Zarr reads into GPU buffers (GPUDirect Storage where supported).
Custom array kernels Numba-CUDA / Triton Explicit SIMT kernels, shared memory tiling, warp reductions.
3D geometry & differentiable sim NVIDIA Warp / Newton Spatial queries (BVH/SDF/mesh raycast), differentiable physics, PyTorch/JAX zero-copy via DLPack (Newton replaces legacy warp.sim).

(Legacy note: cuxfilter ended at 26.06 and cuSpatial was archived at 25.04 — avoid both for new projects.)

6-Step GPU Optimization Workflow

Read the full file on GitHub · 93 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. 6d ago First seen · 93 lines · 79 tokens per session scan A 57899ef171b6

Subscribe to this mod's changes

optimize-for-gpu is a skill published in the GitHub repository ualberta-rcg/drac-agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 79 tokens to every session and 1,588 once invoked, about $0.0003 per session on Opus 5.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-11-25.

Related

optimize-for-gpu compared with skills from other repositories

optimize-for-gpu next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimize-for-gpuualberta-rcg/drac-agent-skillsSkill27d agoMITA79Claude Code
neuroskill-bciNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
ruview-applicationsruvnet/RuViewSkill106ktodayMITA79Claude Code
lab-hardware-cadK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA108Claude Code
pylabrobotK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA49Claude Code
pybammK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA70Claude Code, Codex
calibrate-roomruvnet/RuViewSkill106ktodayMITA41Claude Code