Agent skill

Compilation And Export

by VectorSpaceLab in VectorSpaceLab/AREX-Skill

Use this sub-skill for Torch-TensorRT model compilation, dynamic input planning, torch.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting.

BSD-3-ClauseAuto-check passedAI & LLM Engineering

Install Compilation And Export

skills CLI
$ npx skills add VectorSpaceLab/AREX-Skill --skill compilation-and-export -a claude-code

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

GitHub CLI
$ gh skill install VectorSpaceLab/AREX-Skill compilation-and-export --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/VectorSpaceLab/AREX-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repositories/repo-skills/torch-tensorrt/sub-skills/compilation-and-export .claude/skills/compilation-and-export && 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
compilation-and-export
GitHub stars
328
Token cost
~1.3k tokens
SKILL.md length
448 words
Files
7 (incl. scripts, references)
Skills in repo
157
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Use this sub-skill for Torch-TensorRT model compilation, dynamic input planning, torch.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting.

  • Works in 6 steps: Verify install/features with the root… → Put the model in eval mode and move… → Decide static or dynamic inputs. For… → …
  • Tasks that involve LLM inference and serving
  • SKILL.md covers First decision: compile route, Minimum safe workflow, API/reference routing and Common patterns, plus 1 more section
  • Runs Python scripts from its folder

What it does

