Agent skill

Runtime Optimization

by VectorSpaceLab in VectorSpaceLab/AREX-Skill

Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark…

BSD-3-ClauseAuto-check passedAI & LLM Engineering

Install Runtime Optimization

skills CLI
$ npx skills add VectorSpaceLab/AREX-Skill --skill runtime-optimization -a claude-code

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

GitHub CLI
$ gh skill install VectorSpaceLab/AREX-Skill runtime-optimization --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/runtime-optimization .claude/skills/runtime-optimization && 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
runtime-optimization
GitHub stars
328
Token cost
~1k tokens
SKILL.md length
399 words
Files
7 (incl. scripts, references)
Skills in repo
159
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark…

  • Works in 4 steps: Confirm the compiled module produces… → Verify torch_tensorrt.ENABLED_FEATURES;… → Benchmark with warmups and CUDA… → …
  • Tasks that involve LLM inference and serving
  • SKILL.md covers Start with correctness and…, Route by runtime need, Main workflows and Guardrails
  • Runs Python scripts from its folder

What it does

Runtime Optimization is an agent skill from VectorSpaceLab/AREX-Skill. Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark triage.

Its SKILL.md is about 1k 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/performance-and-memory.md` and `references/troubleshooting.md`).

It sits in AI & LLM Engineering, covering LLM inference and serving. It works with NVIDIA AI Platform and CUDA. 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

  • “/runtime-optimization”

Requirements

  • Python 3

Workflow steps

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

  1. Confirm the compiled module produces correct outputs for representative inputs.
  2. Verify torch_tensorrt.ENABLED_FEATURES; runtime APIs are gated by standard TensorRT vs TensorRT-RTX and by whether C++ runtime libraries…
  3. Benchmark with warmups and CUDA synchronization/events. Do not time only the first call, because it may include engine build, lazy…
  4. Use references/performance-and-memory.md for memory/latency triage before changing many knobs at once.

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 2 files 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

Runtime Optimization loads about 1k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 399 words of instructions outside code blocks.

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

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). 399 words, ~1,048 tokens.

Download SKILL.mdSave it as .claude/skills/runtime-optimization/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
runtime-optimization
description
Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark triage.
metadata.disco-role
operating
disable-model-invocation
true
license
BSD 3-Clause

Torch-TensorRT Runtime Optimization

Use this sub-skill after a model compiles, or when a user asks about runtime latency, memory, caches, CUDA Graphs, output buffers, TensorRT-RTX settings, mutable modules, refit, or benchmark methodology.

Start with correctness and observability

  1. Confirm the compiled module produces correct outputs for representative inputs.
  2. Verify torch_tensorrt.ENABLED_FEATURES; runtime APIs are gated by standard TensorRT vs TensorRT-RTX and by whether C++ runtime libraries are present.
  3. Benchmark with warmups and CUDA synchronization/events. Do not time only the first call, because it may include engine build, lazy initialization, or TensorRT-RTX JIT work.
  4. Use references/performance-and-memory.md for memory/latency triage before changing many knobs at once.

Route by runtime need

User goalRead/run
Apply CUDA Graphs, output allocator, preallocated outputs, weight streaming, runtime config, or TensorRT-RTX settingsreferences/workflows.md
Need exact runtime API names and signaturesreferences/api-reference.md
Diagnose high latency, OOM, compile/runtime cache behavior, dynamic shape profile choice, or benchmark designreferences/performance-and-memory.md
Debug runtime errors, cache/load failures, CUDAGraph invalidation, allocator issues, or RTX-only setting surprisesreferences/troubleshooting.md
Need a safe script to inspect runtime feature availabilityscripts/runtime_feature_probe.py --help
Need a benchmarking templatescripts/benchmark_latency_template.py --help

Main workflows

CUDA Graphs

Use CUDA Graphs only after shapes and memory addresses are stable enough for capture.

python
from torch_tensorrt import runtime

with runtime.enable_cudagraphs(compiled) as graph_module:
    for _ in range(10):
        _ = graph_module(*example_inputs)

For TensorRT-RTX, CUDA graph strategy may also be set through RuntimeSettings or runtime_config.

TensorRT-RTX runtime settings
python
from torch_tensorrt.runtime import RuntimeSettings

compiled.runtime_settings = RuntimeSettings(
    runtime_cache="trt_rtx_cache.bin",
    dynamic_shapes_kernel_specialization_strategy="eager",
    cuda_graph_strategy="whole_graph_capture",
)

These fields are no-ops or unavailable outside TensorRT-RTX. Apply settings before first execution when the execution context is lazily created.

Show full SKILL.md (163 more words)Show less
Engine and timing caches

Use compile-time timing_cache_path, cache_built_engines, reuse_cached_engines, engine_cache_dir, and engine_cache_size when repeated builds or dynamic variants dominate latency. Cache paths should be writable, stable for the workload, and isolated per incompatible model/settings pair.

Mutable modules and refit

Use MutableTorchTensorRTModule or refit_module_weights when weights change and recompiling every time would be expensive. Compile with immutable_weights=False when refit/mutability is required.

Weight streaming and resource controls

Use weight streaming, offload_module_to_cpu, resource partitioning, or smaller max dynamic shapes for memory pressure. Validate latency after each change; some memory-saving settings trade off performance.

Guardrails

  • Runtime settings do not fix unsupported operators; route unsupported-op work to ../extensibility-and-debugging/SKILL.md.
  • Cache hits are only valid for compatible engine settings, target device properties, TensorRT versions, and model weights where applicable.
  • CUDA Graph capture can fail when input shapes, allocation patterns, data-dependent behavior, or unsupported operations change between captures.
  • Do not promise TensorRT-RTX cache/strategy behavior in a standard TensorRT build.
  • Do not promise C++ runtime or TorchScript behavior from a Python-only wheel.

© 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/runtime-optimization of VectorSpaceLab/AREX-Skill.

  • SKILL.md
  • references/api-reference.md
  • references/performance-and-memory.md
  • references/troubleshooting.md
  • references/workflows.md
  • scripts/benchmark_latency_template.py
  • scripts/runtime_feature_probe.py

Open the folder on GitHubat commit ac3fe1a

Compare with similar skills

Runtime Optimization 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.

Runtime Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Runtime Optimization this skillVectorSpaceLab/AREX-Skill328—~1kAutomated safety check: PassBSD-3-Clause
Graphsignalgraphsignal/graphsignal257—~6.2kAutomated safety check: PassApache-2.0
LLM Torch Profiler Trace AnalysisBBuf/AI-Infra-Auto-Driven-SKILLS900—~2.8kAutomated safety check: PassNone
Llama CppOrchestra-Research/AI-Research-SKILLs13k4 repos~1.5kAutomated safety check: PassMIT
Vllm Deploy Simplevllm-project/vllm-skills103—~1.6kAutomated safety check: PassApache-2.0
Quark Env Preflightamd/Quark181—~1.4kAutomated safety check: PassMIT

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 9 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Torch Profiler Trace Analysis

    BBuf/AI-Infra-Auto-Driven-SKILLS

    Analyzes Torch Profiler traces from SGLang, vLLM and TensorRT-LLM servers into kernel attribution, overlap and fusion tables.

    900 GitHub stars~2.8k tokensUpdated 2 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
  • Vllm Deploy Simple

    vllm-project/vllm-skills

    Quick install and deploy vLLM, start serving with a simple LLM, and test OpenAI API.

    103 GitHub stars~1.6k tokensUpdated 6 mo ago
    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 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Vllm Deploy Docker

    vllm-project/vllm-skills

    Deploy vLLM using Docker (pre-built images or build-from-source) with NVIDIA GPU support and run the OpenAI-compatible server.

    103 GitHub stars~2.5k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check: notes

More from VectorSpaceLab/AREX-Skill

All 159 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 Runtime Optimization

What does Runtime Optimization do?

Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark…. Runtime Optimization is an agent skill from VectorSpaceLab/AREX-Skill. Use this sub-skill for Torch-TensorRT runtime performance controls, CUDA Graphs, output allocation, caches, TensorRT-RTX runtime settings, mutable modules, refit, weight streaming, and benchmark triage.

When should I use Runtime Optimization?

Runtime Optimization fits situations like: tasks that involve LLM inference and serving.

How do I install Runtime Optimization in Claude Code?

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

How do I install Runtime Optimization in Codex?

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

Can I use Runtime Optimization 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 runtime-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/runtime-optimization, .gemini/skills/runtime-optimization, .github/skills/runtime-optimization and .opencode/skills/runtime-optimization in your project.

What does Runtime Optimization need to run?

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

Does Runtime Optimization 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 Runtime Optimization 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 Runtime Optimization use?

Runtime Optimization 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 Runtime Optimization use?

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

What are the alternatives to Runtime Optimization?

Skills that share tags, products or a category with Runtime Optimization: Graphsignal (graphsignal/graphsignal, 257 stars), LLM Torch Profiler Trace Analysis (BBuf/AI-Infra-Auto-Driven-SKILLS, 900 stars), Llama Cpp (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Vllm Deploy Simple (vllm-project/vllm-skills, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Runtime Optimization?

VectorSpaceLab (a GitHub organization) maintains it in VectorSpaceLab/AREX-Skill, which has 328 GitHub stars. The repository holds 159 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.