The Art of Debugging
stas00/the-art-of-debugging
Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.
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…
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernel --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .claude/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.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/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .claude/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernelType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernel --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .agents/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .agents/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernel --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .cursor/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .cursor/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PaddlePaddle/Paddle.git --path .agents/skills/paddle-design-phi-kernel--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernel --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .gemini/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .gemini/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernelInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .github/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .github/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PaddlePaddle/Paddle paddle-phi-kernel --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PaddlePaddle/Paddle.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/paddle-design-phi-kernel .opencode/skills/paddle-phi-kernel && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "paddle-phi-kernel" agent skill from https://github.com/PaddlePaddle/Paddle/tree/develop/.agents/skills/paddle-design-phi-kernel into .opencode/skills/paddle-phi-kernel/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "paddle-phi-kernel", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
paddle-phi-kernelA 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…
Paddle Phi Kernel is an agent skill from PaddlePaddle/Paddle. Use when working with Paddle's PHI kernel system: registering new kernels, debugging kernel selection/dispatch, understanding code auto-generation from YAML, or implementing operator decomposition via the combination mechanism.
Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/codegen-pipeline.md`, `references/combination-mechanism.md` and `references/kernel-registration.md`).
It sits in Development, covering Deep learning. It works with Python. The repository describes itself as: PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署). The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 4793e33. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Paddle Phi Kernel loads about 656 tokens when it runs, and up to ~7.7k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 144 words of instructions outside code blocks.
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.
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.
The full file from PaddlePaddle/Paddle at commit 4793e33, republished under its Apache-2.0 licence (© PaddlePaddle). 144 words, ~656 tokens.
.claude/skills/paddle-phi-kernel/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.PHI kernel 在 KernelFactory 单例中以两级 flat_hash_map 存储:
api_name (string) → KernelKeyMap
├── KernelKey_1 → Kernel_1
├── KernelKey_2 → Kernel_2
└── ..."add", "matmul")→ KernelKeyMapKernelKey → Kernel 对象(包含函数指针、参数元信息)KernelKey 由 Backend、DataLayout、DataType 三要素组成,哈希编码为 32-bit 整数:
bit: 31 ─────── 20 | 19 ─── 12 | 11 ── 8 | 7 ── 0
Extended DataType Layout BackendBackend(bit 0-7): CPU / GPU / GPUDNN / XPU / OneDNN 等DataLayout(bit 8-11): NCHW / NHWC / ANY 等DataType(bit 12-19): FLOAT32 / FLOAT16 / BFLOAT16 / INT64 等Extended(bit 20-31): 保留位,用于未来扩展PHI 体系通过 YAML 驱动代码生成,覆盖三个子系统:
| 子系统 | 生成器 | 产出物 |
|---|---|---|
| C++ API 层 | api_gen.py | paddle/phi/api/lib/api.cc |
| 动态图函数层 | eager_gen.py | dygraph_functions.cc, nodes.cc |
| Python-C 映射层 | python_c_gen.py | eager_op_function.cc |
输入 YAML:ops.yaml, backward.yaml, fused_ops.yaml, sparse_ops.yaml, op_compat.yaml
将 1061 个原生算子分解为约 200 个基础算子(primitive operators),降低分布式 / 编译器 / 新硬件适配成本。
DecompInterface → call_decomp_rule() → composite.h 实现VjpInterface / DecompVjpInterface → call_decomp_vjp() → details.h 实现| 场景 | 参考文档 |
|---|---|
| 注册新 kernel / 理解宏展开 | references/kernel-registration.md |
| 调试 kernel 选择 / 分派失败 | references/kernel-selection.md |
| 理解 YAML → 代码生成流程 | references/codegen-pipeline.md |
| 开发组合算子 / VJP | references/combination-mechanism.md |
paddle/phi/kernels/paddle/phi/core/kernel_registry.hpaddle/phi/core/kernel_factory.h, kernel_factory.ccpaddle/phi/ops/yaml/ops.yaml, backward.yamlpaddle/phi/api/generator/ — api_gen.py, backward_api_gen.py, tensor_operants_gen.pypaddle/fluid/primitive/decomp_rule/decomp_rule/composite.hpaddle/fluid/primitive/decomp_rule/decomp_vjp/details.h© 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
SKILL.md and 4 other files (references) in .agents/skills/paddle-design-phi-kernel of PaddlePaddle/Paddle.
Open the folder on GitHubat commit 4793e33
Paddle Phi Kernel 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Paddle Phi Kernel this skillPaddlePaddle/Paddle | 24k | — | ~656 | Automated safety check: Pass | Apache-2.0 | |
| The Art of Debuggingstas00/the-art-of-debugging | 1.7k | — | ~6.1k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| ExecuTorch Build Guidepytorch/executorch | 5.1k | — | ~2.3k | Automated safety check: Notes | Custom licence | |
| Code Reviewnstarman/quax | 143 | — | ~3.2k | Automated safety check: Pass | Apache-2.0 | |
| Onnxtxtonnx/onnx | 22k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| ExecuTorch Cortex-M Backendpytorch/executorch | 5.1k | — | ~872 | Automated safety check: Pass | Custom licence |
stas00/the-art-of-debugging
Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.
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.
nstarman/quax
A skill your agent uses when reviewing a pull request or diff in the quax repository.
onnx/onnx
Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.
pytorch/executorch
Developer guide for the Cortex-M (CMSIS-NN) backend in ExecuTorch: quantization pipeline, pass manager, tests and adding new ops.
brendanhasz/probflow
Ensure consistent code formatting using the uv package manager and pre-commit.
PaddlePaddle/Paddle
A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.
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…
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…
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…
PaddlePaddle/Paddle
在 Paddle 代码库中定位问题并输出高质量调试报告的专用技能。当遇到以下场景时优先使用:(1) Paddle 框架 bug 调试,(2) 算子实现问题排查,(3) 训练脚本异常诊断,(4) 分布式训练故障定位,(5) CUDA/GPU 相关错误处理,(6) 需要生成结构化调试报告。
PaddlePaddle/Paddle
PaddlePaddle (飞桨) C++ 算子开发指南。提供从 YAML 配置、InferMeta 函数、Kernel 实现、Python API 封装、单元测试到编译验证的完整算子开发流程指导。在以下场景使用此 skill:(1) 为 Paddle 框架新增 C++ 算子 (2) 修改或调试已有 Paddle 算子 (3) 编写算子的 YAML…
Works with
Categories
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…. Paddle Phi Kernel is an agent skill from PaddlePaddle/Paddle. Use when working with Paddle's PHI kernel system: registering new kernels, debugging kernel selection/dispatch, understanding code auto-generation from YAML, or implementing operator decomposition via the combination mechanism.
Paddle Phi Kernel fits situations like: working with Paddles PHI kernel system: registering new kernels; debugging kernel selection/dispatch; understanding code auto-generation from YAML; implementing operator decomposition via the combination mechanism.
Run `npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a claude-code`. Or copy the skill folder (.agents/skills/paddle-design-phi-kernel in PaddlePaddle/Paddle) into .claude/skills/paddle-phi-kernel in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -a codex`. Or copy the skill folder (.agents/skills/paddle-design-phi-kernel in PaddlePaddle/Paddle) into .agents/skills/paddle-phi-kernel in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PaddlePaddle/Paddle --skill paddle-phi-kernel -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-phi-kernel, .gemini/skills/paddle-phi-kernel, .github/skills/paddle-phi-kernel and .opencode/skills/paddle-phi-kernel in your project.
SKILL.md names no scripts, command-line tools or credentials: Paddle Phi Kernel is instructions for the agent only.
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.
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.
Paddle Phi Kernel 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.
About 656 tokens (SKILL.md is roughly 2.6k 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 7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Paddle Phi Kernel: The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars), ExecuTorch Build Guide (pytorch/executorch, 5.1k stars), Code Review (nstarman/quax, 143 stars) and Onnxtxt (onnx/onnx, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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 September 30, 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.