Tensorrt Optimization
Use when the user asks about TensorRT, trtexec, ONNX to TensorRT engines, optimization profiles for dynamic shapes, FP8/INT8 engines, Polygraphy or TensorRT-LLM / trtllm-serve. Produces build commands, precision plan and benchmark plan. Not for choosing GPTQ/AWQ in depth (use extreme-quantization-mastery) or serving platforms (use ml-model-serving).
Install
npx skills add j4flmao/agent-skills --skill tensorrt-optimizationgit clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/hardware-acceleration/tensorrt-optimization ~/.claude/skills/tensorrt-optimizationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# TensorRT Optimization
## Purpose
TensorRT compiles a network (usually ONNX) into an engine optimized for one GPU model and TensorRT version: it fuses layers, selects the fastest kernel ("tactic") per layer, plans memory, and runs reduced precision where allowed. TensorRT-LLM builds on it for LLMs with in-flight batching, paged KV cache and quantized kernels. Gains are real but must be measured against the framework baseline at the target batch size.
## Agent Protocol
### Trigger
"tensorrt", "trt", "trtexec", "onnx to tensorrt", "engine build", "tensorrt-llm", "trtllm", "int8 calibration", "fp8 engine", "optimization profile", "dynamic shapes".
### Input Context
- Model + export path (PyTorch → ONNX opset), input shapes and their ranges.
- Target GPU, TensorRT / TensorRT-LLM version, latency vs throughput goal.
- Accuracy tolerance and evaluation set.
### Output Artifact
Build command/script + precision plan + benchmark plan. No file unless requested.
### Response Format
```
Engine: {precision} profile min/opt/max={shapes}
Build: {trtexec or Python command}
Benchmark: {latency p50/p99, throughput} vs baseline
Accuracy: {metric delta}
```
### Completion Criteria
- [ ] ONNX validated (onnx checker / Polygraphy) and outputs match the framework within tolerance.
- [ ] Engine built on the same GPU model + TensorRT version used in production.
- [ ] Dynamic shape profile covers real traffic; `opt` set to the most common shape.Details
- Skill name
tensorrt-optimization- Repository
- j4flmao/agent-skills
- Path
skills/hardware-acceleration/tensorrt-optimization/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Tensorrt Optimization skill do?
Use when the user asks about TensorRT, trtexec, ONNX to TensorRT engines, optimization profiles for dynamic shapes, FP8/INT8 engines, Polygraphy or TensorRT-LLM / trtllm-serve. Produces build commands, precision plan and benchmark plan. Not for choosing GPTQ/AWQ in depth (use extreme-quantization-mastery) or serving platforms (use ml-model-serving).
How do I install the Tensorrt Optimization skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill tensorrt-optimization. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Tensorrt Optimization popular?
It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.
Related skills
Agent Observability
45j4flmao/agent-skills
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
AI Agent Architectures
45j4flmao/agent-skills
Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).
AI Agent Core Loop
45j4flmao/agent-skills
Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).
Tool Calling Principles
45j4flmao/agent-skills
Use when the user asks about tool calling, function calling, tool schemas, tool_use / tool_result, strict structured outputs, an agent picking the wrong tool or tool error handling. Produces JSON Schema tool definitions, validated handlers with teaching errors, idempotency and a permission matrix. Not for the agent loop (use ai-agent-core-loop) or REST API design (use backend-api-design).
Project Init
45j4flmao/agent-skills
Use when the user asks to scaffold a project, create the project structure, initialize a new repo from scratch, set up folders and config files or generate AGENTS.md. Scaffolds the directory tree and starter config for the detected or stated stack. Not for onboarding people (use core-onboarding) or dev containers (use dev-loop-dev-container).
Triton Kernels
45j4flmao/agent-skills
Use when the user asks about OpenAI Triton kernels, @triton.jit, tl.load, tl.dot, triton.autotune, fused kernels in Python or torch.compile Inductor kernels. Produces a kernel, PyTorch wrapper, correctness test and do_bench benchmark. Not for Triton Inference Server (use ml-model-serving) or CUDA C++ (use cuda-programming).
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.