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.
Answers ExecuTorch questions from a local wiki on backends, export pitfalls, quantization recipes, runtime errors and SoC compatibility.
$ npx skills add pytorch/executorch --skill executorch-kb -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pytorch/executorch executorch-kb --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/pytorch/executorch.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/executorch-kb .claude/skills/executorch-kb && 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 "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .claude/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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/pytorch/executorch/tree/main/.claude/skills/executorch-kbType 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 pytorch/executorch --skill executorch-kb -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pytorch/executorch executorch-kb --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/executorch.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/executorch-kb .agents/skills/executorch-kb && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .agents/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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 pytorch/executorch --skill executorch-kb -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pytorch/executorch executorch-kb --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/executorch.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/executorch-kb .cursor/skills/executorch-kb && 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 "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .cursor/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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/pytorch/executorch.git --path .claude/skills/executorch-kb--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 pytorch/executorch --skill executorch-kb -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pytorch/executorch executorch-kb --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/executorch.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/executorch-kb .gemini/skills/executorch-kb && 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 "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .gemini/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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 pytorch/executorch executorch-kbInstalls 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 pytorch/executorch --skill executorch-kb -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pytorch/executorch.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/executorch-kb .github/skills/executorch-kb && 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 "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .github/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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 pytorch/executorch --skill executorch-kb -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pytorch/executorch executorch-kb --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/executorch.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/executorch-kb .opencode/skills/executorch-kb && 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 "executorch-kb" agent skill from https://github.com/pytorch/executorch/tree/main/.claude/skills/executorch-kb into .opencode/skills/executorch-kb/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "executorch-kb", 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.
executorch-kbAnswers ExecuTorch questions from a local wiki on backends, export pitfalls, quantization recipes, runtime errors and SoC compatibility.
This skill searches a knowledge base distilled from ExecuTorch GitHub issues and discussions. It covers the QNN, XNNPACK, Vulkan, CoreML, Arm and Cadence backends, model export, quantization, and troubleshooting. You call it with a query and the agent works from the repository's .wiki folder.
The flow has four steps. The agent reads the wiki index, picks the relevant articles from a topic table (for example QNN debugging, Ethos-U and TOSA for Arm, torch.export lowering, quantization accuracy, build failures or slow inference), reads the matching short rules file for that area, and then answers. If an internal-modes file exists in the wiki, the first word of the arguments can select one of those extra modes instead.
It is a lookup aid for people debugging ExecuTorch errors, choosing quantization configs, checking backend operator support, or asking about Qualcomm HTP, Snapdragon and Apple Neural Engine behavior.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 27d124f. 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.
Hosts in commands or code, which the agent is likely to contact:
docs.qualcomm.comapple.github.iodeveloper.arm.comgithub.comFrom 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.
ExecuTorch Knowledge Base loads about 1.3k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 515 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.
Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 515 words (~1,269 tokens).
“Synthesized from 2,200+ GitHub issues and 99 discussions. Covers backends (QNN, XNNPACK, Vulkan, CoreML, Arm, Cadence), export, quantization, and troubleshooting.”
Just SKILL.md in .claude/skills/executorch-kb of pytorch/executorch.
Open the folder on GitHubat commit 27d124f
ExecuTorch Knowledge Base 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 |
|---|---|---|---|---|---|---|
| ExecuTorch Knowledge Base this skillpytorch/executorch | 5.1k | — | ~1.3k | Automated safety check: Pass | Custom licence | |
| The Art of Debuggingstas00/the-art-of-debugging | 1.7k | — | ~6.1k | Automated safety check: Notes | CC-BY-SA-4.0 | |
| Fix Issuepytorch/pytorch | 104k | — | ~2.3k | Automated safety check: Pass | Custom licence | |
| Pt2 Bug Basherpytorch/pytorch | 104k | — | ~3.5k | Automated safety check: Pass | Custom licence | |
| Quark Torch Debugamd/Quark | 181 | — | ~1.9k | Automated safety check: Notes | MIT | |
| Ascendcascend-ai-coding/awesome-ascend-skills | 174 | — | ~3.5k | Automated safety check: Pass | None |
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/pytorch
Fix bugs reported in PyTorch GitHub issues by reproducing, root-causing, and implementing a fix in the local working tree.
pytorch/pytorch
Debug PyTorch 2 compiler stack failures including Dynamo graph breaks, Inductor codegen errors, AOTAutograd crashes, and accuracy mismatches.
amd/Quark
Diagnose failed Quark installation, PTQ execution, script generation, or export attempts.
ascend-ai-coding/awesome-ascend-skills
End-to-end AscendC custom operator development for Ascend NPU in an ascend-kernel (csrc/ops + build.sh + torchnpu PyTorch custom op) project.
Orchestra-Research/AI-Research-SKILLs
Shows how to organize PyTorch training with Lightning's LightningModule and Trainer, covering validation, DDP, callbacks and learning-rate scheduling.
pytorch/executorch
Measures and shrinks the ExecuTorch runtime binary by building a size test, analyzing it with bloaty and landing each reduction as its own pull request.
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.
pytorch/executorch
Developer guide for the Cortex-M (CMSIS-NN) backend in ExecuTorch: quantization pipeline, pass manager, tests and adding new ops.
pytorch/executorch
Reviews ExecuTorch pull requests or local branches for what CI cannot check, using a checklist, with an optional detailed line-by-line mode.
pytorch/executorch
Helps build, test and extend the Qualcomm AI Engine Direct (QNN) backend in ExecuTorch, with routes for new ops, model export, Buck-vs-CMake parity fixes and per-layer accuracy debugging.
pytorch/executorch
Sets up ExecuTorch as a Zephyr RTOS module, adds board support and debugs west build failures such as linker memory overflow on embedded boards.
Works with
Categories
Answers ExecuTorch questions from a local wiki on backends, export pitfalls, quantization recipes, runtime errors and SoC compatibility. This skill searches a knowledge base distilled from ExecuTorch GitHub issues and discussions. It covers the QNN, XNNPACK, Vulkan, CoreML, Arm and Cadence backends, model export, quantization, and troubleshooting.
ExecuTorch Knowledge Base fits situations like: debugging an ExecuTorch export or runtime error; choosing a quantization recipe for a specific backend; checking whether a backend supports a particular operator; looking up Qualcomm HTP or Snapdragon SoC compatibility.
Run `npx skills add pytorch/executorch --skill executorch-kb -a claude-code`. Or copy the skill folder (.claude/skills/executorch-kb in pytorch/executorch) into .claude/skills/executorch-kb in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pytorch/executorch --skill executorch-kb -a codex`. Or copy the skill folder (.claude/skills/executorch-kb in pytorch/executorch) into .agents/skills/executorch-kb 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 pytorch/executorch --skill executorch-kb -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/executorch-kb, .gemini/skills/executorch-kb, .github/skills/executorch-kb and .opencode/skills/executorch-kb in your project.
SKILL.md names no scripts, command-line tools or credentials: ExecuTorch Knowledge Base is instructions for the agent only. Our summary lists: A checkout of the ExecuTorch repository with its .wiki folder.
SKILL.md names 4 domains. In commands or code: docs.qualcomm.com, apple.github.io, developer.arm.com and github.com; the agent is likely to contact these when it follows the instructions. 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.
ExecuTorch Knowledge Base has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.
About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with ExecuTorch Knowledge Base: The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars), Fix Issue (pytorch/pytorch, 104k stars), Pt2 Bug Basher (pytorch/pytorch, 104k stars) and Quark Torch Debug (amd/Quark, 181 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pytorch (a GitHub organization) maintains it in pytorch/executorch, which has 5,081 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.
Source: pytorch/executorch on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.