Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/NVIDIA-NeMo/Megatron-Bridgenpx agentmods add skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs)<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/megatron-bridge/nemo-mbridge-perf-cuda-graphs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Prompt Injection · line 13 Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
- medium Agent Snooping · line 316 Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00057 | $0.03737 |
| Opus 5 | $0.00028 | $0.01869 |
| Sonnet 5 | $0.00011 | $0.00747 |
| Haiku 4.5 | $0.00006 | $0.00374 |
Grade C, and why
nemo-mbridge-perf-cuda-graphs scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- NVSkills CI refresh: 2026-06-15. No instruction changes. --> This is a copy
91% identical to nemo-mbridge-perf-cuda-graphs — 24 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 359 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CUDA Graphs
Stable documentation: @docs/training/cuda-graphs.md Card: @skills/nemo-mbridge-perf-cuda-graphs/card.yaml
What It Is
CUDA graphs capture GPU operations once and replay them with minimal host-driver overhead. Bridge supports two implementations:
cuda_graph_impl |
Mechanism | Scope support |
|---|---|---|
"local" |
MCore FullCudaGraphWrapper wrapping entire fwd+bwd |
full_iteration |
"transformer_engine" |
TE make_graphed_callables() per layer |
attn, mlp, moe, moe_router, moe_preprocess, mamba |
Quick Decision
First confirm a profile shows material host/launch gaps. Then test the narrowest TE-scoped graph candidate and verify replay timing against eager on the same dispatcher, layout, routing, precision, and container:
- dense models:
attn, then optionallymlp - dropless MoE:
moe_router moe_preprocess, then optionallyattn - VLMs: the same dropless-MoE scope, but only after the real-data path is stable
Use local + full_iteration only when you specifically want full-iteration
capture and can satisfy the tighter constraints.
For recompute-heavy workloads:
- TE-scoped graphs pair naturally with selective recompute
- full recompute usually pushes you toward
localfull-iteration graphs or away from graphs entirely
Related docs:
- @docs/training/cuda-graphs.md
- @docs/training/activation-recomputation.md
Enablement
Local full-iteration graph
cfg.model.cuda_graph_impl = "local"
cfg.model.cuda_graph_scope = ["full_iteration"]
cfg.model.cuda_graph_warmup_steps = 3
cfg.model.use_te_rng_tracker = True
cfg.rng.te_rng_tracker = True
cfg.rerun_state_machine.check_for_nan_in_loss = False
cfg.ddp.check_for_nan_in_grad = False
TE scoped graph (dense model)
cfg.model.cuda_graph_impl = "transformer_engine"
cfg.model.cuda_graph_scope = ["attn"] # or ["attn", "mlp"]
cfg.model.cuda_graph_warmup_steps = 3
cfg.model.use_te_rng_tracker = True
cfg.rng.te_rng_tracker = True
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 359 lines · 57 tokens per session scan C 3eb297f3d421
nemo-mbridge-perf-cuda-graphs is a skill published in the GitHub repository NVIDIA-NeMo/Megatron-Bridge (906 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 3,737 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). It is 91% identical to nemo-mbridge-perf-cuda-graphs, differing in 24 lines, and is treated as a copy.
Other skills, from other repositories
spark-optimization
Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.
notebooklm
Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…
debug-inference
Debug inference clients that use an attached provider and its native endpoint, including hosted APIs and host-local Ollama, vLLM, SGLang, TRT-LLM, LM Studio, or NIM. Use for provider attachment, endpoint policy, credential substitution, topology, and migration from the removed inference.local endpoint. Trigger…
oh-my-posh
Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.
eagle3-triage
Triage a failed EAGLE3 pipeline run. Identifies which step failed (data synthesis, hidden state dump, training, or benchmark), diagnoses root cause from logs, and suggests fixes. Use when user reports an EAGLE3 pipeline failure or asks why a specific step failed. Also helps debug new model support issues.
trulens-instrumentation
Instrument LLM apps with TruLens OTEL-based tracing - from setup to debugging and optimization.