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.
npx skills add mindspore-ai/akg --skill cuda-basicsgit clone --depth 1 https://github.com/mindspore-ai/akgWrote 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.
[](https://agentmods.dev/skills/mindspore-ai/akg/cuda-basics)<a href="https://agentmods.dev/skills/mindspore-ai/akg/cuda-basics"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/cuda-basics.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00022 | $0.02357 |
| Opus 5 | $0.00011 | $0.01179 |
| Sonnet 5 | $0.00004 | $0.00471 |
| Haiku 4.5 | $0.00002 | $0.00236 |
Grade A, and why
cuda-basics 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CUDA编程基础
概述
CUDA (Compute Unified Device Architecture) 是NVIDIA推出的并行计算平台和编程模型。
线程层次结构
三层结构
Grid (网格)
└─ Block (块)
└─ Thread (线程)
维度表示
// 1D
dim3 block(256);
dim3 grid((N + 255) / 256);
// 2D
dim3 block(16, 16);
dim3 grid((M + 15) / 16, (N + 15) / 16);
// 3D
dim3 block(8, 8, 8);
dim3 grid((M + 7) / 8, (N + 7) / 8, (K + 7) / 8);
线程索引计算
// 1D索引
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// 2D索引
int row = blockIdx.y * blockDim.y + threadIdx.y;
int col = blockIdx.x * blockDim.x + threadIdx.x;
// 全局1D索引(从2D)
int idx = row * width + col;
内存层次
内存类型对比
| 内存类型 | 位置 | 访问速度 | 大小 | 作用域 | 生命周期 |
|---|---|---|---|---|---|
| Register | 片上 | 最快 | ~64KB/SM | Thread | Thread |
| Shared Memory | 片上 | 快 | 48KB-164KB | Block | Block |
| L1 Cache | 片上 | 快 | 128KB | - | - |
| L2 Cache | 片上 | 中 | MB级 | - | - |
| Global Memory | DRAM | 慢 | GB级 | Grid | Application |
| Constant Memory | DRAM | 中(有cache) | 64KB | Grid | Application |
| Texture Memory | DRAM | 中(有cache) | - | Grid | Application |
声明方式
// Register (自动)
int local_var;
// Shared Memory
__shared__ float shared_data[256];
// Global Memory
__global__ void kernel(float* global_data) { }
// Constant Memory
__constant__ float const_data[1024];
内存访问优化
1. 合并内存访问 (Coalesced Access)
// ✅ 好:连续访问
__global__ void coalesced_read(float* data) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
float val = data[idx]; // 线程连续访问
}
// ❌ 差:跨步访问
__global__ void strided_read(float* data, int stride) {
int idx = (blockIdx.x * blockDim.x + threadIdx.x) * stride;
float val = data[idx]; // 线程跨步访问
}
2. 使用Shared Memory
__global__ void use_shared_memory(float* input, float* output) {
__shared__ float tile[TILE_SIZE];
int tid = threadIdx.x;
int gid = blockIdx.x * blockDim.x + threadIdx.x;
// 从全局内存加载到共享内存
tile[tid] = input[gid];
__syncthreads(); // 同步
// 从共享内存读取(快速)
float val = tile[tid];
// 处理...
output[gid] = val;
}
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.
- 8d ago First seen · 361 lines · 22 tokens per session scan A c9e38d4a7fa5
cuda-basics is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 28d ago), licensed Apache-2.0. It adds 22 tokens to every session and 2,357 once invoked, about $0.0001 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.
Other skills, from other repositories
ruview-quickstart
Onboarding and first-run for RuView (WiFi-DensePose) — Docker demo with simulated data, repo build, and the fastest path to a live sensing dashboard. Use when someone is new to RuView or wants the shortest path to "it works on my machine".
onboard
Zero-to-sensing path picker for RuView (WiFi-DensePose) — pick docker-demo, repo-build, or live-esp32 and run the next concrete step.
doca-programming-guide
Use this skill when the user is writing their first DOCA app or asking a library-agnostic programming question — picking a shipped sample to copy and modify, wiring the canonical pkg-config doca-{library} + meson build (or FFI from Rust / Go / Python against the public C ABI), walking the cfg-create → init → start →…
devin-akin-perspective
A vendor-neutral perspective for making enterprise Wi-Fi decisions, with emphasis on radio physics, training, technical standards, and checking vendor claims against real deployments.
design-logic-circuit
Design combinational logic circuits from a functional specification through gate-level implementation. Covers AND, OR, NOT, XOR, NAND, NOR gates; NAND/NOR universality conversions; and standard building blocks including multiplexers, decoders, half/full adders, and ripple-carry adders. Use when translating a Boolean…
pdf-press
Teaches agents how to generate Markdown, HTML (with embedded SVG), and Mermaid content that renders beautifully to multi-page PDF via writepdf, with proper page breaks, compact professional layouts, brand and domain-adaptive color schemes, multi-column support for scientific papers, magazine-style editorial documents…