Agent skill

Cmake

by LuisaGroup in LuisaGroup/LuisaCompute

CMake build options, custom functions, and backend patterns for LuisaCompute.

Apache-2.0Auto-check passedBackend & APIs

Install Cmake

skills CLI
$ npx skills add LuisaGroup/LuisaCompute --skill cmake -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LuisaGroup/LuisaCompute cmake --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LuisaGroup/LuisaCompute.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cmake .claude/skills/cmake && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cmake
GitHub stars
1.1k
Token cost
~2.4k tokens
SKILL.md length
581 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

CMake build options, custom functions, and backend patterns for LuisaCompute.

  • Tasks that involve Backend development
  • SKILL.md covers Quick Start, Build Options, Target Naming and Module Hierarchy, plus 5 more sections
  • Calls python, cmake and xcrun

What it does

Cmake is an agent skill from LuisaGroup/LuisaCompute. CMake build options, custom functions, and backend patterns for LuisaCompute.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Backend development. It works with C++, CUDA and Rust. The repository describes itself as: High-Performance Rendering Framework on Stream Architectures. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Backend development

Example prompts

  • “/cmake”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 0c84a1a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • cmake
    • xcrun
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cmake loads about 2.4k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 581 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LuisaGroup/LuisaCompute at commit 0c84a1a, republished under its Apache-2.0 licence (© LuisaGroup). 581 words, ~2,394 tokens.

