Agent skill

ExecuTorch Build Guide

by pytorch in 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.

Custom licenceAuto-check: notesDevelopment

Install ExecuTorch Build Guide

skills CLI
$ npx skills add pytorch/executorch --skill building -a claude-code

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

GitHub CLI
$ gh skill install pytorch/executorch building --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/pytorch/executorch.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/building .claude/skills/building && 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
building
GitHub stars
5.1k
Token cost
~2.3k tokens
SKILL.md length
703 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Custom licence

At a glance

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

  • Works in 2 steps: Ensure Python environment (detect and… → Build
  • Compiling ExecuTorch from source for the first time
  • SKILL.md covers Step 1: Ensure Python…, Step 2: Build, Key build options and Troubleshooting, plus 2 more sections
  • Calls cmake, conda and git

What it does

Environment setup comes first. The agent prefers conda and falls back to a venv with a supported Python version (3.10 to 3.14), then checks the python and cmake versions and repairs them automatically, for example by installing a newer cmake into the environment when the existing one is older than 3.24.

It then routes by what you ask for: Android or iOS go to cross-compilation, a model name such as llama or whisper goes to the model runner path with make targets, C++ runtime or cmake requests go to the standalone runtime build, and anything else gets the default editable Python install through install_executorch.sh. Extra backends such as CoreML and Vulkan are switched on through CMAKE_ARGS, rebuilds can use pip install -e without build isolation, and a one-line Python import checks the result.

When your agent uses it

  • Compiling ExecuTorch from source for the first time
  • Diagnosing a failing ExecuTorch build
  • Cross-compiling ExecuTorch for Android or iOS
  • Building a model runner such as llama with a CPU or CUDA backend

Example prompts

  • “Build ExecuTorch from source with an editable Python install.”
  • “Set up the iOS frameworks build for ExecuTorch.”
  • “My ExecuTorch build fails on cmake. Fix the environment and rebuild.”

Requirements

  • conda or a Python venv with Python 3.10 to 3.14
  • cmake 3.24 or newer

Workflow steps

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

  1. Ensure Python environment (detect and fix automatically)
  2. Build

What it can do on your machine

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

    • cmake
    • conda
    • git
    • pip
    • make
    • python
    • sh
    • apt
    • brew

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

  • Network

    No URLs in SKILL.md. Its commands use git and pip, 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

ExecuTorch Build Guide loads about 2.3k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 703 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:186
    | Missing `Python.h` (Linux) | `sudo apt install python3.X-dev` |

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 703 words (~2,269 tokens).

name
building

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/building of pytorch/executorch.

Open the folder on GitHubat commit 852b1ff

Compare with similar skills

ExecuTorch Build Guide 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.

ExecuTorch Build Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ExecuTorch Build Guide this skillpytorch/executorch5.1k—~2.3kAutomated safety check: NotesCustom licence
Ako4allTongmingLAIC/AKO4ALL369—~4kAutomated safety check: PassMIT
Paddle Op DevPaddlePaddle/Paddle24k—~1.3kAutomated safety check: PassApache-2.0
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0
AI ReviewPaddlePaddle/Paddle24k—~303Automated safety check: PassApache-2.0
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0

Similar skills

  • Ako4all

    TongmingLAIC/AKO4ALL

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

    369 GitHub stars~4k tokensUpdated 23 days ago
    AI & LLM EngineeringAuto-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 8 days ago
    AI & LLM EngineeringAuto-check passed
  • 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.

    1.7k GitHub stars~6.1k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • AI Review

    PaddlePaddle/Paddle

    使用 PaddlePaddle 仓库规则评审 Pull Request 和全仓库代码变更,覆盖正确性、兼容性、算子、分布式、数值、性能、安全、测试、构建和 PR 信息。当需要审查 Paddle 的代码、测试、算子 YAML、C++/CUDA/XPU kernel、Python API、分布式逻辑或 CI 配置时使用。

    24k GitHub stars~303 tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Paddle Build

    PaddlePaddle/Paddle

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

    24k GitHub stars~1k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed
  • Embedded AI Deployment

    matlab/agent-skills-playground

    Deploy AI models to embedded hardware using MathWorks tools (MATLAB, Simulink, Embedded Coder).

    181 GitHub starsUsed in 1 repo~3.4k tokens
    AI & LLM EngineeringAuto-check passed

More from pytorch/executorch

All 10 skills in this repo
  • 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.

    5.1k GitHub stars~793 tokensUpdated today
    Auto-check passed
  • ExecuTorch Cortex-M Backend

    pytorch/executorch

    Developer guide for the Cortex-M (CMSIS-NN) backend in ExecuTorch: quantization pipeline, pass manager, tests and adding new ops.

    5.1k GitHub stars~872 tokensUpdated today
    Auto-check passed
  • ExecuTorch Knowledge Base

    pytorch/executorch

    Answers ExecuTorch questions from a local wiki on backends, export pitfalls, quantization recipes, runtime errors and SoC compatibility.

    5.1k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • ExecuTorch PR Review

    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.

    5.1k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • 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.

    5.1k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • ExecuTorch on Zephyr

    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.

    5.1k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about ExecuTorch Build Guide

What does ExecuTorch Build Guide do?

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

When should I use ExecuTorch Build Guide?

ExecuTorch Build Guide fits situations like: compiling ExecuTorch from source for the first time; diagnosing a failing ExecuTorch build; cross-compiling ExecuTorch for Android or iOS; building a model runner such as llama with a CPU or CUDA backend.

How do I install ExecuTorch Build Guide in Claude Code?

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

How do I install ExecuTorch Build Guide in Codex?

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

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

What does ExecuTorch Build Guide need to run?

Going by SKILL.md and its folder, ExecuTorch Build Guide needs the command-line tools its instructions call (cmake, conda, git, pip, make and python). Our summary lists: conda or a Python venv with Python 3.10 to 3.14; cmake 3.24 or newer.

Does ExecuTorch Build Guide access the network?

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

Is ExecuTorch Build Guide safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does ExecuTorch Build Guide use?

ExecuTorch Build Guide has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does ExecuTorch Build Guide use?

About 2.3k tokens (SKILL.md is roughly 9.1k 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 ExecuTorch Build Guide?

Skills that share tags, products or a category with ExecuTorch Build Guide: Ako4all (TongmingLAIC/AKO4ALL, 369 stars), Paddle Op Dev (PaddlePaddle/Paddle, 24k stars), The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars) and AI Review (PaddlePaddle/Paddle, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains ExecuTorch Build Guide?

pytorch (a GitHub organization) maintains it in pytorch/executorch, which has 5,082 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 8, 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.