Agent skill

Paddle Build

by PaddlePaddle in PaddlePaddle/Paddle

A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Paddle Build

skills CLI
$ npx skills add PaddlePaddle/Paddle --skill paddle-build -a claude-code

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

GitHub CLI
$ gh skill install PaddlePaddle/Paddle paddle-build --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/PaddlePaddle/Paddle.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/paddle-build .claude/skills/paddle-build && 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
paddle-build
GitHub stars
24k
Token cost
~1k tokens
SKILL.md length
227 words
Files
2 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

  • Works in 4 steps: 环境准备(venv) → CMake 配置 → 编译 → …
  • Needing to compile
  • SKILL.md covers 概览, 编译流程, 常用 CMake 选项 and 增量编译策略, plus 6 more sections
  • Calls uv and cmake

What it does

Paddle Build is an agent skill from PaddlePaddle/Paddle. Use when needing to compile, rebuild, or install Paddle from source after code changes. Covers cmake configuration, ninja incremental build, wheel packaging, and common build failure diagnosis.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/mac-build.md`).

It sits in AI & LLM Engineering, covering Deep learning. It works with C++, Python and CUDA. The repository describes itself as: PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署). The licence is Apache-2.0.

When your agent uses it

  • Needing to compile
  • Install Paddle from source after code changes

Example prompts

  • “/paddle-build”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 环境准备(venv)
  2. CMake 配置
  3. 编译
  4. 安装

What it can do on your machine

Read from SKILL.md and the folder at commit 92bd1d1. 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:

    • uv
    • cmake

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

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    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

Paddle Build loads about 1k tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 227 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

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 PaddlePaddle/Paddle at commit 92bd1d1, republished under its Apache-2.0 licence (© PaddlePaddle). 227 words, ~1,009 tokens.

Download SKILL.mdSave it as .claude/skills/paddle-build/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
paddle-build
description
Use when needing to compile, rebuild, or install Paddle from source after code changes. Covers cmake configuration, ninja incremental build, wheel packaging, and common build failure diagnosis.

Paddle 源码编译

概览

Paddle 使用 CMake + Ninja 构建。典型流程:cmake 配置 → ninja 编译 → whl 打包安装。修改 C++/CUDA 代码后需重新编译才能生效。

编译流程

1. 环境准备(venv)
bash
cd /workspace/Paddle
uv venv --relocatable --seed --python 3.10   # 首次创建
source .venv/bin/activate
uv pip install -r python/requirements.txt
uv pip install func_timeout pandas numpy "numpy<2.0"

若 .venv 已存在,直接 source .venv/bin/activate 即可。

2. CMake 配置
bash
mkdir -p build && cd build
cmake .. \
  -GNinja \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  -DPY_VERSION=3.10 \
  -DPADDLE_VERSION=0.0.0 \
  -DCUDA_ARCH_NAME=Auto \
  -DWITH_GPU=ON \
  -DWITH_DISTRIBUTE=ON \
  -DWITH_CINN=ON \
  -DWITH_UNITY_BUILD=OFF \
  -DWITH_TESTING=OFF

配置只需首次执行或 CMake 选项变更时重新执行。

3. 编译
bash
ninja -j$(nproc)

Ninja 自动增量编译,仅重编变更文件及其依赖。

4. 安装
bash
cd /workspace/Paddle
uv pip install build/python/dist/*.whl --no-deps --force-reinstall

--no-deps 跳过依赖解析加速安装,--force-reinstall 确保覆盖旧版。

常用 CMake 选项

选项默认说明
WITH_GPUON(有CUDA时)GPU 支持
WITH_DISTRIBUTEOFF分布式训练
WITH_CINNOFFCINN 编译器
WITH_TESTINGONC++ 单测(关闭可加速编译)
WITH_UNITY_BUILDOFF合并编译单元加速(可能掩盖头文件问题)
CUDA_ARCH_NAMEAutoGPU 架构,Auto 自动检测当前卡
CMAKE_BUILD_TYPEReleaseDebug 可调试但更慢
CMAKE_EXPORT_COMPILE_COMMANDSOFF生成 compile_commands.json 供 clangd 使用
WITH_TENSORRTOFFTensorRT 推理加速
WITH_ROCMOFFAMD ROCm 支持
WITH_XPUOFF百度昆仑 XPU 支持

增量编译策略

dot
digraph incremental {
  "修改了什么?" [shape=diamond];
  "Python 代码" [shape=box, label="无需编译\n同步源码到构建目录后测试"];
  "C++/CUDA kernel" [shape=box, label="ninja → 安装 whl"];
  "CMakeLists / cmake 选项" [shape=box, label="重新 cmake → ninja → 安装 whl"];
  "YAML (ops/backward)" [shape=box, label="ninja(触发代码生成)→ 安装 whl"];

  "修改了什么?" -> "Python 代码" [label="python/"];
  "修改了什么?" -> "C++/CUDA kernel" [label="paddle/phi/"];
  "修改了什么?" -> "CMakeLists / cmake 选项" [label="cmake/"];
  "修改了什么?" -> "YAML (ops/backward)" [label="ops.yaml 等"];
}
  • 仅改 Python:无需编译。如果直接在 build/python 下编辑测试,改动即时生效。也可以在源码目录编辑后通过 cp python/<src> build/python/<src> 或者 cp test/<src> build/test/<src> 同步到构建目录。
  • 改 C++/CUDA:cd build && ninja -j$(nproc) + 重新安装 whl。
  • 改 CMake 配置:需重新 cmake .. 再 ninja。
  • 改 YAML(ops.yaml / backward.yaml):ninja 会自动触发代码生成脚本。

检查已有构建产物

复用已有 build 可大幅节约时间:

bash
# 检查是否已有 whl
ls build/python/dist/*.whl 2>/dev/null && echo "已有构建产物" || echo "需要编译"

# 检查 compile_commands.json(clangd 需要)
ls build/compile_commands.json 2>/dev/null

常见编译问题

症状原因解决
ninja: error: loading 'build.ninja'未执行 cmake 配置先执行 cmake 命令
CUDA arch 不匹配CUDA_ARCH_NAME 与实际 GPU 不符设为 Auto 或指定具体架构
链接时 OOM并行链接占用过多内存ninja -j4 减少并行度
protobuf 版本冲突系统 protobuf 与编译版本不一致在 venv 内编译,隔离系统包
ccache 缓存失效导致全量重编头文件路径变更清理 ccache: ccache -C
whl 安装后 import 报错旧 .so 残留--force-reinstall 或清理 site-packages/paddle

完整一键编译示例

bash
cd /workspace/Paddle
source .venv/bin/activate
cd build
ninja -j$(nproc) && cd .. && uv pip install build/python/dist/*.whl --no-deps --force-reinstall

调试编译(Debug 模式)

需要 gdb 调试 C++ 代码时,将 CMAKE_BUILD_TYPE 改为 Debug:

bash
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug [其他选项...]
ninja -j$(nproc)

Debug 模式编译产物更大、运行更慢,仅在需要调试时使用。

关键目录

目录说明
build/构建产物根目录
build/python/dist/生成的 whl 文件
build/compile_commands.jsonclangd 索引文件
paddle/phi/kernels/PHI kernel 源码
paddle/phi/ops/yaml/算子 YAML 定义
cmake/CMake 模块和工具链

平台特定指南

平台参考文档
macOS (Apple Silicon) CPU 编译references/mac-build.md

© PaddlePaddle, 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

SKILL.md and 1 other file (references) in .agents/skills/paddle-build of PaddlePaddle/Paddle.

  • SKILL.md
  • references/mac-build.md

Open the folder on GitHubat commit 92bd1d1

Compare with similar skills

Paddle Build 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.

Paddle Build compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Paddle Build this skillPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Ako4allTongmingLAIC/AKO4ALL369—~4kAutomated safety check: PassMIT
ExecuTorch Build Guidepytorch/executorch5.1k—~2.3kAutomated safety check: NotesCustom licence
Onnxtxtonnx/onnx22k—~1.3kAutomated safety check: PassApache-2.0
Cuda Cpp Kernelvipshop/cache-dit1.3k—~2.3kAutomated safety check: PassApache-2.0
Fix Envevo-design/proto-tools135—~2.5kAutomated safety check: NotesMIT

Similar skills

  • Ako4all

    TongmingLAIC/AKO4ALL

    Drive an agentic loop that iteratively optimizes a GPU kernel for maximum speedup.

    369 GitHub stars~4k tokensUpdated 25 days ago
    AI & LLM EngineeringAuto-check passed
  • ExecuTorch Build Guide

    pytorch/executorch

    Builds ExecuTorch from source: the Python package, C++ runtime, model runners, Android and iOS cross-compilation and backend-specific builds, with environment checks.

    5.1k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Onnxtxt

    onnx/onnx

    Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.

    22k GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Cuda Cpp Kernel

    vipshop/cache-dit

    A skill your agent uses when writing, debugging, porting, reviewing, or optimizing CUDA C++ or PTX kernels; investigating CUDA Runtime or Driver API behavior; profiling kernels with Nsight Systems…

    1.3k GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Fix Env

    evo-design/proto-tools

    Fixes tool environment setup failures in proto-tools, either just for the current machine (eject the tool's standalone dir, patch it, and point PROTO<TOOLKITSTANDALONEDIR at it; works for any…

    135 GitHub stars~2.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Cutlass Skill

    slowlyC/agent-gpu-skills

    Write, debug, and optimize CUTLASS, CuTe, and CuTeDSL GPU kernels from local upstream source, examples, and headers.

    169 GitHub stars~1.3k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from PaddlePaddle/Paddle

All 11 skills in this repo
  • Paddle Design Compiler

    PaddlePaddle/Paddle

    A skill your agent uses when working with Paddle 3.0 compiler full pipeline: SOT (Symbolic Opcode Translator) for bytecode-level dy2st graph capture, PIR (Paddle IR) for SSA-based intermediate…

    24k GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Paddle Design Distributed

    PaddlePaddle/Paddle

    A skill your agent uses when working with Paddle's distributed training system: understanding parallelism strategies (DP, ZeRO, TP, PP, SP), semi-automatic parallel with ProcessMesh + shardtensor…

    24k GitHub stars~660 tokensUpdated today
    Auto-check passed
  • Paddle Eager Graph

    PaddlePaddle/Paddle

    A skill your agent uses when navigating Paddle eager-mode (dynamic graph) source code, tracing forward/backward execution, debugging autograd issues, understanding PyLayer, or investigating…

    24k GitHub stars~562 tokensUpdated today
    Auto-check passed
  • Paddle Phi Kernel

    PaddlePaddle/Paddle

    A skill your agent uses when working with Paddle's PHI kernel system: registering new kernels, debugging kernel selection/dispatch, understanding code auto-generation from YAML, or implementing…

    24k GitHub stars~656 tokensUpdated today
    Auto-check passed
  • Paddle Debug

    PaddlePaddle/Paddle

    在 Paddle 代码库中定位问题并输出高质量调试报告的专用技能。当遇到以下场景时优先使用:(1) Paddle 框架 bug 调试,(2) 算子实现问题排查,(3) 训练脚本异常诊断,(4) 分布式训练故障定位,(5) CUDA/GPU 相关错误处理,(6) 需要生成结构化调试报告。

    24k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Paddle Op Dev

    PaddlePaddle/Paddle

    PaddlePaddle (飞桨) C++ 算子开发指南。提供从 YAML 配置、InferMeta 函数、Kernel 实现、Python API 封装、单元测试到编译验证的完整算子开发流程指导。在以下场景使用此 skill:(1) 为 Paddle 框架新增 C++ 算子 (2) 修改或调试已有 Paddle 算子 (3) 编写算子的 YAML…

    24k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Works with

Questions about Paddle Build

What does Paddle Build do?

A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes. Paddle Build is an agent skill from PaddlePaddle/Paddle. Use when needing to compile, rebuild, or install Paddle from source after code changes.

When should I use Paddle Build?

Paddle Build fits situations like: needing to compile; install Paddle from source after code changes.

How do I install Paddle Build in Claude Code?

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

How do I install Paddle Build in Codex?

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

Can I use Paddle Build 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 PaddlePaddle/Paddle --skill paddle-build -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/paddle-build, .gemini/skills/paddle-build, .github/skills/paddle-build and .opencode/skills/paddle-build in your project.

What does Paddle Build need to run?

Going by SKILL.md and its folder, Paddle Build needs the command-line tools its instructions call (uv and cmake). Our summary lists: Python 3.

Does Paddle Build access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Paddle Build 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 Paddle Build use?

Paddle Build 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 Paddle Build use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Paddle Build?

Skills that share tags, products or a category with Paddle Build: Ako4all (TongmingLAIC/AKO4ALL, 369 stars), ExecuTorch Build Guide (pytorch/executorch, 5.1k stars), Onnxtxt (onnx/onnx, 22k stars) and Cuda Cpp Kernel (vipshop/cache-dit, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Paddle Build?

PaddlePaddle (a GitHub organization) maintains it in PaddlePaddle/Paddle, which has 24,120 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 10, 2026.

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