gindachen/nsys-ai/commands
Claude Code and agent skill by gindachen/nsys-ai
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install gindachen/nsys-ai/commandsSKILL.md
Command: nsys-ai skill
Manage and run builtin analysis skills against Nsight Systems profiles. Read `PRINCIPLES.md` first for rules, error handling, and tool definitions.
Subcommands
nsys-ai skill list
List all registered skills with name, category, and description. A name marked * cannot run without a parameter; the footer names the flag and where to look up which parameter. In --format json the same information is the required field on each entry in params.
nsys-ai skill run
Execute a skill against a profile database.
Options:
--format {text,json}— output format (default: text)--param KEY=VALUE— pass a parameter (repeatable, shorthand:-p)--trim START_S END_S— restrict analysis to time range (seconds, space-separated)--max-rows N— limit JSON output to at most N data rows (for token budget control). When clipping occurs, the JSON array contains up to N data rows plus a final truncation metadata object:{"_truncated": true, "_total_rows": <original>, "_shown_rows": <shown>}.--iteration N— auto-trim to the N-th training iteration (0-based). Cannot be combined with--trim. Requires NVTX markers (or falls back to heuristic kernel-gap detection).--marker TEXT— NVTX marker for iteration boundary detection (default:sample_0). Used with--iteration.
nsys-ai skill [--skills-dir <dir>] add <path.md>
Register a custom skill from a markdown file. Requires --skills-dir <dir> (before the subcommand) or the NSYS_AI_CUSTOM_SKILLS_DIR environment variable. The file must use heading-based format (not YAML frontmatter):
# <name>— top-level heading with the skill name## Description— short summary## Category— e.g.kernels,memory,custom## SQL— fenced ```sql code block with the query
See skills/SKILL_TEMPLATE.md for a complete example.
nsys-ai skill [--skills-dir <dir>] remove <name>
Unregister a previously added custom skill. Requires --skills-dir <dir> (before the subcommand) or the NSYS_AI_CUSTOM_SKILLS_DIR environment variable.
nsys-ai skill save
Export a skill definition to a markdown file.
Builtin Skills Catalog
The --trim flag is accepted for all skills, but only restricts the analysis window for skills whose SQL uses {trim_clause} or whose execute_fn explicitly reads trim_start_ns/trim_end_ns. Skills like theoretical_flops, speedup_estimator, and schema_inspect ignore it. Parameters marked required must be provided via --param.
Category: kernels
| Skill | Title | Description | |
|---|---|---|---|
top_kernels | Top GPU Kernels by Total Time | Lists the heaviest GPU kernels ranked by cumulative execution time. Use to identify hotspots. | |
tensor_core_usage | Tensor Core Utilization | Ranks GPU kernels based on Tensor Core eligibility vs actual utilization. Detects FP32 fallbacks. | |
kernel_instances | Kernel Instance Details | Returns individual kernel instances with exact ns timestamps (start_ns, end_ns). Use to get precise time ranges for findings.json evidence overlay. | |
kernel_launch_overhead | Kernel Launch Overhead | Measures the gap between CUDA Runtime API call and GPU kernel execution. High overhead = CPU-side bottleneck. | |
kernel_launch_pattern | Kernel Launch Pattern Analysis | Per-stream dispatch rate, burst density, inter-launch gaps, and sync-stall detection. | |
stream_concurrency | Stream Concurrency Analysis | Multi-stream GPU concurrency: active streams, kernel packing, compute/memory overlap. | |
gpu_idle_gaps | GPU Idle Gaps (Bubbles) | Finds idle gaps between consecutive GPU kernels with aggregation stats and CPU attribution. | |
region_mfu | Region-Level MFU | Computes MFU for an NVTX region or kernel. Requires name and theoretical_flops. | |
theoretical_flops | Theoretical FLOPs Calculator | Exact FLOPs for transformer operations (attention, mlp, full_model, etc.). LLMs should use this instead of manual multiplication. | |
arithmetic_intensity | Arithmetic Intensity vs. GPU Peak (Roofline) | Aggregate roofline assessment: combines GPU hardware specs (peak TFLOPS, HBM BW) with kernel time and user-provided FLOPs. Reports MFU and classifies workload as compute-bound or memory-bound. | |
cutracer_analysis | CUTracer Instruction-Level Drill-Down | Parses CUTracer instruction-histogram traces and correlates them with NVTX attribution from the nsys profile. Requires a trace_dir. |
top_kernels Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
limit | int | 15 | Max number of kernels to return |
kernel_instances Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
device | int | 0 | GPU device ID | ||
name | str | (all) | Kernel name substring filter (demangled) | ||
limit | int | 10 | Max instances to return |
kernel_launch_overhead Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
limit | int | 20 | Max results |
kernel_launch_pattern Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
limit | int | 10 | Max streams to show |
stream_concurrency Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
limit | int | 10 | Max streams to show |
gpu_idle_gaps Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
min_gap_ns | int | 1000000 | Minimum gap in nanoseconds to report | ||
limit | int | 20 | Max results | ||
device | int | 0 | GPU device ID |
region_mfu Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
name | str | Yes | — | NVTX region or kernel name to analyze | |
theoretical_flops | float | Yes | — | Model FLOPs per step (from user) | |
source | str | nvtx | Match source: nvtx or kernel | ||
peak_tflops | float | auto | GPU peak TFLOPS (auto-detected if omitted) | ||
num_gpus | int | 1 | Number of GPUs (for DP/TP adjustment) | ||
occurrence_index | int | 1 | Which occurrence to analyze (1-based) | ||
device_id | int | — | GPU device ID filter | ||
match_mode | str | contains | contains, exact, or startswith |
theoretical_flops Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
operation | str | Yes | — | attention / qkv_proj / output_proj / mlp / full_layer / full_model / linear | |
hidden_dim | int | Yes* | 0 | Model hidden dimension (H) | |
seq_len | int | Yes* | 0 | Sequence length (S) | |
num_layers | int | 1 | Number of transformer layers | ||
ffn_dim | int | 4×H | FFN intermediate dimension | ||
batch_size | int | 1 | Batch size | ||
multiplier | int | 1 | 1=fwd, 3=fwd+bwd, 4=fwd+bwd+ckpt | ||
M / N / K | int | 0 | For linear operation: matrix dimensions |
\* hidden_dim and seq_len must be > 0 for all operations except linear (which uses M/N/K instead). Passing 0 returns an INVALID_ARGUMENT error.
arithmetic_intensity Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
theoretical_flops | float | Yes | — | Total FLOPs for the profiled workload (use theoretical_flops skill to compute) | |
bytes_moved | float | — | Total bytes moved to/from HBM. If provided, computes true arithmetic intensity. | ||
device | int | 0 | GPU device ID | ||
peak_tflops | float | auto | Override GPU peak FP16 TFLOPS (auto-detected from chipName if omitted) | ||
hbm_bw_gbps | float | auto | Override HBM bandwidth in GB/s (auto-detected if omitted) |
cutracer_analysis Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
trace_dir | str | Yes | — | Path to the CUTracer output directory to correlate with this profile |
Category: memory
| Skill | Title | Description | |
|---|---|---|---|
memory_transfers | Memory Transfer Summary | Breaks down memory copy operations by direction (H2D, D2H, D2D, P2P). | |
h2d_distribution | H2D Transfer Time Distribution | Groups H2D transfers by second. Classifies pattern as init_heavy, spread_out, or spike. | |
memory_bandwidth | Memory Bandwidth & Utilization | Per-direction throughput (GB/s), peak vs sustained bandwidth, large-transfer identification. |
memory_transfers and memory_bandwidth have no required parameters.
h2d_distribution Parameters
No required parameters. Supports --trim.
Category: communication
| Skill | Title | Description | |
|---|---|---|---|
nccl_breakdown | NCCL Collective Breakdown | Summarizes NCCL ops (AllReduce, AllGather, etc.) by stream × collective type with count, time, variability. Use stream_id to infer TP/PP/DP. | |
nccl_anomaly | NCCL Anomaly Detection | Detects outlier NCCL operations exceeding a threshold relative to their op type average. | |
overlap_breakdown | Compute/Communication Overlap | Quantifies compute vs NCCL overlap. overlap_pct > 60% = NCCL well-hidden. | |
kernel_overlap_matrix | Kernel Overlap Matrix | Pairwise overlap between kernel categories: comm×comm, comm×compute, compute×compute. | |
nccl_communicator_analysis | NCCL Communicator-Aware Analysis | Groups NCCL communication by communicator ID and collective type, decoding NVTX extended-payload blobs from enriched Nsight exports. | |
nccl_compile_context_breakdown | NCCL Call-Mode Breakdown | Classifies NCCL kernels by leaf NVTX label into eager / inductor-captured / temporal-only buckets — decides whether the fix lives in user code or torch._inductor.config. | |
nccl_payload_breakdown | NCCL Payload Breakdown | Decodes typed-payload NVTX events to extract real per-collective message sizes, peer ranks, and communicator IDs from NVTX_EVENTS.binaryData. |
nccl_anomaly Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
threshold | float | 3.0 | Anomaly threshold: ratio to average duration | ||
limit | int | 20 | Max anomalies to return |
overlap_breakdown Parameters
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
device | int | 0 | GPU device ID |
Category: nvtx
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/nsys_ai/agent_skills/commands/skill.md
Popularity
- Repository stars
- 82
- Repository forks
- 20
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gindachen/nsys-ai/commands)