Use to build NCCL, its repository examples, and optionally nccl-tests on a CUDA Linux host - guide environment detection, GPU architecture selection, Make builds, and safe execution.
Capabilities
Purpose
Get NCCL, its examples, and optionally
Required inputs
These values must be resolved, although they may be discovered rather than
Optional inputs
Never guess a CUDA path, unsupported GPU architecture, install prefix, or MPI
Human Approval Boundary
Do not execute any command that changes files, downloads source, compiles code,
Getting started
Full instructionsExample command
Instructions
make -j<N> src.build CUDA_HOME=<cuda> BUILDDIR=<dir> NVCC_GENCODE="<targets>"Instructions: SKILL.mdv1.0.0
NCCL Build
Purpose
Get NCCL, its examples, and optionally
nccl-tests, built on Linux with CUDA.
Prerequisites
- A CUDA-capable Linux build host. A visible GPU is optional for compilation
but required to run GPU examples or nccl-tests. - CUDA Toolkit with
nvcc, GNU Make,g++, and Python 3. - An NCCL checkout containing
makefiles/version.mk, or permission to clone
https://github.com/NVIDIA/nccl.git. - Write access to the selected build directory and enough free disk space.
- Optional: NVIDIA driver and
nvidia-smifor architecture detection; MPI
compiler and runtime when an example or nccl-tests build uses MPI.
Do not install missing prerequisites. Report them and let the user decide how
to provide them.
Inputs
Resolve these inputs from the user's request and environment before proposing a
build:
Required inputs
These values must be resolved, although they may be discovered rather than
provided explicitly:
checkout: NCCL source directory; default to the current directory only when
it containsmakefiles/version.mk.CUDA_HOME: user-supplied CUDA Toolkit root, otherwise derive it from
nvcconPATH.BUILDDIR: output directory; use the repository default only when the user
has not requested another location.N: parallel Make job count; ask or choose a conservative host-appropriate
value and identify it as agent-derived.NVCC_GENCODE: target GPU architecture flags. Derive these from visible
GPUs, or ask when no GPU is visible or multiple architectures require a
choice.action: build NCCL, install it, build a repository example, or build/run
nccl-tests.
Optional inputs
- Build flags for non-default configurations.
- Install prefix when installation is requested.
- Repository example selection.
- MPI enablement and MPI installation settings.
Never guess a CUDA path, unsupported GPU architecture, install prefix, or MPI
configuration.
Human Approval Boundary
Do not execute any command that changes files, downloads source, compiles code,
installs artifacts, runs GPU workloads, or otherwise alters system state
without explicit user confirmation.
Before each such operation:
- Show the exact command and affected paths.
- Explain its purpose and expected changes.
- Ask the user to approve, modify, or cancel it.
- Wait for explicit approval immediately before execution.
Approval applies only to the displayed command. Obtain new approval if the
command changes. Never run cleanup, deletion, overwrite, package installation,
sudo, or system-wide installation commands without separate explicit
approval. Read-only environment and prerequisite checks may run without
confirmation.
Instructions
- Run these read-only prerequisite checks directly, combined in one shell
command; they are safe and need no consent. Do not follow up by searching
the filesystem for other CUDA installations or checkouts; report what is
missing and ask instead:uname -sm- locate
nvccfrom<CUDA_HOME>/bin/nvccwhenCUDA_HOMEis given,
otherwise fromPATH; runnvcc --versionandnvcc --list-gpu-code command -v make g++ python3- once the checkout and
BUILDDIRare resolved, verify that the build
directory's parent is writable and inspect available disk space - if
nvidia-smiis available, run
nvidia-smi --query-gpu=index,name,compute_cap --format=csv,noheader
Report missing requirements instead of installing them. An unavailable,
failing, empty, or unparseablenvidia-smiresult means no GPU
architecture was detected, not that compilation is impossible: ask for the
target arch. With several visible archs, ask whether
to build all or one. Confirm every target appears in
nvcc --list-gpu-code.
- Work in an NCCL checkout (
makefiles/version.mkpresent), or show:
git clone https://github.com/NVIDIA/nccl.git, identify the destination,
and wait for explicit approval before cloning. - Show the resolved build command:
Before running a build, clone, install, or test command, give its one-linebash
env -u LD_PRELOAD -u LD_AUDIT -u LD_LIBRARY_PATH \ make -j<N> src.build CUDA_HOME=<cuda> BUILDDIR=<dir> NVCC_GENCODE="<targets>"
goal and aParameter | Value | Meaning | Sourcetable, then ask: run as
shown, change, or cancel. On change, keep the other resolved values, apply
the requested edits, revalidate affected inputs, and present the revised
command for fresh approval. Read-only checks need no prompt. Never use
sudoor/usr/localunless requested.
When the user only asks to see the command, present it fully resolved from
the values they supplied even if prerequisites are missing; for example,
sm_90becomesNVCC_GENCODE="-gencode=arch=compute_90,code=sm_90". Mark
values not yet validated in theSourcecolumn, list the missing
prerequisites, and do not run the command. - Verify
<dir>/include/nccl.hand<dir>/lib/libnccl.so*; this directory
isNCCL_HOME. For static-only builds, see
references/build_options.md. For runtime:
export LD_LIBRARY_PATH="<NCCL_HOME>/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}". - Install only if asked. Reuse the verified build's
BUILDDIR,CUDA_HOME,
NVCC_GENCODE, and every other build-affecting Make variable; if no build
directory was selected in this context, ask for it rather than defaulting
to./build. Present and obtain consent for:After installation, verifybashenv -u LD_PRELOAD -u LD_AUDIT -u LD_LIBRARY_PATH \ make src.install CUDA_HOME=<cuda> BUILDDIR=<build-dir> \ NVCC_GENCODE="<targets>" PREFIX=<install-prefix> [same-build-flags]<install-prefix>/include/nccl.hand
<install-prefix>/lib/libnccl.so*.
For repository examples readreferences/examples.md; for CMake or
advanced flags readreferences/build_options.md; for nccl-tests read
references/nccl_tests.md.
Validation and Error Handling
- Validate all requested targets against
nvcc --list-gpu-codebefore Make.
Reject unsupported targets and do not start the build. - Treat any nonzero clone, configure, build, install, or test exit status as a
failure. Preserve the relevant command and concise error output; never claim
success from partial artifacts. - After a successful
src.build, require both<dir>/include/nccl.hand at
least one<dir>/lib/libnccl.so*. After a static-only build, require
<dir>/include/nccl.hand<dir>/lib/libnccl_static.a. - After an example or nccl-tests build, verify the requested executable exists
before offering to run it. - If a command fails, diagnose the first actionable error, keep the source and
existing artifacts intact, and propose the smallest retry. Ask for consent
again before a changed build, install, or test command. - If required input remains unresolved, stop before mutation and ask one
focused question.
Troubleshooting
nvccmissing: report that CUDA Toolkit is unavailable and ask for a valid
CUDA_HOME; do not install CUDA.nvidia-smimissing or no GPU visible: compilation can continue after the
user supplies a target architecture; do not guess one.- Unsupported
NVCC_GENCODE: show the codes fromnvcc --list-gpu-codeand
ask for a supported target. makefiles/version.mkmissing: the directory is not an NCCL checkout. Offer
the official clone command and wait for consent.- Compiler or linker failure: report the first relevant error and the resolved
CUDA, compiler, target, and build-directory values. - Runtime loader cannot find NCCL: prepend
<NCCL_HOME>/libto
LD_LIBRARY_PATHwithout discarding the existing value. - MPI headers or libraries missing: disable MPI unless required, or follow
references/nccl_tests.mdafter the user supplies the MPI installation.
Limitations
- This skill supports CUDA Linux hosts only; it does not build NCCL on macOS or
Windows. - A no-GPU host can compile but cannot validate runtime collective behavior.
- Cross-compilation, package creation, container-image construction, and
cluster provisioning are outside the default workflow. - Successful local compilation does not prove multi-node networking, RDMA, or
performance correctness. - Repository examples and nccl-tests have separate dependencies and consent
boundaries; building NCCL does not authorize building or running them.
Examples
Standard local build
For “Build NCCL with the visible GPUs,” run the prerequisite checks, derive and
validate the GPU targets, resolve all parameters, then present:
env -u LD_PRELOAD -u LD_AUDIT -u LD_LIBRARY_PATH \
make -j<N> src.build CUDA_HOME=<cuda> BUILDDIR=<dir> \
NVCC_GENCODE="<validated-targets>"
Show the goal and Parameter | Value | Meaning | Source table, then wait for
the user to run as shown, change, or cancel.
Build when no GPU is visible
For “Build NCCL in this CUDA container; no GPU is visible,” explain that
compilation is still possible, ask for the target architecture, validate it
with nvcc --list-gpu-code, and only then present the resolved build command.
Report built, not run after successful artifact validation.
Missing CUDA compiler
For “Prepare an NCCL build, but nvcc is unavailable,” report nvcc as a
missing prerequisite, ask whether the user has a CUDA Toolkit path to use, and
stop without installing packages, invoking Make, or claiming success.
Guardrails
Tests come only from NVIDIA/nccl-tests, checked out outside the NCCL tree.
Environment checks are read-only. Never install packages or use sudo to
repair a missing dependency unless the user explicitly asks.
Explore more skills
Browse all- Web Performance AuditorAI-powered web performance auditor for frontend and web developers. Use it to audit a website or web app, diagnose poor…
- Deepstream DevNVIDIA DeepStream SDK development with Python pyservicemaker API. Use when building video analytics pipelines,…
- I4h Catheter NavigationOverview of `workflows/catheter_navigation/` (fluorosim DRR, XPBD physics, vasculature digital twin). Use when the user…
- Omniverse Content ServicesOmniverse Content Services, also discoverable as Omniverse Content Workspace or USD Content Workspace. Use for USD…
- Doca RmaxDOCA Rivermax (doca_rmax) receive streams for timing-precise media over IP (SMPTE ST 2110 video / audio, market data,…
- Tao Train SegformerSegFormer for semantic segmentation. Lightweight transformer-based architecture with hierarchical feature extraction,…
Security
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Reviews (0)
More from skills
View source →Frequently asked questions about nccl-build
What does the nccl-build skill do?
Use to build NCCL, its repository examples, and optionally nccl-tests on a CUDA Linux host - guide environment detection, GPU architecture selection, Make builds, and safe execution. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the nccl-build skill?
Run `npx @skills-hub-ai/cli install skills-nccl-build` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/skills-nccl-build/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does nccl-build work with?
nccl-build runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the nccl-build skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use nccl-build after installing it?
In Claude Code, type `/skills-nccl-build` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the nccl-build skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/skills-nccl-build)<a href="https://skills-hub.ai/skills/skills-nccl-build"><img src="https://skills-hub.ai/api/badges/skill/skills-nccl-build" alt="Install on Skills Hub"></a>More options in the badge docs.