Download SKILL.mdSave it as .claude/skills/cmake/SKILL.md (or your agent's skills folder).
name
cmake
description
CMake build options, custom functions, and backend patterns for LuisaCompute.

CMake Build Guide

Requirements: CMake 3.26+, Ninja (recommended), C++20 compiler (MSVC/Clang/GCC).

Quick Start

bash
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build --prefix dist

Platform specifics:

Linux:

bash
export CC=clang-20 CXX=clang++-20
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release

macOS:

bash
export PATH="$PATH:/opt/homebrew/opt/llvm/bin"
export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
export SDKROOT=$(xcrun --show-sdk-path)
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release

Windows: Requires VS Developer Command Prompt. Or use Python bootstrap:

python
import bootstrap
bootstrap.prepare_msvc_environment()
scripts/agent_windows_cmake.py

One-shot configure + build + verify on Windows. CI-matching flags (LUISA_COMPUTE_ENABLE_RUST=OFF, LUISA_COMPUTE_ENABLE_REMOTE=OFF, LUISA_COMPUTE_ENABLE_CPU=OFF).

bash
# Full pipeline: configure → build → verify
python scripts/agent_windows_cmake.py

# Individual steps
python scripts/agent_windows_cmake.py --config          # configure only
python scripts/agent_windows_cmake.py --build           # build only
python scripts/agent_windows_cmake.py --verify          # check key .lib/.dll outputs
python scripts/agent_windows_cmake.py --clean           # clear CMake cache

# Options
python scripts/agent_windows_cmake.py --type Debug      # Debug build
python scripts/agent_windows_cmake.py -j 8              # limit parallel jobs
python scripts/agent_windows_cmake.py --clean --config  # clean re-configure

Auto-finds cmake and ninja (PATH → .deps/ → pip). Auto-prepares MSVC environment via vswhere. Verifies: SPIRV-Tools-opt.lib, SPIRV-Tools.lib, luisa-ast.dll, luisa-core.dll.

Build Options

OptionDefaultDescription
CMAKE_BUILD_TYPE-Release / Debug / RelWithDebInfo / MinSizeRel
LUISA_COMPUTE_ENABLE_DSLONC++ DSL
LUISA_COMPUTE_ENABLE_CUDAONCUDA backend
LUISA_COMPUTE_ENABLE_METALONMetal backend (macOS only)
LUISA_COMPUTE_ENABLE_DXONDirectX backend (Windows only)
LUISA_COMPUTE_ENABLE_VULKANONVulkan backend
LUISA_COMPUTE_ENABLE_HIPOFFHIP backend (work in progress)
LUISA_COMPUTE_ENABLE_CPUONCPU backend (requires Rust)
LUISA_COMPUTE_ENABLE_REMOTEONRemote backend (requires Rust)
LUISA_COMPUTE_ENABLE_FALLBACKONFallback backend (requires LLVM + Embree)
LUISA_COMPUTE_ENABLE_GUIONGUI support (GLFW/ImGui)
LUISA_COMPUTE_ENABLE_TENSOROFFC++ DSL tensor extension
LUISA_COMPUTE_ENABLE_CUDA_EXT_LCUBOFFCUDA extension: LCUB
LUISA_COMPUTE_ENABLE_CLANG_CXXOFFClangTooling-based C++ shading language
LUISA_COMPUTE_ENABLE_RUSTON if cargo found, else OFFRust/IR support; required for CPU/Remote
LUISA_COMPUTE_ENABLE_VK_XIR_SPIRVONNative XIR-to-SPIR-V codegen path for Vulkan
LUISA_COMPUTE_ENABLE_VK_AST_LLVM_SPIRVOFFExperimental AST→LLVM SPIR-V path; requires LLVM's native SPIRV target
LUISA_COMPUTE_BUILD_TESTSON in master projectBuild tests, examples and tutorials
LUISA_COMPUTE_ENABLE_SAFE_MODEOFFRuntime safe mode
LUISA_COMPUTE_ENABLE_UNITY_BUILDOFFUnity build
LUISA_COMPUTE_ENABLE_SANITIZERSOFFAddress/UB sanitizers
LUISA_COMPUTE_ENABLE_LTOOFFLink-time optimization (release builds only)
LUISA_COMPUTE_ENABLE_SCCACHEON (non-MSVC)Use sccache compiler launcher
LUISA_COMPUTE_CHECK_BACKEND_DEPENDENCIESONAuto-disable backends with missing dependencies
LUISA_COMPUTE_ENABLE_WAYLANDOFF (Linux)Wayland support in GUI/Vulkan swapchains
LUISA_COMPUTE_USE_SYSTEM_LIBSOFFPrefer system libraries; also enables per-lib USE_SYSTEM_* overrides
LUISA_COMPUTE_DOWNLOAD_OIDNOFFDownload OpenImageDenoise
LUISA_COMPUTE_DOWNLOAD_NVCOMPOFF (if CUDA)Download nvCOMP for CUDA decompression

LUISA_COMPUTE_USE_SYSTEM_* options exist for STL, GLFW, LMDB, REPROC, SPDLOG, XXHASH, YYJSON, MAGIC_ENUM, and MARL.

The two Vulkan SPIR-V codegen options are mutually exclusive. The LLVM path also builds/links the common luisa-compute-spirv support library because the Vulkan artifact codec shares its SPIR-V validation and feature-reconciliation utilities.

CI minimal build:

bash
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release \
  -D LUISA_COMPUTE_ENABLE_RUST=OFF -D LUISA_COMPUTE_ENABLE_REMOTE=OFF \
  -D LUISA_COMPUTE_ENABLE_CPU=OFF
cmake --build build

Target Naming

PrefixExamplePurpose
luisa-compute-<module>luisa-compute-coreInternal library
luisa-compute-backend-<name>luisa-compute-backend-cudaBackend plugin (output: luisa-backend-<name>)
luisa-compute-ext-<name>luisa-compute-ext-spdlogThird-party ext
luisa::computeAliasInterface target for all core modules

Module Hierarchy

luisa-compute-include (INTERFACE, header-only)
  → luisa-compute-ext (INTERFACE, third-party deps)
    → luisa-compute-core (SHARED)
      → luisa-compute-ast (SHARED)
        → luisa-compute-xir (SHARED)
        → luisa-compute-ir (SHARED when Rust enabled)
      → luisa-compute-runtime (SHARED)
        → luisa-compute-dsl, luisa-compute-gui, luisa-compute-ir
          → luisa-compute-backends (INTERFACE aggregator)

Additional modules linked by the umbrella target luisa::compute include luisa-compute-vstl (object helper), luisa-compute-osl, luisa-compute-api, and luisa-compute-clangcxx.

Custom CMake Functions

Show full SKILL.md (241 more words)Show less
luisa_compute_add_backend(name [SOURCES ...] [SUPPORT_DIR dir])

Creates a backend plugin MODULE target. Links luisa-compute-ast, luisa-compute-runtime, and luisa-compute-gui. Output name is luisa-backend-<name> and runtime artifacts are installed to bin/. If SUPPORT_DIR is given, its contents are copied next to the runtime outputs and installed to bin/.

cmake
luisa_compute_add_backend(cuda SOURCES ${LUISA_COMPUTE_CUDA_SOURCES})
luisa_compute_install(target)

Installs target with consistent destination paths.

cmake
luisa_compute_install(core SOURCES ${LUISA_COMPUTE_CORE_SOURCES})
luisa_compute_add_executable(name)

Creates executable linked to luisa::compute.

cmake
luisa_compute_add_executable(my_app)
luisa_compute_add_test(name source [LABELS ...] [ARGS ...])

File: src/tests/CMakeLists.txt. Builds one standalone executable per source. With LABELS, registers a CTest entry (CPU-only tests). Without LABELS, just builds the binary (GPU-using tests are invoked manually with a backend arg).

cmake
luisa_compute_add_test(test_basic_traits unit/core/test_basic_traits.cpp LABELS "unit;unit_core")
luisa_compute_add_test(test_my_gpu unit/runtime/test_my_gpu.cpp)  # no CTest
luisa_compute_add_example(name source... [MIRROR_AS_TEST])

File: examples/CMakeLists.txt. Builds example_<name> and, when MIRROR_AS_TEST is set, additionally builds a test_<name> mirror executable from the same sources. Reserved for auto-checkable examples (reference-image comparison, deterministic sims, headless compute). GUI/interop demos must omit the flag.

cmake
luisa_compute_add_example(example_path_tracing rendering/path_tracing.cpp MIRROR_AS_TEST)
luisa_compute_add_example(example_swapchain_qt gui/swapchain_qt.cpp)  # no mirror

Companion to luisa_compute_add_example. Calls target_link_libraries on both example_<name> and its test_<name> mirror (if any). Use whenever an example needs extra libs.

cmake
luisa_compute_add_example(example_cuda_lcub extension/cuda_lcub.cpp MIRROR_AS_TEST)
luisa_example_pair_link(example_cuda_lcub PRIVATE CUDA::cudart CUDA::cuda_driver)

Backend Plugin Build

Backends built as MODULE (runtime-loadable shared libs):

cmake
luisa_compute_add_backend(cuda SOURCES ${LUISA_COMPUTE_CUDA_SOURCES})

Key: output renamed to luisa-backend-<name>, installed to bin/, supports luisa_embed_device_lib for builtin device libs.

Rust Integration

File: src/rust/CMakeLists.txt

Rust support is auto-enabled when a Rust toolchain is found (unless LUISA_COMPUTE_ENABLE_RUST=OFF is passed); the CPU and Remote backends require it. The custom command invokes cargo build (profile: dev for Debug, release for Release). CMake targets:

  • luisa-compute-rust-meta (INTERFACE): static Rust libs
  • luisa_compute_backend_impl (INTERFACE): shared Rust backend

Third-Party Extension Pattern

Each src/ext/<lib>/:

cmake
if (LUISA_COMPUTE_USE_SYSTEM_<LIB>)
    find_package(<LIB> REQUIRED)
    target_link_libraries(luisa-compute-ext INTERFACE <target>)
    target_compile_definitions(luisa-compute-ext INTERFACE LUISA_USE_SYSTEM_<LIB>=1)
else()
    add_subdirectory(<lib>)
    target_link_libraries(luisa-compute-ext INTERFACE <target>)
    luisa_compute_install_extension(<target> ...)
endif()

Output & RPATH

${CMAKE_BINARY_DIR}/bin  → Runtime outputs (DLLs, executables)
${CMAKE_BINARY_DIR}/lib  → Archive outputs (static libs, PDBs)
  • macOS: @loader_path, @loader_path/../bin, @loader_path/../lib
  • Linux: $ORIGIN, $ORIGIN/../bin, $ORIGIN/../lib

© LuisaGroup, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cmake of LuisaGroup/LuisaCompute.

Open the folder on GitHubat commit 0c84a1a

Compare with similar skills

Cmake next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cmake compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cmake this skillLuisaGroup/LuisaCompute1.1k—~2.4kAutomated safety check: PassApache-2.0
Developing Softwaretelagod/code-abyss243—~410Automated safety check: PassMIT
Cppcrazyguitar/cppcheatsheet290—~1.8kAutomated safety check: PassMIT
Readable Cppcrazyguitar/cppcheatsheet290—~6.4kAutomated safety check: PassMIT
Feynman Auditor0xiehnnkta/nemesis-auditor2431 repos~11kAutomated safety check: PassMIT
Subspace Clientsdallison/subspace104—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Developing Software

    telagod/code-abyss

    Software development knowledge reference covering Python, Go, Rust, TypeScript, Java, C++, and Shell.

    243 GitHub stars~410 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Cpp

    crazyguitar/cppcheatsheet

    Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics.

    290 GitHub stars~1.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Readable Cpp

    crazyguitar/cppcheatsheet

    Readable C/C++/Rust/CUDA code rules inspired by The Art of Readable Code.

    290 GitHub stars~6.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Feynman Auditor

    0xiehnnkta/nemesis-auditor

    Deep business logic bug finder using the Feynman technique. An agent skill from 0xiehnnkta/nemesis-auditor.

    243 GitHub starsUsed in 1 repo~11k tokens
    Backend & APIsAuto-check passed
  • Subspace Clients

    dallison/subspace

    Write Subspace clients in C++, Python, Rust, or Java. An agent skill from dallison/subspace.

    104 GitHub stars~2.4k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Spec To Repo

    alirezarezvani/claude-skills

    A skill your agent uses when the user says 'build me an app', 'create a project from this spec', 'scaffold a new repo', 'generate a starter', 'turn this idea into code', 'bootstrap a project', 'I…

    28k GitHub stars~2.7k tokensUpdated 1 mo ago
    Backend & APIsAuto-check: notes

More from LuisaGroup/LuisaCompute

All 12 skills in this repo
  • Git

    LuisaGroup/LuisaCompute

    Show uncommitted changes and commit history via git. An agent skill from LuisaGroup/LuisaCompute.

    1.1k GitHub stars~544 tokensUpdated today
    Auto-check passed
  • Ast

    LuisaGroup/LuisaCompute

    Manual AST construction with FunctionBuilder for kernels and callables without DSL sugar.

    1.1k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Cpp Style

    LuisaGroup/LuisaCompute

    C++ naming, formatting, static analysis, and RTTI rules for LuisaCompute.

    1.1k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Debug

    LuisaGroup/LuisaCompute

    Debug crashes and test failures via stack-traces, host/device logging, and DSL buffer inspection.

    1.1k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Hlsl

    LuisaGroup/LuisaCompute

    HLSL code generation, StringBuilder patterns, builtin headers, and DXIL embedding.

    1.1k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Llvm Spirv

    LuisaGroup/LuisaCompute

    Experimental Vulkan AST-to-LLVM-to-SPIR-V backend, its fail-closed runtime-interface boundary, LLVM build integration, and validation path.

    1.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Cmake

What does Cmake do?

CMake build options, custom functions, and backend patterns for LuisaCompute. Cmake is an agent skill from LuisaGroup/LuisaCompute. CMake build options, custom functions, and backend patterns for LuisaCompute.

When should I use Cmake?

Cmake fits situations like: tasks that involve Backend development.

How do I install Cmake in Claude Code?

Run `npx skills add LuisaGroup/LuisaCompute --skill cmake -a claude-code`. Or copy the skill folder (.agents/skills/cmake in LuisaGroup/LuisaCompute) into .claude/skills/cmake in your project. Claude Code loads it when a task matches its description.

How do I install Cmake in Codex?

Run `npx skills add LuisaGroup/LuisaCompute --skill cmake -a codex`. Or copy the skill folder (.agents/skills/cmake in LuisaGroup/LuisaCompute) into .agents/skills/cmake in your project. Codex loads it when a task matches its description.

Can I use Cmake in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LuisaGroup/LuisaCompute --skill cmake -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cmake, .gemini/skills/cmake, .github/skills/cmake and .opencode/skills/cmake in your project.

What does Cmake need to run?

Going by SKILL.md and its folder, Cmake needs the command-line tools its instructions call (python, cmake, xcrun and cargo). Our summary lists: Python 3.

Does Cmake access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cmake safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cmake use?

Cmake is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cmake use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cmake?

Skills that share tags, products or a category with Cmake: Developing Software (telagod/code-abyss, 243 stars), Cpp (crazyguitar/cppcheatsheet, 290 stars), Readable Cpp (crazyguitar/cppcheatsheet, 290 stars) and Feynman Auditor (0xiehnnkta/nemesis-auditor, 243 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cmake?

LuisaGroup (a GitHub organization) maintains it in LuisaGroup/LuisaCompute, which has 1,051 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: LuisaGroup/LuisaCompute on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.