Compilation And Export is an agent skill from VectorSpaceLab/AREX-Skill. Use this sub-skill for Torch-TensorRT model compilation, dynamic input planning, torch.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/api-reference.md`, `references/dynamic-shapes-and-inputs.md` and `references/serialization-and-engines.md`).

It sits in AI & LLM Engineering, covering LLM inference and serving. It works with NVIDIA AI Platform and PyTorch. The repository describes itself as: A Skill Library for Automated Machine Learning. The licence is BSD-3-Clause.

When your agent uses it

  • Tasks that involve LLM inference and serving

Example prompts

  • “/compilation-and-export”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Verify install/features with the root environment probe if the environment is unknown.
  2. Put the model in eval mode and move model plus representative inputs to CUDA.
  3. Decide static or dynamic inputs. For dynamic shapes, create torch_tensorrt.Input(min_shape=..., opt_shape=..., max_shape=..., dtype=...)…
  4. Start with FP32 or FP16 only after checking numerical tolerance expectations. Avoid INT8/FP8/FP4 until ModelOpt or calibration…
  5. Compile a small representative shape, run the compiled output and PyTorch output, and compare with torch.testing.assert_close at…
  6. Save only after execution works. Choose .ep, .ts, .pt2, .engine, or .pte from the artifact matrix.

What it can do on your machine

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

    Ships 1 file in scripts/ (Python), which the agent can run.

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

  • Network

    No URLs in SKILL.md.

    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

Compilation And Export loads about 1.3k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 51 tokens; SKILL.md has 448 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from VectorSpaceLab/AREX-Skill at commit ac3fe1a, republished under its BSD-3-Clause licence (© VectorSpaceLab). 448 words, ~1,291 tokens.

Download SKILL.mdSave it as .claude/skills/compilation-and-export/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
compilation-and-export
description
Use this sub-skill for Torch-TensorRT model compilation, dynamic input planning, torch.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting.
metadata.disco-role
operating
disable-model-invocation
true
license
BSD 3-Clause

Torch-TensorRT Compilation and Export

Use this sub-skill when the user wants to turn a PyTorch model into a TensorRT-backed callable module or deployable artifact.

First decision: compile route

User situationRecommended route
Wants a one-line experiment or easy integration with PyTorch 2.xtorch.compile(model, backend="torch_tensorrt") or backend="tensorrt" with options.
Wants ahead-of-time control, explicit inputs, and a Python-callable compiled moduletorch_tensorrt.compile(model, ir="dynamo", inputs=[...]).
Already uses torch.export, needs dynamic shape control, or wants raw engine exporttorch.export.export(...) then torch_tensorrt.dynamo.compile(...) or convert_exported_program_to_serialized_trt_engine(...).
Needs legacy TorchScript or C++ .ts artifactsUse only if ENABLED_FEATURES.torchscript_frontend and runtime libraries are present; otherwise route to deployment/build guidance.
Needs to understand coverage before compilingUse dryrun, require_full_compilation, torch_executed_ops, and min_block_size; route debugging details to extensibility/debugging.

Read references/workflows.md for full recipes and route selection.

Minimum safe workflow

  1. Verify install/features with the root environment probe if the environment is unknown.
  2. Put the model in eval mode and move model plus representative inputs to CUDA.
  3. Decide static or dynamic inputs. For dynamic shapes, create torch_tensorrt.Input(min_shape=..., opt_shape=..., max_shape=..., dtype=...) and align any torch.export dynamic dimensions.
  4. Start with FP32 or FP16 only after checking numerical tolerance expectations. Avoid INT8/FP8/FP4 until ModelOpt or calibration prerequisites are explicit.
  5. Compile a small representative shape, run the compiled output and PyTorch output, and compare with torch.testing.assert_close at task-appropriate tolerances.
  6. Save only after execution works. Choose .ep, .ts, .pt2, .engine, or .pte from the artifact matrix.
Show full SKILL.md (215 more words)Show less

API/reference routing

  • Read references/api-reference.md for public signatures and setting categories.
  • Read references/dynamic-shapes-and-inputs.md for Input, Device, torch.export dynamic shapes, shared_dims, and multiple optimization profiles.
  • Read references/serialization-and-engines.md before saving/loading, extracting raw engines, cross-compiling for Windows, or choosing deployment artifacts.
  • Read references/troubleshooting.md for compile errors, graph breaks, unsupported ops, dynamic-shape errors, precision mismatches, and runtime library surprises.
  • Run scripts/compile_probe.py --help to inspect the bundled tiny compile/dryrun helper. Run it with --compile only when a compatible CUDA/TensorRT environment is available.

Common patterns

JIT-style torch.compile
python
import torch
import torch_tensorrt

model = MyModel().eval().cuda()
optimized = torch.compile(
    model,
    backend="torch_tensorrt",
    options={"enabled_precisions": {torch.float16}, "min_block_size": 3},
)
out = optimized(torch.randn(1, 3, 224, 224, device="cuda"))  # first call compiles

Use this when the user wants to keep PyTorch calling semantics and does not need a saved artifact immediately.

Ahead-of-time Dynamo compile
python
import torch
import torch_tensorrt

model = MyModel().eval().cuda()
inputs = [torch_tensorrt.Input((1, 3, 224, 224), dtype=torch.float32)]
compiled = torch_tensorrt.compile(model, ir="dynamo", inputs=inputs)

Use explicit Input objects for reusable code and dynamic shapes; use real tensors when the model is static and simple.

Export first, compile second
python
import torch
import torch_tensorrt

model = MyModel().eval().cuda()
example = (torch.randn(4, 128, device="cuda"),)
batch = torch.export.Dim("batch", min=1, max=16)
exported = torch.export.export(model, example, dynamic_shapes={"x": {0: batch}})
compiled = torch_tensorrt.dynamo.compile(
    exported,
    inputs=[torch_tensorrt.Input(min_shape=(1, 128), opt_shape=(4, 128), max_shape=(16, 128))],
)

Use this when export constraints, dynamic shape names, or artifact packaging matter.

Guardrails

  • Do not promise CPU fallback as a substitute for TensorRT verification. Torch-TensorRT compilation is a CUDA/TensorRT workflow.
  • Do not treat source examples as runtime dependencies. Write task-local code or use bundled scripts.
  • If the user needs unsupported-op triage, route to ../extensibility-and-debugging/SKILL.md after collecting a dryrun/debugger result.
  • If the user needs runtime speedups, route to ../runtime-optimization/SKILL.md after compile correctness is established.
  • If the user asks where to run the artifact, route to ../deployment-and-distributed/SKILL.md before choosing save format.

© VectorSpaceLab, BSD-3-Clause. 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 6 other files (scripts, references) in skills/repositories/repo-skills/torch-tensorrt/sub-skills/compilation-and-export of VectorSpaceLab/AREX-Skill.

  • SKILL.md
  • references/api-reference.md
  • references/dynamic-shapes-and-inputs.md
  • references/serialization-and-engines.md
  • references/troubleshooting.md
  • references/workflows.md
  • scripts/compile_probe.py

Open the folder on GitHubat commit ac3fe1a

Compare with similar skills

Compilation And Export 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.

Compilation And Export compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Compilation And Export this skillVectorSpaceLab/AREX-Skill328—~1.3kAutomated safety check: PassBSD-3-Clause
Graphsignalgraphsignal/graphsignal257—~6.2kAutomated safety check: PassApache-2.0
Llama CppOrchestra-Research/AI-Research-SKILLs13k4 repos~1.5kAutomated safety check: PassMIT
Quark Env Preflightamd/Quark181—~1.4kAutomated safety check: PassMIT
Spark Environment Setupwshobson/agents40k—~2kAutomated safety check: PassMIT
Jetson PackageNVIDIA/skills3.5k1 repos~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.2k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Llama Cpp

    Orchestra-Research/AI-Research-SKILLs

    Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware.

    13k GitHub starsUsed in 4 repos~1.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

    181 GitHub stars~1.4k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13).

    40k GitHub stars~2k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Jetson Package

    NVIDIA/skills

    Official

    Pick Jetson-compatible containers, vLLM runtime images, and Jetson AI Lab PyPI indexes; maps Orin SM 8.7 vs Thor SM 11.0 and JetPack-specific package choices.

    3.5k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Tao Finetune Clip

    NVIDIA/skills

    Official

    CLIP vision-language model for image-text retrieval, zero-shot classification, embedding extraction, ONNX export, and TensorRT deployment.

    3.5k GitHub stars~4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes

More from VectorSpaceLab/AREX-Skill

All 157 skills in this repo
  • Agent Lightning

    VectorSpaceLab/AREX-Skill

    Use this repo skill for Agent Lightning package tasks: authoring trainable agents, tracing rewards and spans, running LightningStore/Trainer loops, using agl CLI services, choosing examples, and…

    328 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Agent Tools

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when configuring LiteLLM for MCP tools, A2A agents, Claude Code/Cursor agent gateway traffic, MCP auth/OAuth, tool permissions, semantic filtering, or agent-specific proxy…

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Awel

    VectorSpaceLab/AREX-Skill

    Build and debug DB-GPT agents, tools, skills, teams, and AWEL workflows, including deterministic local DAG runs and HTTP-trigger topology without assuming an LLM, credential, or external service.

    328 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Middleware

    VectorSpaceLab/AREX-Skill

    Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents Workflows

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for giskard.agents async chat workflows, tools, prompt templates, structured outputs, retries, rate limiting, embeddings, and optional LiteLLM backend.

    328 GitHub stars~500 tokensUpdated 1 mo ago
    Auto-check passed
  • Alphafold3

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Compilation And Export

What does Compilation And Export do?

Use this sub-skill for Torch-TensorRT model compilation, dynamic input planning, torch.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting. Compilation And Export is an agent skill from VectorSpaceLab/AREX-Skill.export workflows, save/load formats, raw TensorRT engines, and compile-time troubleshooting.

When should I use Compilation And Export?

Compilation And Export fits situations like: tasks that involve LLM inference and serving.

How do I install Compilation And Export in Claude Code?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill compilation-and-export -a claude-code`. Or copy the skill folder (skills/repositories/repo-skills/torch-tensorrt/sub-skills/compilation-and-export in VectorSpaceLab/AREX-Skill) into .claude/skills/compilation-and-export in your project. Claude Code loads it when a task matches its description.

