export — Claude Code skill: what it does, how to install
export — a Claude Code skill that converts PyTorch models into .pte format for ExecuTorch and generates edge deployment artifacts.
BSD-3-Clause 21 installs ★ 5,187 updated 2026-10-29
npx skills add pytorch/executorch --skill export -a claude-codeWhat export does
This skill coordinates PyTorch model conversion to the ExecuTorch runtime format via graph transformation and lowering pipelines. It includes paths for specific architectures like Llama and Whisper using dedicated scripts from the repository.
Debugging options cover non-strict mode exports and log aggregation via tlparse combined with Dynamo logs. Working with the skill requires a Python environment with PyTorch and the executorch package installed.
What it helps with
- convert a PyTorch model to .pte format
- run model-specific export scripts for Llama or Whisper
- export models with strict equals false for debugging
- parse export and dynamo logs using tlparse
Example prompts for the agent
- Export the loaded PyTorch model to a .pte file for ExecuTorch
- Run the export script for Llama from the examples directory
- Debug export issues by piping logs into tlparse
How to install export
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill export -a claude-code2Manually: put the files in place
~/.claude/skills/export/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/export/
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill export -a codex2Manually: put the files in place
.agents/skills/export/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill export -a cursor2Manually: put the files in place
.cursor/skills/export/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pytorch/executorch .claude/skills/export2Manually: put the files in place
.github/skills/export/SKILL.md1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill export -a gemini-cli2Platform CLI
gemini skills install https://github.com/pytorch/executorch --path .claude/skills/exportManually: put the files in place
.devin/skills/export/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pytorch/executorch --skill export -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about export
How to install export in Claude Code?
Run npx skills add pytorch/executorch --skill export -a claude-code in your terminal.
What does export do?
It translates PyTorch models into .pte binaries for ExecuTorch, providing scripts and debugging patterns for edge lowering.
What is needed to use export?
You need Python, PyTorch, and the executorch library installed in your environment.
Source text
SKILL.md · BSD-3-Clause
---
name: export
description: Export a PyTorch model to .pte format for ExecuTorch. Use when converting models, lowering to edge, or generating .pte files.
---
# Export
## Basic pattern
```python
from executorch.exir import to_edge_transform_and_lower
from torch.export import export
exported = export(model.eval(), example_inputs)
edge = to_edge_transform_and_lower(exported)
with open("model.pte", "wb") as f:
f.write(edge.to_executorch().buffer)
```
## Model-specific scripts
| Model | Script |
|-------|--------|
| Llama | `examples/models/llama/export_llama.py` |
| Whisper | `examples/models/whisper/` |
| Parakeet | `examples/models/parakeet/export_parakeet_tdt.py` |
## Debugging
- Draft export: `export(model, inputs, strict=False)`
- tlparse: `TORCH_LOGS="+dynamo,+export" python script.py 2>&1 | tlparse`
## Guides
- [torch.export basics](guides/torch-export.md) — `torch.export.export()`, dynamic shapes, strict mode, debugging
© pytorch · BSD-3-Clause · pytorch/executorch