gindachen/nsys-ai/commands

Claude Code and agent skill by gindachen/nsys-ai

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install gindachen/nsys-ai/commands

SKILL.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.

bash
nsys-ai skill list # human-readable table
nsys-ai skill list --format json # JSON array (for programmatic use)
theoretical_flops * kernels Computes exact theoretical FLOPs ...
* needs a required parameter: nsys-ai skill run <name> <profile> -p KEY=VALUE (see: nsys-ai skill info <name>)
nsys-ai skill run

Execute a skill against a profile database.

bash
nsys-ai skill run <skill_name> <profile.sqlite> [options]
# Examples:
nsys-ai skill run top_kernels profile.sqlite
nsys-ai skill run gpu_idle_gaps profile.sqlite --param min_gap_ns=5000000
nsys-ai skill run nccl_breakdown profile.sqlite --format json
nsys-ai skill run top_kernels profile.sqlite --trim 1.5 3.0 # seconds

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.

bash
nsys-ai skill save <name> -o <output.md>

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
SkillTitleDescription
top_kernelsTop GPU Kernels by Total TimeLists the heaviest GPU kernels ranked by cumulative execution time. Use to identify hotspots.
tensor_core_usageTensor Core UtilizationRanks GPU kernels based on Tensor Core eligibility vs actual utilization. Detects FP32 fallbacks.
kernel_instancesKernel Instance DetailsReturns individual kernel instances with exact ns timestamps (start_ns, end_ns). Use to get precise time ranges for findings.json evidence overlay.
kernel_launch_overheadKernel Launch OverheadMeasures the gap between CUDA Runtime API call and GPU kernel execution. High overhead = CPU-side bottleneck.
kernel_launch_patternKernel Launch Pattern AnalysisPer-stream dispatch rate, burst density, inter-launch gaps, and sync-stall detection.
stream_concurrencyStream Concurrency AnalysisMulti-stream GPU concurrency: active streams, kernel packing, compute/memory overlap.
gpu_idle_gapsGPU Idle Gaps (Bubbles)Finds idle gaps between consecutive GPU kernels with aggregation stats and CPU attribution.
region_mfuRegion-Level MFUComputes MFU for an NVTX region or kernel. Requires name and theoretical_flops.
theoretical_flopsTheoretical FLOPs CalculatorExact FLOPs for transformer operations (attention, mlp, full_model, etc.). LLMs should use this instead of manual multiplication.
arithmetic_intensityArithmetic 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_analysisCUTracer Instruction-Level Drill-DownParses CUTracer instruction-histogram traces and correlates them with NVTX attribution from the nsys profile. Requires a trace_dir.
top_kernels Parameters
ParameterTypeRequiredDefaultDescription
limitint15Max number of kernels to return
kernel_instances Parameters
ParameterTypeRequiredDefaultDescription
deviceint0GPU device ID
namestr(all)Kernel name substring filter (demangled)
limitint10Max instances to return
kernel_launch_overhead Parameters
ParameterTypeRequiredDefaultDescription
limitint20Max results
kernel_launch_pattern Parameters
ParameterTypeRequiredDefaultDescription
limitint10Max streams to show
stream_concurrency Parameters
ParameterTypeRequiredDefaultDescription
limitint10Max streams to show
gpu_idle_gaps Parameters
ParameterTypeRequiredDefaultDescription
min_gap_nsint1000000Minimum gap in nanoseconds to report
limitint20Max results
deviceint0GPU device ID
region_mfu Parameters
ParameterTypeRequiredDefaultDescription
namestrYes—NVTX region or kernel name to analyze
theoretical_flopsfloatYes—Model FLOPs per step (from user)
sourcestrnvtxMatch source: nvtx or kernel
peak_tflopsfloatautoGPU peak TFLOPS (auto-detected if omitted)
num_gpusint1Number of GPUs (for DP/TP adjustment)
occurrence_indexint1Which occurrence to analyze (1-based)
device_idint—GPU device ID filter
match_modestrcontainscontains, exact, or startswith
theoretical_flops Parameters
ParameterTypeRequiredDefaultDescription
operationstrYes—attention / qkv_proj / output_proj / mlp / full_layer / full_model / linear
hidden_dimintYes*0Model hidden dimension (H)
seq_lenintYes*0Sequence length (S)
num_layersint1Number of transformer layers
ffn_dimint4×HFFN intermediate dimension
batch_sizeint1Batch size
multiplierint11=fwd, 3=fwd+bwd, 4=fwd+bwd+ckpt
M / N / Kint0For 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
ParameterTypeRequiredDefaultDescription
theoretical_flopsfloatYes—Total FLOPs for the profiled workload (use theoretical_flops skill to compute)
bytes_movedfloat—Total bytes moved to/from HBM. If provided, computes true arithmetic intensity.
deviceint0GPU device ID
peak_tflopsfloatautoOverride GPU peak FP16 TFLOPS (auto-detected from chipName if omitted)
hbm_bw_gbpsfloatautoOverride HBM bandwidth in GB/s (auto-detected if omitted)
cutracer_analysis Parameters
ParameterTypeRequiredDefaultDescription
trace_dirstrYes—Path to the CUTracer output directory to correlate with this profile

Category: memory
SkillTitleDescription
memory_transfersMemory Transfer SummaryBreaks down memory copy operations by direction (H2D, D2H, D2D, P2P).
h2d_distributionH2D Transfer Time DistributionGroups H2D transfers by second. Classifies pattern as init_heavy, spread_out, or spike.
memory_bandwidthMemory Bandwidth & UtilizationPer-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
SkillTitleDescription
nccl_breakdownNCCL Collective BreakdownSummarizes NCCL ops (AllReduce, AllGather, etc.) by stream × collective type with count, time, variability. Use stream_id to infer TP/PP/DP.
nccl_anomalyNCCL Anomaly DetectionDetects outlier NCCL operations exceeding a threshold relative to their op type average.
overlap_breakdownCompute/Communication OverlapQuantifies compute vs NCCL overlap. overlap_pct > 60% = NCCL well-hidden.
kernel_overlap_matrixKernel Overlap MatrixPairwise overlap between kernel categories: comm×comm, comm×compute, compute×compute.
nccl_communicator_analysisNCCL Communicator-Aware AnalysisGroups NCCL communication by communicator ID and collective type, decoding NVTX extended-payload blobs from enriched Nsight exports.
nccl_compile_context_breakdownNCCL Call-Mode BreakdownClassifies 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_breakdownNCCL Payload BreakdownDecodes typed-payload NVTX events to extract real per-collective message sizes, peer ranks, and communicator IDs from NVTX_EVENTS.binaryData.
nccl_anomaly Parameters
ParameterTypeRequiredDefaultDescription
thresholdfloat3.0Anomaly threshold: ratio to average duration
limitint20Max anomalies to return
overlap_breakdown Parameters
ParameterTypeRequiredDefaultDescription
deviceint0GPU 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gindachen/nsys-ai/commands/badge)](https://verified-skill.com/skills/gindachen/nsys-ai/commands)

Something wrong with this skill or its page? Tell us.