How do I install Compilation And Export in Codex?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill compilation-and-export -a codex`. Or copy the skill folder (skills/repositories/repo-skills/torch-tensorrt/sub-skills/compilation-and-export in VectorSpaceLab/AREX-Skill) into .agents/skills/compilation-and-export in your project. Codex loads it when a task matches its description.

Can I use Compilation And Export 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 VectorSpaceLab/AREX-Skill --skill compilation-and-export -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/compilation-and-export, .gemini/skills/compilation-and-export, .github/skills/compilation-and-export and .opencode/skills/compilation-and-export in your project.

What does Compilation And Export need to run?

Going by SKILL.md and its folder, Compilation And Export needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Compilation And Export access the network?

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.

Is Compilation And Export 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Compilation And Export use?

Compilation And Export is published under the BSD-3-Clause licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Compilation And Export use?

About 1.3k tokens (SKILL.md is roughly 5.2k 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 6.1k tokens, read only when the agent opens those files.

What are the alternatives to Compilation And Export?

Skills that share tags, products or a category with Compilation And Export: Graphsignal (graphsignal/graphsignal, 257 stars), Llama Cpp (Orchestra-Research/AI-Research-SKILLs, 13k stars), Quark Env Preflight (amd/Quark, 181 stars) and Spark Environment Setup (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Compilation And Export?

VectorSpaceLab (a GitHub organization) maintains it in VectorSpaceLab/AREX-Skill, which has 328 GitHub stars. The repository holds 157 skills in this directory. The repository was last updated on September 3, 2026.

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