cuda-scaffold

Generate CUDA kernel scaffolds with Rust bindings and benchmarks.

2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/pilotspace/moon --skill cuda-scaffold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuda-scaffold
Source: https://github.com/pilotspace/moon/tree/main/.claude/skills/cuda-scaffold
Command: npx skills add https://github.com/pilotspace/moon --skill cuda-scaffold

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold CUDA kernel development by automatically generating CUDA source, Rust bindings, CPU fallback, and benchmarks for a new kernel name and data types.

Core Features & Use Cases

  • Automated kernel scaffolding: generate CUDA source, Rust wrapper, and fallback code.
  • Benchmark scaffolding: create Criterion benches to measure kernel performance.
  • Use Case: when adding a new kernel like vector_l2_distance with f32 or f16, run the scaffold to produce all boilerplate.

Quick Start

Run /cuda-scaffold vector_l2_distance f32 to scaffold a new CUDA kernel named vector_l2_distance with a f32 data type.

Frequently Asked Questions about cuda-scaffold

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a CUDA kernel with Rust bindings?

To scaffold a CUDA kernel with Rust, you can generate complete boilerplate including CUDA source, Rust wrappers, and CPU fallback code by running a command with your desired kernel name and data type. This enforces a structured directory layout for cargo projects.

Does cudarc support generating f16 and f32 data type variants for GPU kernels?

Yes, when generating GPU kernel code with cudarc, the scaffolding process supports creating data-type variants for both f32 and f16. You simply specify the data type when running the scaffold command to produce the appropriate typed bindings.

What is the best way to generate boilerplate code for a new CUDA kernel?

The best way to generate boilerplate for a new CUDA kernel is using an automated scaffolding tool that creates the CUDA source, Rust integration, and optional Criterion benchmarks all at once. This eliminates manual file creation and ensures a structured workflow.

Can I generate Criterion benchmarks for CUDA kernels automatically?

Yes, you can automatically generate Criterion benchmark scaffolding for CUDA kernels to measure performance. The scaffolding creates the necessary benchmark files alongside your kernel source and Rust bindings.

What do I need to set up before scaffolding a CUDA kernel project in Rust?

Before scaffolding a CUDA kernel project in Rust, you need a working cargo project environment. The scaffolding process integrates directly into your cargo project directory structure to generate the required source and binding files.