Skip to content

Add ModelOpt agent plugin marketplace - #2025

Merged
chadvoegele merged 4 commits into
NVIDIA:mainfrom
chadvoegele:cvoegele/modelopt-skills-plugin
Aug 12, 2026
Merged

Add ModelOpt agent plugin marketplace#2025
chadvoegele merged 4 commits into
NVIDIA:mainfrom
chadvoegele:cvoegele/modelopt-skills-plugin

Conversation

@chadvoegele

@chadvoegele chadvoegele commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change: new feature

Packages the existing ModelOpt agent skills as installable Codex and Claude plugins:

  • Adds a repo-scoped Codex marketplace and Claude-compatible marketplace.
  • Adds the canonical plugins/modelopt/ plugin tree and manifests.
  • Moves the skill tree into the plugin and keeps .agents/skills as a compatibility symlink.
  • Adds a minimal common placeholder skill required by Codex validation.
  • Documents installation from this repository.

Usage

codex plugin marketplace add NVIDIA/Model-Optimizer

Then open /plugins, select the modelopt marketplace, and install modelopt.

For Claude Code:

claude plugin marketplace add https://github.com/NVIDIA/Model-Optimizer.git
claude plugin install modelopt@modelopt

Testing

  • Codex plugin validator
  • claude plugin validate . --strict
  • claude plugin validate plugins/modelopt --strict
  1. Install the marketplace plugin with Codex and Claude from an unrelated temporary workspace.
  2. Exercise packaged evaluation helpers, a day-0 gate, and the shared remote helper from that workspace.
  3. Run uv run --frozen --extra dev python -m pytest -q plugins/modelopt/skills/day0-release/tests/test_gates.py plugins/modelopt/skills/benchmark-model-kernels/tests.
  4. Run pre-commit hooks for all changed files.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: ✅ — added a plugin-path validator; existing focused skill tests and installed-plugin smoke tests pass.
  • Did you update Changelog?: N/A — agent tooling and distribution only.
  • Did you get Claude approval on this PR?: N/A

Additional Information

Skills remain available through .agents/skills; bundled helpers are packaged under the plugin and resolved from $SKILL_DIR so installed workflows do not depend on the current workspace.

Summary by CodeRabbit

  • New Features
    • Added installable ModelOpt plugins for Claude Code and Codex.
    • Added skills for PTQ, deployment, evaluation, monitoring, debugging, benchmarking, MLflow access, EAGLE3 workflows, and release management.
    • Added deployment helpers, evaluation recipes, checkpoint validation, and release-gating tools.
  • Documentation
    • Expanded setup, credential, SLURM, benchmarking, deployment, evaluation, troubleshooting, and workspace guidance.
    • Added installation instructions and updated agent-skill discovery guidance.
  • Maintenance
    • Updated skill references and compatibility links for reliable use across supported plugin environments.

@chadvoegele
chadvoegele requested review from a team as code owners July 28, 2026 18:50
@chadvoegele
chadvoegele requested a review from shengliangxu July 28, 2026 18:50
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2d6c0194-e937-414d-9e04-9bf015c23a4c

📥 Commits

Reviewing files that changed from the base of the PR and between b79d701 and ab24e67.

📒 Files selected for processing (22)
  • .github/workflows/unit_tests.yml
  • .pre-commit-config.yaml
  • plugins/modelopt/.claude-plugin/plugin.json
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/.mcp.json
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/ptq/references/unsupported-models.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
🚧 Files skipped from review as they are similar to previous changes (15)
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/SKILL.md
  • .pre-commit-config.yaml
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md

📝 Walkthrough

Walkthrough

The PR packages ModelOpt skills as installable Claude and Codex plugins. It relocates canonical skills under plugins/modelopt/skills/, adds benchmarking, deployment, evaluation, monitoring, quantization, and release workflows, and updates repository guidance and path references.

Changes

ModelOpt plugin packaging and discovery

Layer / File(s) Summary
Plugin manifests and skill discovery
.agents/..., .claude-plugin/..., plugins/modelopt/..., AGENTS.md, README.md
Adds Claude and Codex marketplace manifests, plugin metadata, canonical skill symlinks, installation guidance, and updated agent discovery instructions.
Shared foundations
plugins/modelopt/skills/common/*
Adds credential, workspace, environment, SLURM, and remote-execution guidance.
Plugin-relative path migration
plugins/modelopt/skills/*, .pre-commit-config.yaml, pyproject.toml, .github/workflows/*
Replaces checkout-relative skill paths with $SKILL_DIR paths and updates synchronization, lint, and test configuration.

ModelOpt workflows

Layer / File(s) Summary
Kernel benchmarking
plugins/modelopt/skills/benchmark-model-kernels/*
Adds meta-device model shape inspection, FlashInfer GEMM and MoE benchmarking, CSV reporting, and extensive tests.
Deployment lifecycle
plugins/modelopt/skills/deployment/*
Adds framework references, compatibility guidance, AIPerf benchmarking, unsupported-model troubleshooting, and a lifecycle script for vLLM and SGLang servers.
Evaluation and operations
plugins/modelopt/skills/evaluation/*, plugins/modelopt/skills/launching-evals/*, plugins/modelopt/skills/monitor/*, plugins/modelopt/skills/eagle3-*
Adds evaluation recipes, run validation, benchmark analysis, monitoring rules, EAGLE3 workflows, and operational references.
Release gates
plugins/modelopt/skills/day0-release/*, plugins/modelopt/skills/compare-results/*
Adds PTQ, run, and comparison gates with structured verdicts, CLI entry points, and declarative scenarios.
Quantization workflows
plugins/modelopt/skills/ptq/*, plugins/modelopt/skills/quant-recipe-search/*
Adds PTQ launcher and checkpoint-validation guidance plus recipe-search workflow and case-study documentation.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: shengliangxu, kevalmorabia97, meenchen

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.49% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: adding an installable ModelOpt agent plugin marketplace.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns ✅ Passed No listed issue was introduced: changed Python files are pure renames, unsafe loader/eval patterns are absent, trust_remote_code defaults false, and pyproject adds no dependency; existing # nosec l...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.95%. Comparing base (4ca7dd8) to head (ab24e67).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2025      +/-   ##
==========================================
- Coverage   78.73%   77.95%   -0.79%     
==========================================
  Files         522      522              
  Lines       60357    60692     +335     
==========================================
- Hits        47523    47313     -210     
- Misses      12834    13379     +545     
Flag Coverage Δ
examples-diffusers 20.80% <ø> (-0.01%) ⬇️
examples-gpt-oss 13.28% <ø> (-0.01%) ⬇️
examples-hf_ptq 21.48% <ø> (-0.04%) ⬇️
examples-llm_distill 13.34% <ø> (-0.01%) ⬇️
examples-llm_eval 17.10% <ø> (-0.01%) ⬇️
examples-llm_qat 16.64% <ø> (-0.01%) ⬇️
examples-llm_sparsity 15.93% <ø> (-0.01%) ⬇️
examples-megatron_bridge 25.68% <ø> (-0.15%) ⬇️
examples-specdec_bench 13.01% <ø> (-0.01%) ⬇️
examples-speculative_decoding 17.53% <ø> (-0.08%) ⬇️
examples-torch_onnx 21.88% <ø> (-0.01%) ⬇️
examples-torch_trt 15.10% <ø> (-0.01%) ⬇️
gpu 58.61% <ø> (-0.71%) ⬇️
regression 14.90% <ø> (+0.06%) ⬆️
unit 55.30% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (36)
plugins/modelopt/skills/eagle3-validate/SKILL.md-36-53 (1)

36-53: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Require explicit completion and artifact checks.

“ No error” in the last log tail is insufficient to establish success, and log messages do not prove that expected files exist. Require an explicit successful exit/completion marker and run filesystem checks such as test -s/find on the relevant workspace; otherwise report the artifact status as unverified.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/eagle3-validate/SKILL.md` around lines 36 - 53,
Update the validation instructions in the “Verify artifacts exist” section to
require explicit successful completion or exit markers for every task, not
merely an error-free log tail. Add filesystem checks using test -s, find, or
equivalent for each expected artifact under /scratchspace, and report any
missing or empty artifact as unverified.
plugins/modelopt/skills/eagle3-review-logs/SKILL.md-75-80 (1)

75-80: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Resume from the actual failed task.

This example only skips task_0; if task_2 or task_3 failed, it reruns successful earlier tasks unnecessarily. Generate skip overrides for every task before the failed task so the command truly resumes from the reported failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/eagle3-review-logs/SKILL.md` around lines 75 - 80,
The rerun guidance should resume from the reported failed pipeline task rather
than always skipping only task_0. Update the instruction around the
`pipeline.task_0.skip=true` override to generate skip overrides for every task
preceding the failed task, while leaving the failed task and subsequent tasks
enabled.
plugins/modelopt/skills/eagle3-new-model/SKILL.md-42-42 (1)

42-42: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Align the trust_remote_code forwarding contract before documenting this workaround.

The instructions currently tell users to pass the flag to task_3 while also stating that quick_check.sh does not forward it. Update the wrapper/config contract so the flag reaches the benchmark, then document the supported invocation.

  • plugins/modelopt/skills/eagle3-new-model/SKILL.md#L42-L42: document the actual task_3 forwarding mechanism.
  • plugins/modelopt/skills/eagle3-triage/SKILL.md#L117-L118: replace the ineffective “pass the flag” fix unless quick_check.sh forwards it.
  • plugins/modelopt/skills/eagle3-triage/SKILL.md#L129-L129: keep task_0/task_3 guidance consistent with the implemented forwarding path.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/eagle3-new-model/SKILL.md` at line 42, Align the
trust_remote_code forwarding contract by updating quick_check.sh or its
configuration so the flag reaches task_3 benchmark arguments while remaining
correctly passed to task_0 before the separator. In
plugins/modelopt/skills/eagle3-new-model/SKILL.md:42, document the actual
supported task_3 forwarding mechanism and invocation. In
plugins/modelopt/skills/eagle3-triage/SKILL.md:117-118, replace the ineffective
workaround with instructions matching the implemented forwarding path; at :129,
keep task_0/task_3 guidance consistent with that path.
plugins/modelopt/skills/ptq/references/unsupported-models.md-252-280 (1)

252-280: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fail closed when FP8 scale metadata is missing or unsupported.

When scale is None, and again for unsupported scale dimensions, the helper silently casts FP8 values to BF16 without applying a scale. That can corrupt weights while reporting successful dequantization. Raise an error unless a no-scale representation is explicitly supported, and reject unsupported dimensions instead of silently continuing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/unsupported-models.md` around lines
252 - 280, Update dequantize_fp8_params so missing FP8 scale metadata (scale is
None) raises an error rather than casting values, unless an explicitly supported
no-scale representation is defined. Replace the unsupported scale-dimension
fallback with an error that identifies the parameter and scale shape, while
preserving the existing 1D and 3D scaling paths.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-100-110 (1)

100-110: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Support single-file safetensors exports in the coverage gate.

This script unconditionally opens model.safetensors.index.json, unlike the VLM check above, which supports both sharded and non-sharded exports. Valid single-file checkpoints have no index and will fail before producing the required validation report.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
100 - 110, Update the layer-coverage script around the index/config loading to
support both sharded exports with model.safetensors.index.json and single-file
model.safetensors exports without an index. Detect which layout exists, derive
the checkpoint tensor names appropriately for each, and preserve the required
validation report and coverage checks.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-74-98 (1)

74-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject empty or missing safetensors before computing the ratio.

When src == 0, the ratio becomes nan, which does not satisfy the >= 1.0 blocking condition. When dst == 0, the ratio is 0.0, incorrectly suggesting successful compression. Require both source and output byte counts to be greater than zero before reporting a passing ratio.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
74 - 98, Update the checkpoint size-check script around safetensor_bytes, src,
and dst to reject missing or empty source/output safetensors before calculating
or reporting the ratio. Require both byte counts to be greater than zero, emit a
failing result with clear context otherwise, and only apply the existing ratio
and compression threshold when both counts are valid.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-37-61 (1)

37-61: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the VLM detector generic or explicitly limit its supported model names.

The prose claims to validate multimodal checkpoints, but the predicate only recognizes model.visual, vision_tower, and vision_model. Models using names such as vision_encoder or visual_encoder can therefore pass with a quantized vision branch. Derive the branch from model metadata or document/enforce the supported naming contract explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
37 - 61, The VLM validation snippet’s vision-branch detection is incomplete for
generic multimodal checkpoints. Update the detector to derive vision-tower keys
from available model metadata, or explicitly enforce and document a supported
naming contract that includes only the recognized prefixes; ensure unsupported
naming schemes cannot silently report zero quantized vision tensors.
plugins/modelopt/skills/ptq/tests.json-77-86 (1)

77-86: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Expand eval 6 to cover the complete checkpoint gate.

The documented gate also requires recording the exact workspace/path, every PTQ compatibility category (or none), and a deployment serving canary before evaluation. Without expectations for those behaviors, an implementation can pass this test while violating the required deployment/evaluation handoff contract.

Proposed additions
         "Checks metadata consistency against the source checkpoint and records any diffs",
+        "Reports the exact checkpoint workspace and path and preserves them for deployment/evaluation",
+        "Records dependency upgrades, source patches, custom code, environment variables, and launcher/container changes, using none when absent",
+        "Runs the deployment canary from the recorded workspace/path and stops before eval submission if it fails",
         "Stops before eval submission if the size ratio is >= 1.0 for a compression recipe, if intended layer coverage is missing, or if metadata changes unexpectedly"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/tests.json` around lines 77 - 86, Expand test
case id 6 expectations to require recording the exact workspace/path, reporting
every PTQ compatibility category with “none” when applicable, and running a
deployment serving canary before any evaluation submission. Keep the existing
checkpoint validation, compression, layer coverage, metadata checks, and stop
conditions unchanged.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-127-154 (1)

127-154: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Don't present this as actual precision validation. algo is only the declared config, and has_scales only checks for scale-key presence, so a checkpoint with FP8 scales but a misdeclared NVFP4 algo would still be counted as NVFP4. Either inspect real quantization metadata / tensor dtype / scale layout, or rename this to a declaration-vs-presence check.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
127 - 154, Rename this validation logic and its output to describe
declaration-versus-scale-presence checking rather than actual precision
validation. In the loop using declared_algo and has_scales, avoid labeling algo
values as verified precisions unless the implementation is extended to inspect
tensor dtypes, scale metadata, or scale layouts; otherwise update counters,
mismatch messages, and surrounding documentation to use declaration/presence
terminology.
plugins/modelopt/skills/common/remote-execution.md-102-108 (1)

102-108: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

The SCP command does not reuse the configured SSH session.

It omits ControlPath, ssh_key, and ssh_proxy; clusters requiring either configured auth option will fail, and successful calls create a new connection. Show an invocation using the same SSH options as remote_exec.sh, or direct users to remote_sync_to.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote-execution.md` around lines 102 - 108,
Update the SCP guidance near the “SCP (alternative to rsync)” section to reuse
the configured SSH session and authentication settings by including the same
ControlPath, ssh_key, and ssh_proxy options used by remote_exec.sh, or replace
the example with a recommendation to use remote_sync_to.
plugins/modelopt/skills/common/slurm-setup.md-260-278 (1)

260-278: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restrict Enroot credential-file permissions.

These examples write registry tokens but never enforce 0600; a permissive umask can expose them to other users. Add chmod 600 ~/.config/enroot/.credentials after creating/appending it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/slurm-setup.md` around lines 260 - 278, Update
the enroot credential setup examples after the DockerHub and NGC credential
append commands to run chmod 600 on ~/.config/enroot/.credentials, ensuring the
file containing registry tokens is readable and writable only by the owner.
plugins/modelopt/skills/common/remote_exec.sh-372-390 (1)

372-390: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Create remote sync destinations before invoking rsync.

The documented first-use workflows sync into <session_id>/<model>/..., but remote_sync_to only assumes the path exists; rsync cannot create missing intermediate directories.

  • plugins/modelopt/skills/common/remote_exec.sh#L372-L390: create ${REMOTE_WORKSPACE}/${remote_subdir} with mkdir -p -- before rsync.
  • plugins/modelopt/skills/common/remote-execution.md#L119-L124: rely on the helper’s destination creation or explicitly create the scripts directory first.
  • plugins/modelopt/skills/common/workspace-management.md#L79-L87: ensure the remote session/model workspace exists before the initial source and script sync.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote_exec.sh` around lines 372 - 390, Update
remote_sync_to in plugins/modelopt/skills/common/remote_exec.sh (lines 372-390)
to create ${REMOTE_WORKSPACE}/${remote_subdir} with mkdir -p -- before invoking
rsync. In plugins/modelopt/skills/common/remote-execution.md (lines 119-124),
rely on the helper’s destination creation or explicitly create the scripts
directory first. In plugins/modelopt/skills/common/workspace-management.md
(lines 79-87), ensure the remote session/model workspace exists before the
initial source and script sync.
plugins/modelopt/skills/common/environment-setup.md-13-19 (1)

13-19: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not mutate an existing checkout to “update” it.

git pull origin main can merge into the user’s active branch, and git checkout main neither preserves branch intent nor clears patches. Require a clean, dedicated clone/worktree or ask before changing branches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/environment-setup.md` around lines 13 - 19,
Update the environment setup guidance around “If found, ensure the source is up
to date” to prohibit mutating an existing checkout with git pull or git
checkout. Require a clean, dedicated clone/worktree, or instruct the user to
obtain explicit confirmation before changing branches or applying resets;
preserve existing patches and branch intent unless the user approves otherwise.
plugins/modelopt/skills/common/credentials.md-50-54 (1)

50-54: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid exposing the NGC key in process arguments.

-p <NGC_API_KEY> can leak through process listings and shell history. Use stdin, as the SLURM guide already does.

Proposed fix
-docker login nvcr.io -u '$oauthtoken' -p <NGC_API_KEY>
+printf '%s\n' "$NGC_API_KEY" | docker login nvcr.io -u '$oauthtoken' --password-stdin
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/credentials.md` around lines 50 - 54, Update
the Docker login command in the Docker section of credentials.md to pass
NGC_API_KEY through stdin rather than the -p option, matching the existing SLURM
guide pattern and preventing exposure in process arguments or shell history.
plugins/modelopt/skills/accessing-mlflow/SKILL.md-5-9 (1)

5-9: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add the required licensing headers for vendored content.

This file identifies itself as vendored third-party source but contains only frontmatter licensing metadata and a source pointer. Add the original copyright/license notice and the required NVIDIA Apache 2.0 header, and ensure the file is excluded from the license-insertion hook.

As per coding guidelines, copied third-party source must include a source reference with commit hash, the original copyright/license, and the NVIDIA Apache 2.0 header.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/accessing-mlflow/SKILL.md` around lines 5 - 9, Add
the original upstream copyright/license notice and the required NVIDIA Apache
2.0 header to the vendored content in SKILL.md, while preserving its
commit-pinned source reference. Update the repository’s license-insertion hook
configuration to exclude this vendored file from automatic header insertion.

Source: Coding guidelines

plugins/modelopt/skills/day0-release/scripts/gate_ptq.py-83-93 (1)

83-93: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Size gate never validates output_bytes; a zero/negative output silently passes.

Only src <= 0 is checked. If output_bytes is 0 (or negative, e.g. from a truncated/failed checkpoint export), ratio = out/src = 0.0 < 1.0, so no "output not smaller than source" failure is recorded — an empty/corrupted checkpoint passes the size gate.

🐛 Proposed fix
-    if not isinstance(src, (int, float)) or not isinstance(out, (int, float)) or src <= 0:
+    if not isinstance(src, (int, float)) or not isinstance(out, (int, float)) or src <= 0 or out <= 0:
         checks["size"] = "missing/invalid source or output bytes"
         failures.append(("USER_CONFIG_ERROR", "missing source/output sizes"))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_ptq.py` around lines 83 -
93, Update the size validation in the gate’s size-check block to require both
source and output byte values to be positive numeric values, including rejecting
zero or negative output_bytes as a USER_CONFIG_ERROR before calculating the
ratio. Preserve the existing ratio check for valid sizes.
plugins/modelopt/skills/day0-release/SKILL.md-67-77 (1)

67-77: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use plugin-root-relative skill paths plugins/modelopt/skills/day0-release/SKILL.md and plugins/modelopt/skills/compare-results/SKILL.md still reference .agents/skills/.... In the canonical plugin tree, those are only symlinked repo paths, so these references should be switched to skills/... or ${CLAUDE_PLUGIN_ROOT}/skills/....

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/SKILL.md` around lines 67 - 77, Replace
repo-relative “.agents/skills/...” references with plugin-root-relative
“skills/...” or “${CLAUDE_PLUGIN_ROOT}/skills/...” paths. Update the command and
references in plugins/modelopt/skills/day0-release/SKILL.md at lines 67-77,
100-104, and 118-124, and in plugins/modelopt/skills/compare-results/SKILL.md at
lines 32-41; preserve the referenced skill and script targets.

Source: Coding guidelines

plugins/modelopt/skills/release-cherry-pick/SKILL.md-81-88 (1)

81-88: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Mark PRs done only after the release PR merges.

Step 2 excludes cherry-pick-done; applying it immediately after opening the release PR means a closed or failed release PR permanently hides those source PRs from later runs. Apply the label after the release PR is merged.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/release-cherry-pick/SKILL.md` around lines 81 - 88,
Update Step 7 in the release cherry-pick workflow so the cherry-pick-done label
is applied only after confirming the release PR has merged, not immediately
after it is opened. Preserve the existing loop and labeling behavior for every
successfully cherry-picked source PR once the merge condition is satisfied.
plugins/modelopt/skills/release-cherry-pick/SKILL.md-64-65 (1)

64-65: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Create the feature branch before cherry-picking.

The current order advances local release/<VERSION> with every pick, then force-resets/creates the feature branch afterward. Create and check out cherry-picks/release-<VERSION> from origin/release/<VERSION> before Step 5, and do not use checkout -B here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/release-cherry-pick/SKILL.md` around lines 64 - 65,
Update the release cherry-pick workflow before Step 5 to create and check out
cherry-picks/release-<VERSION> from origin/release/<VERSION>, then push it as
needed; remove the later checkout -B command so the local release branch is not
advanced during cherry-picking.
plugins/modelopt/skills/release-cherry-pick/SKILL.md-61-79 (1)

61-79: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require approval before publishing.

Present the branch, PR title, and body, then wait for explicit approval before git push or gh pr create; a request to cherry-pick does not necessarily authorize publishing. Based on learnings, never run git push or gh pr create without explicit approval in the current turn.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/release-cherry-pick/SKILL.md` around lines 61 - 79,
Update the cherry-pick publishing workflow around the git push and gh pr create
commands to first present the proposed branch, PR title, and exact body for
review, then pause for explicit approval in the current turn. Do not execute git
push or gh pr create based solely on a cherry-pick request; proceed only after
approval is explicitly provided.

Source: Learnings

plugins/modelopt/skills/release-cherry-pick/SKILL.md-21-23 (1)

21-23: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Paginate the pending-PR search. This query only fetches the first 50 results, so larger releases can silently skip eligible cherry-picks. Use gh api --paginate with per_page=100.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/release-cherry-pick/SKILL.md` around lines 21 - 23,
Update the pending cherry-pick search command to use gh api --paginate and
increase per_page from 50 to 100, preserving the existing query filters, jq
transformation, and sorting behavior.
plugins/modelopt/skills/debug/SKILL.md-3-31 (1)

3-31: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require confirmation before state-changing remote commands.

This skill permits arbitrary relay execution but does not require confirmation before writes, process termination, or network-affecting commands. Require explicit confirmation immediately before such commands and never pass copied/untrusted strings to run.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/debug/SKILL.md` around lines 3 - 31, Update the
Remote Docker Debugger instructions to require explicit user confirmation
immediately before any state-changing remote command, including writes, process
termination, or network-affecting operations. Ensure commands passed to
tools/debugger/client.sh run are not copied or untrusted strings, while
preserving read-only command usage and the existing relay workflow.

Source: Linters/SAST tools

plugins/modelopt/skills/deployment/scripts/deploy.sh-191-203 (1)

191-203: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Do not treat arbitrary Python processes as this server.

A stale/reused PID pointing to any Python process passes this check, after which stop_server can terminate it or its process group. Start the server in a dedicated session and persist/verify a run-specific identity before signaling it.

Also applies to: 391-410

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh` around lines 191 - 203,
Update is_server_running and the related stop_server flow to avoid identifying
arbitrary Python processes as the managed server. Start the server in a
dedicated session and persist a run-specific identity, then verify that identity
before returning success or sending termination signals; retain stale-PID
cleanup when verification fails.
plugins/modelopt/skills/deployment/scripts/deploy.sh-333-355 (1)

333-355: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not advertise TRT-LLM as an automated start backend.

start --framework trtllm reaches this function, which returns failure and never starts an endpoint. Implement the lifecycle path or reject/remove trtllm from the script’s supported framework list and direct users to the reference.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh` around lines 333 - 355,
Update start_trtllm and the framework-selection flow so TRT-LLM is not presented
as a supported automated backend: either implement a functioning server
lifecycle that starts an endpoint, or remove/reject trtllm from the supported
framework list and direct users to the existing TRT-LLM reference guidance. Do
not leave trtllm selectable while start_trtllm only logs instructions and
returns failure.
plugins/modelopt/skills/deployment/SKILL.md-213-218 (1)

213-218: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use the canonical plugin skill path.

The deployment skill instructs installed-plugin users to source a compatibility path that may not exist outside this repository, and the eval locks that behavior in.

  • plugins/modelopt/skills/deployment/SKILL.md#L213-L218: source plugins/modelopt/skills/common/remote_exec.sh (or an install-location-resolved canonical equivalent).
  • plugins/modelopt/skills/deployment/tests/evals.json#L29-L31: expect the canonical plugin path.

Based on learnings, use paths relative to the repository root. As per coding guidelines, plugins/modelopt/skills/ is the canonical installable tree and .agents/skills is only a compatibility symlink.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/SKILL.md` around lines 213 - 218, Update
the deployment instructions in plugins/modelopt/skills/deployment/SKILL.md at
lines 213-218 to source the canonical plugin skill path
plugins/modelopt/skills/common/remote_exec.sh, or an equivalent path resolved
from the install location, while keeping subsequent remote_* commands unchanged.
Update the corresponding expectation in
plugins/modelopt/skills/deployment/tests/evals.json at lines 29-31 to require
the canonical plugin path; both locations should use repository-root-relative
paths, with no direct change needed to the .agents/skills compatibility symlink.

Sources: Coding guidelines, Learnings

plugins/modelopt/skills/deployment/scripts/deploy.sh-25-32 (1)

25-32: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Make external binding opt-in

deploy.sh and these examples bind the service to 0.0.0.0 explicitly; SGLang’s own default is 127.0.0.1, so this widens exposure unnecessarily. Keep public binding behind an explicit opt-in and document the auth/firewall/SSH-tunnel requirement next to the remote-access examples.

  • plugins/modelopt/skills/deployment/scripts/deploy.sh
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/references/setup.md
  • plugins/modelopt/skills/deployment/references/sglang.md
  • plugins/modelopt/skills/deployment/references/vllm.md
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh` around lines 25 - 32,
Make external binding opt-in across deploy.sh and the documented deployment
examples: default the deploy script to SGLang’s loopback address, add an
explicit opt-in mechanism for 0.0.0.0, and update every referenced example to
avoid public binding by default. In plugins/modelopt/skills/deployment/SKILL.md
(117-123, 142-147, 232-236), references/setup.md (57-61, 84-90, 99-105),
references/sglang.md (36-40), and references/vllm.md (15-20), document that
remote/public access requires explicit binding plus appropriate authentication,
firewalling, or an SSH tunnel.
plugins/modelopt/skills/deployment/references/support-matrix.md-63-64 (1)

63-64: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the Blackwell image tag explicit

support-matrix.md says cu130 is now the vLLM default, but SKILL.md still says the default build is cu12. That mismatch can send B300/GB300 users to an image without the sm_103 FP4 kernel; drop the default claim here and require an explicit -cu130 tag.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/references/support-matrix.md` around lines
63 - 64, Update the NVFP4 support note in the deployment support matrix to
remove the claim that cu130 is the vLLM default and state that B300/GB300
deployments must explicitly use a -cu130 serving image. Preserve the warning
that older cu12 images lack the sm_103 FP4 kernel.
plugins/modelopt/skills/evaluation/tests/evals.json-23-23 (1)

23-23: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Correct the expected target path.

target is a sibling of config under evaluation.nemo_evaluator_config; expecting config.target.api_endpoint trains the evaluator to produce an invalid config shape.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/tests/evals.json` at line 23, Update the
expected path in the evaluation test description to reference
evaluation.nemo_evaluator_config.target.api_endpoint.adapter_config, removing
the incorrect config segment while preserving the existing interceptor
field-name expectations.
plugins/modelopt/skills/launching-evals/SKILL.md-55-55 (1)

55-55: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Route config creation to the installed evaluation skill.

nel-assistant is not the skill introduced in this plugin; the canonical skill in this cohort is evaluation. This route will fail to hand users to the config-authoring workflow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/launching-evals/SKILL.md` at line 55, Update the
config-creation instruction in the launching-evals skill to route users through
the installed evaluation skill instead of nel-assistant, while preserving the
existing past-run config.yml starting-point behavior.
plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml-158-160 (1)

158-160: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not emit both thinking-toggle keys.

The adjacent guidance says model families accept only one key and that an unused DeepSeek key can error, but this template sets both. Leave this block commented out or retain only the model-card-selected key.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml` around
lines 158 - 160, Update the chat_template_kwargs block in the evaluation recipe
so it does not emit both thinking-toggle keys: leave the block commented out or
retain only the model-card-selected key, removing the unused alternative.
plugins/modelopt/skills/launching-evals/SKILL.md-5-7 (1)

5-7: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Complete the required vendored-source attribution.

This declares the document “Vendored verbatim” but lacks the original copyright/license notice and NVIDIA Apache-2.0 header required for copied third-party source.

As per coding guidelines, copied third-party source must include the source commit, original copyright/license, and NVIDIA Apache 2.0 header.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/launching-evals/SKILL.md` around lines 5 - 7, Add the
required NVIDIA copyright and Apache-2.0 license attribution to the header of
SKILL.md, preserving the existing source repository, commit, and re-sync
information in the vendored-source notice.

Source: Coding guidelines

plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-general-info.md-102-104 (1)

102-104: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not present eight 1-sample runs as equivalent to one 8-sample run.

Independent runs change run-level aggregation, including reported pass_at_k. Either document the supported aggregation/reconstruction procedure or label this throughput workaround as non-comparable to the canonical multi-sample result.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-general-info.md`
around lines 102 - 104, Update the “8x1 pattern” guidance to state that
independent single-sample runs are not equivalent to one 8-sample run because
run-level metrics such as pass_at_k differ. Either document how to aggregate or
reconstruct the canonical result, or explicitly label this pattern as a
throughput workaround whose results are non-comparable.
plugins/modelopt/skills/monitor/SKILL.md-74-83 (1)

74-83: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use type-specific terminal states during cleanup.

The generic removal list omits NEL’s documented terminal states SUCCESS, ERROR, and NOT FOUND from Lines 111-115. Successful NEL jobs can therefore remain in the registry and keep the monitor alive indefinitely. Delegate cleanup to the per-type terminal predicates.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/monitor/SKILL.md` around lines 74 - 83, Update the
“Remove completed jobs” step in the monitor workflow to use each job type’s
terminal-state predicate instead of the generic terminal-state list. Ensure NEL
jobs recognize SUCCESS, ERROR, and NOT FOUND as terminal, while preserving the
existing cleanup behavior for other job types and allowing the monitor to exit
when none remain.
plugins/modelopt/skills/monitor/SKILL.md-37-57 (1)

37-57: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Record the launcher log path. active_jobs.json doesn’t store any output-file location, so type: launcher jobs can’t be resumed from the registry alone unless that path is derived elsewhere. Add a required field or document the exact derivation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/monitor/SKILL.md` around lines 37 - 57, Update the
active_jobs.json schema documentation to include a required launcher log/output
path field for type: launcher jobs, or specify the exact deterministic
derivation used to recover it from the registry. Ensure launcher jobs can be
resumed using only their recorded registry data, while leaving non-launcher job
fields unchanged.
plugins/modelopt/skills/evaluation/references/parallelism.md-109-112 (1)

109-112: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use the current nel-next field for the KV-cache flag.

This reference tells users to place --kv-cache-dtype fp8 in deployment.command, but nel-next.md defines the active schema as services.<svc>.extra_args and explicitly maps serving flags there. Update this example to prevent schema validation failures or ignored settings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md` around lines
109 - 112, Update the KV-cache quantization example in the referenced
parallelism guidance to use the active nel-next schema, placing the serving flag
through services.<svc>.extra_args rather than deployment.command. Preserve the
existing fp8 dtype options and surrounding concurrency guidance.
plugins/modelopt/skills/evaluation/recipes/tasks/aa/tau2_bench_telecom.md-52-52 (1)

52-52: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not leave the required runtime value unresolved in the YAML fragment.

parallelism: ??? is not an executable configuration value. Provide a concrete conservative default, or keep the placeholder outside the copy-pastable YAML and explicitly require the user to replace it before validation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/recipes/tasks/aa/tau2_bench_telecom.md` at
line 52, Replace the unresolved parallelism value in the configuration fragment
with a concrete conservative default that respects the cap of 512, and ensure
the surrounding guidance still instructs users to recompute --max-num-seqs after
setting it.
🧹 Nitpick comments (2)
plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md (1)

31-35: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Pin the Transformers version used by the SLURM workflow.

Both upgrade paths install the latest available package, and PIP_CONSTRAINT is explicitly removed. Repeated runs can therefore resolve different Transformers and dependency versions, while --no-deps can leave an incomplete environment. Use a tested exact pin, consistent with the launcher guide’s == requirement, and document any intentional constraint override.

Also applies to: 51-61

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md` around lines 31 -
35, Update both Transformers installation paths in the SLURM workflow to use the
tested exact version pin from the launcher guide, retaining the == requirement.
Remove any --no-deps usage so dependencies are installed completely, and
document the intentional PIP_CONSTRAINT override wherever the workflow clears
it.
plugins/modelopt/skills/day0-release/scripts/gate_compare.py (1)

1-37: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

None of the three gate scripts define __all__. Same gap repeated in gate_compare.py, gate_ptq.py, and gate_run.py.

  • plugins/modelopt/skills/day0-release/scripts/gate_compare.py#L1-L37: add __all__ = ["evaluate_comparison", "main"].
  • plugins/modelopt/skills/day0-release/scripts/gate_ptq.py#L1-L48: add __all__ = ["evaluate_checkpoint", "main"].
  • plugins/modelopt/skills/day0-release/scripts/gate_run.py#L1-L46: add __all__ = ["evaluate_run", "main"].

As per coding guidelines, "Define each module's public API with __all__ = [...]."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_compare.py` around lines 1
- 37, Add the module public API declarations in all three listed files: define
__all__ in gate_compare.py with evaluate_comparison and main, in gate_ptq.py
with evaluate_checkpoint and main, and in gate_run.py with evaluate_run and
main.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f082fb76-572c-42aa-9867-c0c759222ccf

📥 Commits

Reviewing files that changed from the base of the PR and between 87c9f8c and 169be38.

📒 Files selected for processing (89)
  • .agents/README.md
  • .agents/TOOLING.md
  • .agents/plugins/marketplace.json
  • .agents/scripts/sync-upstream-skills.sh
  • .agents/skills
  • .claude-plugin/marketplace.json
  • .markdownlint-cli2.yaml
  • .pre-commit-config.yaml
  • AGENTS.md
  • README.md
  • plugins/modelopt/.claude-plugin/plugin.json
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/skills/accessing-mlflow/SKILL.md
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/credentials.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/common/workspace-management.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/compare-results/tests/evals.json
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/day0-release/scripts/gate_compare.py
  • plugins/modelopt/skills/day0-release/scripts/gate_ptq.py
  • plugins/modelopt/skills/day0-release/scripts/gate_run.py
  • plugins/modelopt/skills/day0-release/tests/evals.json
  • plugins/modelopt/skills/day0-release/tests/test_gates.py
  • plugins/modelopt/skills/debug/SKILL.md
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/references/benchmarking.md
  • plugins/modelopt/skills/deployment/references/setup.md
  • plugins/modelopt/skills/deployment/references/sglang.md
  • plugins/modelopt/skills/deployment/references/support-matrix.md
  • plugins/modelopt/skills/deployment/references/trtllm.md
  • plugins/modelopt/skills/deployment/references/unsupported-models.md
  • plugins/modelopt/skills/deployment/references/vllm.md
  • plugins/modelopt/skills/deployment/scripts/deploy.sh
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/eagle3-new-model/SKILL.md
  • plugins/modelopt/skills/eagle3-review-logs/SKILL.md
  • plugins/modelopt/skills/eagle3-triage/SKILL.md
  • plugins/modelopt/skills/eagle3-validate/SKILL.md
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/evaluation/recipes/env.example
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/gpqa_diamond.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/hle.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/ifbench.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/lcr.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/mmmu_pro.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/omniscience.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/scicode.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa/tau2_bench_telecom.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/swebench_verified.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/terminal_bench_2_1.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aime_2025.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/livecodebench.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/mmlu_pro.md
  • plugins/modelopt/skills/evaluation/references/model-card-research.md
  • plugins/modelopt/skills/evaluation/references/multi-node.md
  • plugins/modelopt/skills/evaluation/references/nel-next.md
  • plugins/modelopt/skills/evaluation/references/parallelism.md
  • plugins/modelopt/skills/evaluation/references/quantization-benchmarks.md
  • plugins/modelopt/skills/evaluation/references/run-validation.md
  • plugins/modelopt/skills/evaluation/references/slurm.md
  • plugins/modelopt/skills/evaluation/tests/evals.json
  • plugins/modelopt/skills/launching-evals/SKILL.md
  • plugins/modelopt/skills/launching-evals/references/analyze-results.md
  • plugins/modelopt/skills/launching-evals/references/benchmarks/swebench-general-info.md
  • plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-general-info.md
  • plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-trace-analysis.md
  • plugins/modelopt/skills/launching-evals/references/check-progress.md
  • plugins/modelopt/skills/launching-evals/references/debug-failed-runs.md
  • plugins/modelopt/skills/launching-evals/references/run-evaluation.md
  • plugins/modelopt/skills/launching-evals/tests.json
  • plugins/modelopt/skills/monitor/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/ptq/references/checkpoint-validation.md
  • plugins/modelopt/skills/ptq/references/launcher-guide.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/ptq/references/unsupported-models.md
  • plugins/modelopt/skills/ptq/tests.json
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/qwen36_case_study.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • plugins/modelopt/skills/release-cherry-pick/SKILL.md
  • pyproject.toml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

🛑 Comments failed to post (4)
plugins/modelopt/skills/common/remote_exec.sh (1)

110-126: 🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift

Replace string-built SSH/rsync commands with argument arrays.

Configuration values and caller paths are interpolated into strings that eval re-parses. A crafted cluster config (ssh_proxy, ssh_key, host/user) or a path containing shell syntax can execute commands on the local agent machine. Build SSH and rsync invocations as Bash arrays and invoke them with "${args[@]}"; remove every eval.

  • plugins/modelopt/skills/common/remote_exec.sh#L110-L126: return structured SSH arguments instead of a shell-escaped string.
  • plugins/modelopt/skills/common/remote_exec.sh#L159-L160: invoke ssh directly with the argument array.
  • plugins/modelopt/skills/common/remote_exec.sh#L269-L269: invoke the connectivity probe directly with the argument array.
  • plugins/modelopt/skills/common/remote_exec.sh#L356-L356: invoke the encoded remote payload directly with the argument array.
  • plugins/modelopt/skills/common/remote_exec.sh#L379-L401: build rsync arguments as arrays so local and remote paths remain data, not shell source.
📍 Affects 1 file
  • plugins/modelopt/skills/common/remote_exec.sh#L110-L126 (this comment)
  • plugins/modelopt/skills/common/remote_exec.sh#L159-L160
  • plugins/modelopt/skills/common/remote_exec.sh#L269-L269
  • plugins/modelopt/skills/common/remote_exec.sh#L356-L356
  • plugins/modelopt/skills/common/remote_exec.sh#L379-L401
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote_exec.sh` around lines 110 - 126,
Replace string-built SSH and rsync commands with Bash argument arrays to prevent
configuration values and paths from being re-parsed as shell syntax. In
_ssh_base_opts, return structured SSH arguments; update the SSH invocations at
plugins/modelopt/skills/common/remote_exec.sh lines 159-160, 269-269, and
356-356 to invoke the arrays directly without eval. At lines 379-401, build
rsync arguments as arrays for both local and remote paths, preserving each value
as a single argument.

Source: Linters/SAST tools

plugins/modelopt/skills/evaluation/SKILL.md (2)

111-117: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Require explicit opt-in before executing model-supplied code.

The default flow infers trust from auto_map, and the nel-next template unconditionally adds --trust-remote-code. A malicious or untrusted checkpoint can therefore execute supplied Python during deployment.

  • plugins/modelopt/skills/evaluation/SKILL.md#L111-L117: instruct users to opt in only after confirming the model source is trusted; do not infer consent from auto_map.
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml#L95-L98: make remote-code execution an explicit, commented opt-in.
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml#L26-L31: remove the default --trust-remote-code flag and require an explicit caller-selected setting.

As per coding guidelines, remote-code trust must be caller-configurable and default to false.

📍 Affects 3 files
  • plugins/modelopt/skills/evaluation/SKILL.md#L111-L117 (this comment)
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml#L95-L98
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml#L26-L31
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 111 - 117, Require
explicit caller opt-in for remote-code execution and never infer trust from
auto_map in plugins/modelopt/skills/evaluation/SKILL.md lines 111-117; document
verification of the model source before enabling it. In
plugins/modelopt/skills/evaluation/recipes/examples/example_eval.yaml lines
95-98, make the trust flag an explicit commented opt-in. In
plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml lines
26-31, remove the default --trust-remote-code setting and expose it only through
an explicitly selected caller configuration, with false as the default.

Source: Coding guidelines


353-365: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Do not authorize arbitrary pre_cmd execution by default.

The generated .env enables NEMO_EVALUATOR_TRUST_PRE_CMD=1, and Step 8 sources it before executing a config whose pre_cmd can run arbitrary commands. The test also makes adding such a command expected behavior.

  • plugins/modelopt/skills/evaluation/SKILL.md#L353-L365: require explicit user confirmation of the exact reviewed pre_cmd before setting the trust variable.
  • plugins/modelopt/skills/evaluation/recipes/env.example#L17-L18: leave the trust variable commented out, with an opt-in warning.
  • plugins/modelopt/skills/evaluation/tests/evals.json#L16-L17: expect an approval gate rather than unconditional pre_cmd insertion.
📍 Affects 3 files
  • plugins/modelopt/skills/evaluation/SKILL.md#L353-L365 (this comment)
  • plugins/modelopt/skills/evaluation/recipes/env.example#L17-L18
  • plugins/modelopt/skills/evaluation/tests/evals.json#L16-L17
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 353 - 365, The
evaluation workflow must not authorize arbitrary pre_cmd execution by default.
In plugins/modelopt/skills/evaluation/SKILL.md lines 353-365, require explicit
user confirmation of the exact reviewed pre_cmd before setting
NEMO_EVALUATOR_TRUST_PRE_CMD=1; in
plugins/modelopt/skills/evaluation/recipes/env.example lines 17-18, keep that
variable commented out with an opt-in warning; and in
plugins/modelopt/skills/evaluation/tests/evals.json lines 16-17, update
expectations to require the approval gate rather than unconditional pre_cmd
insertion.
plugins/modelopt/skills/monitor/SKILL.md (1)

133-139: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Prevent remote command injection through jid.

Line 136 interpolates $jid into a remote shell string. Because job IDs can originate from user input or the registry, a crafted value can execute arbitrary commands on the cluster. Validate the expected SLURM ID format and invoke sacct without embedding untrusted text in a shell command.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/monitor/SKILL.md` around lines 133 - 139, Harden
extract_slurm_state by validating jid against the expected SLURM job-ID format
before making the SSH call, rejecting invalid values without executing a remote
command. Replace the interpolated remote command string with a safe invocation
that passes the validated job ID as an argument rather than embedding untrusted
text in shell syntax, while preserving the existing sacct output normalization.

@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@chadvoegele
chadvoegele force-pushed the cvoegele/modelopt-skills-plugin branch from 71a9c33 to ab56a31 Compare August 11, 2026 16:22
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (18)
plugins/modelopt/skills/day0-release/scripts/gate_run.py-58-74 (1)

58-74: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reject malformed run-summary structures before processing them.

A valid JSON file can set tasks to [], a task record to null, or errors to {}. The current code then calls .items(), .get(), or " ".join() on incompatible values and raises instead of returning a non-passing verdict. A sufficiently large JSON integer score can also raise OverflowError in math.isfinite.

Validate summary, tasks, task records, and errors against the documented schema at the interface boundary. Return a structured configuration error for invalid input. Apply math.isfinite only after safe numeric validation.

Also applies to: 102-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_run.py` around lines 58 -
74, Update the run-summary validation at the gate_run interface before iterating
tasks: require summary and tasks to be mappings, each task record to be a
mapping, and errors to be a sequence of valid error values rather than accepting
[]/null/{} blindly. Return the existing structured USER_CONFIG_ERROR verdict for
every schema violation, and validate numeric fields—including score for finite,
range-safe numeric values—before calling math.isfinite or processing them.
plugins/modelopt/skills/day0-release/scripts/gate_run.py-95-97 (1)

95-97: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Require valid sample counts.

The is not None guard accepts omitted counts and equal non-integer values. For example, a SUCCESS task with a numeric score and no sample counts passes this gate. This allows an incompletely accounted evaluation run into the release decision.

Reject missing, Boolean, non-integer, and negative sample counts before comparing them. Classify these cases as SAMPLE_ACCOUNTING_FAILED. Add tests for omitted and string-valued counts.

Proposed fix
-        if expected is not None and scored is not None and scored != expected:
+        valid_counts = (
+            isinstance(expected, int)
+            and not isinstance(expected, bool)
+            and expected >= 0
+            and isinstance(scored, int)
+            and not isinstance(scored, bool)
+            and scored >= 0
+        )
+        if not valid_counts:
+            ok = False
+            reasons.append("sample accounting: invalid or missing counts")
+        elif scored != expected:
             ok = False
             reasons.append(f"sample accounting: scored {scored} of {expected}")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_run.py` around lines 95 -
97, Validate scored and expected sample counts before the comparison in the gate
logic: reject missing, Boolean, non-integer, and negative values, classify any
such case as SAMPLE_ACCOUNTING_FAILED, and retain the mismatch failure for valid
unequal counts. Add coverage for omitted counts and string-valued counts, while
preserving valid integer accounting behavior.
plugins/modelopt/skills/eagle3-validate/SKILL.md-17-24 (1)

17-24: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Search the configured experiment location.

The command only searches experiments/cicd/cicd_*. Valid runs can be under experiments/ or the path supplied through --job-dir.

Ask for the experiment path first. If no path is available, search the launcher output location without requiring the cicd_* name. plugins/modelopt/skills/eagle3-review-logs/SKILL.md:15-18 documents both locations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/eagle3-validate/SKILL.md` around lines 17 - 24,
Update the experiment-directory discovery instructions around the “most recent
experiment directory” step to ask for the experiment path first, then search the
configured launcher output location when no path is provided. Support both the
default experiments location and the path supplied through --job-dir, without
requiring a cicd_* directory name; align the search behavior with the locations
documented in eagle3-review-logs.
plugins/modelopt/skills/day0-release/scripts/gate_compare.py-92-126 (1)

92-126: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Validate the complete JSON schema at the CLI boundary.

Malformed JSON objects can reach unchecked mapping and numeric operations. The gates then raise exceptions instead of returning structured configuration errors.

  • plugins/modelopt/skills/day0-release/scripts/gate_compare.py#L92-L126: require mapping inputs, preserve invalid scales values for rejection, and require a finite non-negative threshold.
  • plugins/modelopt/skills/day0-release/scripts/gate_ptq.py#L66-L103: require a summary mapping, mapping precision counts, finite non-boolean sizes, non-negative output size, and non-negative integer counts.
  • Both CLIs: return exit code 2 when the resulting failure class is USER_CONFIG_ERROR.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_compare.py` around lines 92
- 126, Validate the complete CLI input schema before processing: in
gate_compare.py, require baseline and candidate mappings, preserve invalid
scales for rejection, and require threshold to be finite and non-negative; in
gate_ptq.py, validate the summary mapping, precision-count mappings, finite
non-boolean sizes, non-negative output size, and non-negative integer counts.
Update both CLIs to exit with code 2 whenever the resulting failure_class is
USER_CONFIG_ERROR.
plugins/modelopt/skills/deployment/scripts/deploy.sh-199-203 (1)

199-203: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Create and verify a dedicated server process group.

A reused PID for any Python process passes is_server_running. Also, nohup does not make the launched process a process-group leader, so kill -- -"$pid" usually fails and cleanup only kills the parent.

  • plugins/modelopt/skills/deployment/scripts/deploy.sh#L199-L203: verify the expected vllm or sglang command and persist a process identity marker such as start time.
  • plugins/modelopt/skills/deployment/scripts/deploy.sh#L292-L293: launch vLLM in a dedicated session or process group.
  • plugins/modelopt/skills/deployment/scripts/deploy.sh#L319-L320: launch SGLang in the same way.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh` around lines 199 - 203,
Update plugins/modelopt/skills/deployment/scripts/deploy.sh lines 199-203 in
is_server_running to accept only the expected vLLM or SGLang command, persist
and validate a process identity marker such as start time, and reject reused
Python PIDs; update lines 292-293 in the vLLM launch and lines 319-320 in the
SGLang launch to start each server in a dedicated session or process group so
cleanup via the server PID terminates the full process group.
plugins/modelopt/skills/common/environment-setup.md-37-40 (1)

37-40: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Resolve the helper from the installed plugin root.

.agents/skills exists only as a repository compatibility symlink. Use the plugin-root resolver instead, such as ${CLAUDE_PLUGIN_ROOT}/skills/common/remote_exec.sh for Claude Code. Apply this to environment-setup.md, deployment/SKILL.md, and common/remote-execution.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/environment-setup.md` around lines 37 - 40,
Resolve remote_exec.sh from the installed plugin root instead of the
repository-relative .agents/skills path. Update
plugins/modelopt/skills/common/environment-setup.md lines 37-40 and
plugins/modelopt/skills/deployment/SKILL.md lines 219-223, preserving the
existing remote_load_cluster, remote_check_ssh, and remote_detect_env calls
while using the plugin-root-based path; apply the same path correction in
common/remote-execution.md.

Source: Coding guidelines

plugins/modelopt/skills/evaluation/references/parallelism.md-3-7 (1)

3-7: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not state that topology and concurrency never affect scores.

The document later describes preemption, truncation, timeouts, and retries. These failures can change the number and content of scored responses. Replace “never scores” with a qualified statement such as “primarily affect throughput; validate score integrity after tuning.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md` around lines 3
- 7, Update the “Two decisions, in order” statement in the parallelism guidance
to remove the claim that topology and concurrency never affect scores. Qualify
their impact as primarily affecting throughput and instruct readers to validate
score integrity after tuning, consistent with the documented preemption,
truncation, timeout, and retry behavior.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-109-110 (1)

109-110: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Support single-file exports and missing quantization metadata.

The layer-coverage script unconditionally opens model.safetensors.index.json and hf_quant_config.json. A valid non-sharded export may have only model.safetensors, and some exports may store quantization metadata only in config.json. The required validation gate then crashes instead of producing a result. Reuse the single-file header scan from the VLM check and fail with an explicit remediation message when metadata is unavailable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
109 - 110, Update the layer-coverage validation script around the
`model.safetensors.index.json` and `hf_quant_config.json` loads to support
non-sharded exports by reusing the VLM check’s single-file header scan. Fall
back to quantization metadata from `config.json` when `hf_quant_config.json` is
absent, and fail with an explicit remediation message when required metadata
cannot be found.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-85-91 (1)

85-91: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fail closed when the source contains no supported weight files.

For a directory containing .bin or .pt shards, safetensor_bytes() returns zero. The ratio becomes NaN, so the blocking rule at line 98 does not run. Raise an error for an empty source set or explicitly support the source formats used by the validation gate.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
85 - 91, Update safetensor_bytes and the validation flow to handle supported
source weight files beyond .safetensors, including .bin and .pt shards, or
reject directories with no supported weight files before calculating the ratio.
Ensure an empty source set raises an error and cannot produce NaN that bypasses
the blocking validation rule.
plugins/modelopt/skills/evaluation/references/parallelism.md-94-98 (1)

94-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep the worked example below the request ceiling.

The rules state that parallelism cannot exceed dataset_size × repeats, but the example uses parallelism=256 for 198 requests. Use 198 (or document a different client-side meaning for 256). The example should also derive --max-num-seqs from the selected value.

Also applies to: 154-157

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md` around lines 94
- 98, Update the worked example’s parallelism value to remain at or below the
198-request ceiling, or explicitly define a different client-side meaning for
256. Derive the example’s --max-num-seqs setting from the selected parallelism
value, and apply the same correction to the corresponding example section around
the later referenced lines.
plugins/modelopt/skills/ptq/SKILL.md-38-42 (1)

38-42: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Scan all remote-code Python modules.

The command only scans modeling_*.py, but auto_map can reference configuration, tokenizer, processor, or other custom modules. Missing imports will be discovered only when model loading fails. Inspect every file listed by auto_map, or scan all custom Python files.

Proposed correction
-grep -h "^from \|^import " <model_path>/modeling_*.py | sort -u
+find <model_path> -type f -name '*.py' -exec \
+  grep -hE '^(from|import) ' {} + | sort -u
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/SKILL.md` around lines 38 - 42, Update the
remote-code dependency inspection guidance in the trust_remote_code section to
scan every custom Python module referenced by config.json auto_map, or all
custom Python files when appropriate, rather than limiting the command to
modeling_*.py; preserve the existing import extraction and deduplication
behavior.
plugins/modelopt/skills/ptq/references/checkpoint-validation.md-54-55 (1)

54-55: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Check the full quantization scale-key set in the VLM gate.

The VLM scan checks only weight_scale and input_scale, but the coverage script recognizes weight_scale_2, activation_scale, and weight_scale_inv. A vision tensor with only an omitted key can pass the required VLM gate.

Proposed correction
-vis_q = [k for k in keys if any(t in k for t in ('model.visual', 'vision_tower', 'vision_model'))
-         and any(s in k for s in ('weight_scale', 'input_scale'))]
+vis_q = [k for k in keys
+         if any(t in k for t in ('model.visual', 'vision_tower', 'vision_model'))
+         and any(s in k for s in (
+             'weight_scale', 'weight_scale_2', 'input_scale',
+             'activation_scale', 'weight_scale_inv'))]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md` around lines
54 - 55, Update the VLM scale-key filter in the checkpoint validation scan to
recognize the complete quantization key set: weight_scale, input_scale,
weight_scale_2, activation_scale, and weight_scale_inv. Keep the existing
vision-key matching unchanged so the VLM gate evaluates all relevant vision
quantization tensors.
plugins/modelopt/skills/ptq/SKILL.md-21-22 (1)

21-22: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use an unambiguous shared-skill path convention.

No repository-root skills/common directory exists. Use plugins/modelopt/skills/common/... for repository-root-relative references, or document that the loader resolves skills/common/... from the plugin root. Apply the same convention at lines 21–22 and 199–200.

Expand the custom-code dependency scan beyond modeling_*.py, or state its limitation. Custom checkpoints can also provide tokenization_*.py and other imported modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/SKILL.md` around lines 21 - 22, Update the skill
references at the indicated introductory and later sections to use the
unambiguous plugins/modelopt/skills/common/... convention, or explicitly
document plugin-root resolution. Also expand the custom-code dependency scan
beyond modeling_*.py to include tokenization_*.py and other imported modules, or
clearly state the scan’s limitation.

Sources: Coding guidelines, Learnings

plugins/modelopt/skills/evaluation/references/parallelism.md-86-88 (1)

86-88: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use one --max-num-seqs formula.

When num_instances > 1, use:

Proposed correction
--max-num-seqs = ceil(max parallelism across tasks / DP)
+--max-num-seqs = ceil(max parallelism across tasks / (DP × num_instances))

parallelism is global across instances, while --max-num-seqs applies per instance. Update the duplicate guidance in plugins/modelopt/skills/evaluation/SKILL.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md` around lines 86
- 88, Update the duplicate max-num-seqs guidance in SKILL.md to use a single
formula that divides global parallelism by DP multiplied by num_instances,
applying ceiling as needed. Keep the serving_capacity relationship consistent
and ensure the documentation reflects that max-num-seqs is per instance while
parallelism is global.
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py-845-855 (1)

845-855: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

combined_results.csv is lost when any step after case execution raises. main writes the combined table as its final action, so every failure-prone step that runs before _write_results can discard results that were already measured. SKILL.md documents the opposite contract: the table is always written and the command then exits nonzero.

  • plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py#L845-L855: wrap the _attach_quant_times call in a handler that records the failure as an ERROR: ... quant_result, then always call _write_results.
  • plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py#L776-L780: guard the float(case_rows[-1]["median_time"]) conversion with try/except (KeyError, TypeError, ValueError) and fall back to _failure_message instead of propagating.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py`
around lines 845 - 855, Ensure main always writes combined_results.csv: wrap
_attach_quant_times in failure handling that records an ERROR: ... quant_result,
then call _write_results regardless of attachment failures; additionally, in the
result-building logic around float(case_rows[-1]["median_time"]), catch
KeyError, TypeError, and ValueError and use _failure_message instead of
propagating. Apply both changes in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py
at lines 845-855 and 776-780.
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py-32-32 (1)

32-32: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Remove the # nosec markers or obtain explicit codeowner approval.

Three Bandit suppressions are present: # nosec B404 at Line 32, # nosec B603 at Line 235, and # nosec B603 B607 at Line 297. The repository guidelines prohibit # nosec as a bypass.

Both call sites already avoid a shell and pass a fixed executable with an argument list, so the underlying pattern is defensible. The suppression mechanism is the problem. Configure the Bandit skip in the project configuration, or record the approval in the PR description.

As per coding guidelines: "Any use of '# nosec' comments to bypass Bandit security checks is not allowed. If a security-sensitive pattern is genuinely necessary, the PR must be reviewed and approved by @NVIDIA/modelopt-setup-codeowners with an explicit justification in the PR description."

Run the following script to check the repository's Bandit configuration and existing precedent:

#!/bin/bash
# Description: Inspect Bandit configuration and existing nosec usage.
fd -H -t f 'pyproject.toml|.bandit|bandit.yaml|.pre-commit-config.yaml' --exec sh -c 'echo "== {} =="; rg -n -A6 -i "bandit|skips|B603|B404|B607" "{}"'

# Existing nosec precedent elsewhere in the repository.
rg -n --type=py 'nosec' | head -40

Also applies to: 235-235, 297-297

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py`
at line 32, Remove the inline # nosec suppressions associated with subprocess
usage in benchmark_via_builtin.py, including the import and both subprocess call
sites. Configure the applicable Bandit exclusions in the project’s existing
Bandit configuration instead, following repository precedent and preserving the
non-shell, fixed-argument-list execution behavior.

Source: Coding guidelines

plugins/modelopt/skills/common/remote_exec.sh-104-107 (1)

104-107: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use portable encodings for base64 and the host hash.

base64 -w0 and md5sum are GNU coreutils features. BSD/macOS base64 does not accept -w, and macOS ships md5 instead of md5sum. On a macOS workstation, remote_run produces an empty or wrapped payload and _ssh_control_path produces an empty hash. Both failures are silent.

Use tr -d '\n' for wrapping and a portable hash helper.

🔧 Proposed portable fallbacks
-    host_hash=$(echo "${REMOTE_USER}@${REMOTE_HOST}" | md5sum | cut -c1-12)
+    if command -v md5sum >/dev/null 2>&1; then
+        host_hash=$(printf '%s' "${REMOTE_USER}@${REMOTE_HOST}" | md5sum | cut -c1-12)
+    else
+        host_hash=$(printf '%s' "${REMOTE_USER}@${REMOTE_HOST}" | md5 -q | cut -c1-12)
+    fi
-    encoded=$(printf '%s' "$full_cmd" | base64 -w0)
+    encoded=$(printf '%s' "$full_cmd" | base64 | tr -d '\n')

Also applies to: 348-352

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote_exec.sh` around lines 104 - 107, Update
the base64 encoding in remote_run to remove line breaks with tr -d '\n' instead
of the GNU-only -w0 option, and update _ssh_control_path to compute host_hash
through a portable hash helper that supports macOS md5 and GNU md5sum. Preserve
the existing payload and short control-path behavior while ensuring neither
command silently produces empty or wrapped output.
plugins/modelopt/skills/common/remote_exec.sh-476-495 (1)

476-495: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Single quotes break when $cmd or $container_or_image contains an apostrophe.

remote_docker_run wraps $cmd in single quotes inside a remote command string. A single quote in $cmd closes the quote early. The remainder is then executed as separate remote shell words. The same problem applies to $container_or_image in the grep -x call at Line 486.

remote_run already solves quoting with base64. Apply the same approach to the inner container command.

🔒 Proposed fix using a base64 payload for the container command
     local container_or_image="$1"
     local cmd="$2"
+    local encoded_cmd
+    encoded_cmd=$(printf '%s' "$cmd" | base64 | tr -d '\n')
+    local inner="echo ${encoded_cmd} | base64 -d | bash"
 
     # Check if it's a running container
     local is_running
-    is_running=$(remote_run "docker ps --format '{{.Names}}' | grep -x '$container_or_image' 2>/dev/null" 2>&1 || true)
+    local encoded_name
+    encoded_name=$(printf '%s' "$container_or_image" | base64 | tr -d '\n')
+    is_running=$(remote_run "docker ps --format '{{.Names}}' | grep -xF \"\$(echo ${encoded_name} | base64 -d)\" 2>/dev/null" 2>&1 || true)
 
     if [[ -n "$is_running" ]]; then
         echo "Executing in running container: $container_or_image"
-        remote_run "docker exec $container_or_image bash -c '$cmd'"
+        remote_run "docker exec ${container_or_image} bash -c ${inner@Q}"
     else
         echo "Running in new container: $container_or_image"
-        remote_run "docker run --rm --gpus all -v ${REMOTE_WORKSPACE}:${REMOTE_WORKSPACE} -w ${REMOTE_WORKSPACE} $container_or_image bash -c '$cmd'"
+        remote_run "docker run --rm --gpus all -v ${REMOTE_WORKSPACE}:${REMOTE_WORKSPACE} -w ${REMOTE_WORKSPACE} ${container_or_image} bash -c ${inner@Q}"
     fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote_exec.sh` around lines 476 - 495, Update
remote_docker_run to avoid embedding raw container_or_image or cmd values in
single-quoted remote command strings. Reuse remote_run’s existing base64 quoting
approach for the inner container command, and safely encode or pass
container_or_image for the grep check and Docker invocation so apostrophes
cannot alter shell parsing.
🟡 Minor comments (4)
plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-trace-analysis.md-15-15 (1)

15-15: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace the invalid run-level agent-log path.

Terminal-Bench 2.1 documents agent logs only under artifacts/terminal-bench/{task_name}/{trial_name}/agent-logs/episode-N/. Use this path for trace analysis.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-trace-analysis.md`
at line 15, Update the agent-log reference in the trace-analysis documentation
to use the Terminal-Bench 2.1 task/trial episode path under
artifacts/terminal-bench/{task_name}/{trial_name}/agent-logs/episode-N/,
replacing the invalid run-level tasks.jsonl path.
plugins/modelopt/skills/deployment/scripts/deploy.sh-545-553 (1)

545-553: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate the TCP port range.

The numeric check accepts 0 and values above 65535. Port 0 makes the server choose a port, but wait_for_server still probes localhost:0. Validate 1 <= PORT <= 65535 before launch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh` around lines 545 - 553,
Update the PORT validation in the numeric-argument validation block to require a
value between 1 and 65535 inclusive, rejecting zero and values above 65535
before launch. Preserve the existing error logging and exit behavior, while
leaving TP_SIZE validation unchanged.
plugins/modelopt/skills/evaluation/references/parallelism.md-21-22 (1)

21-22: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Change “must be a power of 2” to “prefer a power of 2.” vLLM supports non-power-of-two TP sizes when the model dimensions are divisible by the selected TP size.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md` around lines 21
- 22, Update the TP guidance in the parallelism documentation to say that
power-of-two sizes are preferred rather than required. Preserve the requirements
that TP divides the model’s attention dimensions and does not cross nodes, while
acknowledging non-power-of-two sizes when dimensions are divisible.
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py-518-525 (1)

518-525: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a 64-aligned intermediate size for gated nvfp4_trtllm. The TRT-LLM NVFP4 path requires the gated gate/up dimension (2 * intermediate) to be divisible by 128. fp8_intermediate only aligns gated sizes to 16; for example, 65 becomes 80 instead of 128. Compute a separate 64-aligned value and add a regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py`
around lines 518 - 525, Update the nvfp4_trtllm registration for
trtllm_fp4_block_scale_moe to compute and use a separate 64-aligned intermediate
size, rather than fp8_intermediate, so the gated 2 * intermediate dimension is
divisible by 128; add a regression test covering a value such as 65 that must
round to 128.
🧹 Nitpick comments (7)
plugins/modelopt/skills/day0-release/scripts/gate_run.py (1)

41-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Define the module public API.

Add __all__ = ["evaluate_run", "main"] after the imports. This prevents imported standard-library names from becoming unintended exports.

As per coding guidelines: “Define each module's public API with __all__ = [...].”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_run.py` around lines 41 -
46, Add the module-level __all__ declaration after the imports in gate_run.py,
exposing only evaluate_run and main so imported standard-library names are not
part of the public API.

Source: Coding guidelines

plugins/modelopt/skills/day0-release/scripts/gate_compare.py (1)

49-75: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Declare the module public APIs.

Add __all__ for the callable gate APIs and exported decision constants.

  • plugins/modelopt/skills/day0-release/scripts/gate_compare.py#L49-L75: declare ACCEPT, REGRESSION, ANOMALOUS, evaluate_comparison, and main.
  • plugins/modelopt/skills/day0-release/scripts/gate_ptq.py#L50-L61: declare evaluate_checkpoint and main.

As per coding guidelines: “Define each module's public API with __all__ = [...].”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/day0-release/scripts/gate_compare.py` around lines 49
- 75, Declare the module public APIs with __all__: in gate_compare.py, include
ACCEPT, REGRESSION, ANOMALOUS, evaluate_comparison, and main; in gate_ptq.py,
include evaluate_checkpoint and main. No direct changes are required beyond
adding the corresponding export declarations at the affected sites.

Source: Coding guidelines

plugins/modelopt/skills/benchmark-model-kernels/tests/test_benchmark_model.py (2)

223-225: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the redundant assertion after the skip.

Line 224 already exits the test when either class is missing. The assert on Line 225 can never fail.

As per coding guidelines: "Validate external input once at the interface boundary; let internal code trust those checks and avoid redundant assertions."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/benchmark-model-kernels/tests/test_benchmark_model.py`
around lines 223 - 225, Remove the redundant assert after the pytest.skip guard
in the test setup, leaving the existing config_cls/model_cls availability check
and skip behavior unchanged.

Source: Coding guidelines


159-161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert that problems is empty in the Mixtral and GPT-OSS tests.

Both tests discard the third return value of _inspect_model. If a future change makes these layouts report an unsupported decoder Linear or an expert-count mismatch, the MoE assertion still passes and the regression goes unnoticed. Other tests in this file already assert problems == [].

💚 Proposed change
-    _, moe, _ = benchmark_model._inspect_model(model, config, tp=2, ep=2)
+    _, moe, problems = benchmark_model._inspect_model(model, config, tp=2, ep=2)
 
+    assert problems == []
     assert moe == benchmark_model._MoeShape(32, 48, 2, 2, "Swiglu")

Also applies to: 180-182

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/modelopt/skills/benchmark-model-kernels/tests/test_benchmark_model.py`
around lines 159 - 161, Update the Mixtral and GPT-OSS tests around
_inspect_model to retain the third return value as problems and assert that
problems == [] alongside the existing MoE shape assertions. Do not discard the
diagnostic result in either test.
plugins/modelopt/skills/common/remote_exec.sh (1)

437-465: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

remote_wait_job can poll forever.

The loop exits only on a terminal state. A job stuck in PENDING, CONFIGURING, or SUSPENDED keeps the caller blocked with no upper bound. Add an optional maximum wait argument.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/common/remote_exec.sh` around lines 437 - 465, Update
remote_wait_job to accept an optional maximum wait duration in addition to the
existing job ID and polling interval, track elapsed waiting time across polls,
and exit with an error after the limit is reached while preserving current
terminal-state handling. Ensure the default behavior remains compatible when no
maximum wait is provided.
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py (2)

149-160: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

The multimodal fallback hides the original construction error.

Line 152 catches every exception and retries with text_config. If the retry also fails, the outer handler at Line 159 reports only the second failure. The first failure is usually the more informative one for a plain text model whose config happens to expose text_config.

Chain the original error into the retry failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py`
around lines 149 - 160, Update the inner fallback around
AutoModelForCausalLM.from_config so that if the retry using text_config also
fails, its exception is chained from the original construction exception.
Preserve re-raising the original error when text_config is unavailable, and
ensure the outer ShapeError retains the chained error context.

27-34: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Both new script modules omit __all__. The repository guidelines require every module to declare its public API explicitly. Neither new module does.

  • plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py#L27-L34: add __all__ = ["ShapeError", "main"] after the imports.
  • plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py#L26-L36: add __all__ = ["main"] after the imports.

As per coding guidelines: "Define each module's public API with __all__ = [...]."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py`
around lines 27 - 34, Define each new script module’s public API with __all__
immediately after its imports: in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py:27-34,
declare ShapeError and main; in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py:26-36,
declare main.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/modelopt/skills/evaluation/SKILL.md`:
- Around line 140-174: Require explicit user approval before adding
--trust-remote-code when auto_map or custom remote code is detected, and pin the
reviewed model revision after approval; update the guidance in
plugins/modelopt/skills/evaluation/SKILL.md lines 140-174. Update the comment in
plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml
lines 109-113 to require the same approval while keeping remote code disabled by
default.
- Around line 84-86: Remove all instructions to source the workspace .env,
including the setup guidance and the corresponding section around the later
referenced steps. Rely on NEL’s automatic workspace-root .env loading as
documented by the launching-evals run-evaluation guidance, while retaining safe
creation via cp and the prohibition on opening .env with Read/Write/Edit.

In `@plugins/modelopt/skills/ptq/references/unsupported-models.md`:
- Around line 13-15: Update the guidance around custom modeling/tokenization
files to require reviewing the checkpoint-supplied source before enabling remote
code execution. Replace the unconditional “always use” wording and ensure
diagnostic commands explicitly pass trust_remote_code=True only after review,
while preserving the existing CLI and helper defaults of False.

---

Major comments:
In
`@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py`:
- Around line 845-855: Ensure main always writes combined_results.csv: wrap
_attach_quant_times in failure handling that records an ERROR: ... quant_result,
then call _write_results regardless of attachment failures; additionally, in the
result-building logic around float(case_rows[-1]["median_time"]), catch
KeyError, TypeError, and ValueError and use _failure_message instead of
propagating. Apply both changes in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py
at lines 845-855 and 776-780.
- Line 32: Remove the inline # nosec suppressions associated with subprocess
usage in benchmark_via_builtin.py, including the import and both subprocess call
sites. Configure the applicable Bandit exclusions in the project’s existing
Bandit configuration instead, following repository precedent and preserving the
non-shell, fixed-argument-list execution behavior.

In `@plugins/modelopt/skills/common/environment-setup.md`:
- Around line 37-40: Resolve remote_exec.sh from the installed plugin root
instead of the repository-relative .agents/skills path. Update
plugins/modelopt/skills/common/environment-setup.md lines 37-40 and
plugins/modelopt/skills/deployment/SKILL.md lines 219-223, preserving the
existing remote_load_cluster, remote_check_ssh, and remote_detect_env calls
while using the plugin-root-based path; apply the same path correction in
common/remote-execution.md.

In `@plugins/modelopt/skills/common/remote_exec.sh`:
- Around line 104-107: Update the base64 encoding in remote_run to remove line
breaks with tr -d '\n' instead of the GNU-only -w0 option, and update
_ssh_control_path to compute host_hash through a portable hash helper that
supports macOS md5 and GNU md5sum. Preserve the existing payload and short
control-path behavior while ensuring neither command silently produces empty or
wrapped output.
- Around line 476-495: Update remote_docker_run to avoid embedding raw
container_or_image or cmd values in single-quoted remote command strings. Reuse
remote_run’s existing base64 quoting approach for the inner container command,
and safely encode or pass container_or_image for the grep check and Docker
invocation so apostrophes cannot alter shell parsing.

In `@plugins/modelopt/skills/day0-release/scripts/gate_compare.py`:
- Around line 92-126: Validate the complete CLI input schema before processing:
in gate_compare.py, require baseline and candidate mappings, preserve invalid
scales for rejection, and require threshold to be finite and non-negative; in
gate_ptq.py, validate the summary mapping, precision-count mappings, finite
non-boolean sizes, non-negative output size, and non-negative integer counts.
Update both CLIs to exit with code 2 whenever the resulting failure_class is
USER_CONFIG_ERROR.

In `@plugins/modelopt/skills/day0-release/scripts/gate_run.py`:
- Around line 58-74: Update the run-summary validation at the gate_run interface
before iterating tasks: require summary and tasks to be mappings, each task
record to be a mapping, and errors to be a sequence of valid error values rather
than accepting []/null/{} blindly. Return the existing structured
USER_CONFIG_ERROR verdict for every schema violation, and validate numeric
fields—including score for finite, range-safe numeric values—before calling
math.isfinite or processing them.
- Around line 95-97: Validate scored and expected sample counts before the
comparison in the gate logic: reject missing, Boolean, non-integer, and negative
values, classify any such case as SAMPLE_ACCOUNTING_FAILED, and retain the
mismatch failure for valid unequal counts. Add coverage for omitted counts and
string-valued counts, while preserving valid integer accounting behavior.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh`:
- Around line 199-203: Update
plugins/modelopt/skills/deployment/scripts/deploy.sh lines 199-203 in
is_server_running to accept only the expected vLLM or SGLang command, persist
and validate a process identity marker such as start time, and reject reused
Python PIDs; update lines 292-293 in the vLLM launch and lines 319-320 in the
SGLang launch to start each server in a dedicated session or process group so
cleanup via the server PID terminates the full process group.

In `@plugins/modelopt/skills/eagle3-validate/SKILL.md`:
- Around line 17-24: Update the experiment-directory discovery instructions
around the “most recent experiment directory” step to ask for the experiment
path first, then search the configured launcher output location when no path is
provided. Support both the default experiments location and the path supplied
through --job-dir, without requiring a cicd_* directory name; align the search
behavior with the locations documented in eagle3-review-logs.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md`:
- Around line 3-7: Update the “Two decisions, in order” statement in the
parallelism guidance to remove the claim that topology and concurrency never
affect scores. Qualify their impact as primarily affecting throughput and
instruct readers to validate score integrity after tuning, consistent with the
documented preemption, truncation, timeout, and retry behavior.
- Around line 94-98: Update the worked example’s parallelism value to remain at
or below the 198-request ceiling, or explicitly define a different client-side
meaning for 256. Derive the example’s --max-num-seqs setting from the selected
parallelism value, and apply the same correction to the corresponding example
section around the later referenced lines.
- Around line 86-88: Update the duplicate max-num-seqs guidance in SKILL.md to
use a single formula that divides global parallelism by DP multiplied by
num_instances, applying ceiling as needed. Keep the serving_capacity
relationship consistent and ensure the documentation reflects that max-num-seqs
is per instance while parallelism is global.

In `@plugins/modelopt/skills/ptq/references/checkpoint-validation.md`:
- Around line 109-110: Update the layer-coverage validation script around the
`model.safetensors.index.json` and `hf_quant_config.json` loads to support
non-sharded exports by reusing the VLM check’s single-file header scan. Fall
back to quantization metadata from `config.json` when `hf_quant_config.json` is
absent, and fail with an explicit remediation message when required metadata
cannot be found.
- Around line 85-91: Update safetensor_bytes and the validation flow to handle
supported source weight files beyond .safetensors, including .bin and .pt
shards, or reject directories with no supported weight files before calculating
the ratio. Ensure an empty source set raises an error and cannot produce NaN
that bypasses the blocking validation rule.
- Around line 54-55: Update the VLM scale-key filter in the checkpoint
validation scan to recognize the complete quantization key set: weight_scale,
input_scale, weight_scale_2, activation_scale, and weight_scale_inv. Keep the
existing vision-key matching unchanged so the VLM gate evaluates all relevant
vision quantization tensors.

In `@plugins/modelopt/skills/ptq/SKILL.md`:
- Around line 38-42: Update the remote-code dependency inspection guidance in
the trust_remote_code section to scan every custom Python module referenced by
config.json auto_map, or all custom Python files when appropriate, rather than
limiting the command to modeling_*.py; preserve the existing import extraction
and deduplication behavior.
- Around line 21-22: Update the skill references at the indicated introductory
and later sections to use the unambiguous plugins/modelopt/skills/common/...
convention, or explicitly document plugin-root resolution. Also expand the
custom-code dependency scan beyond modeling_*.py to include tokenization_*.py
and other imported modules, or clearly state the scan’s limitation.

---

Minor comments:
In
`@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py`:
- Around line 518-525: Update the nvfp4_trtllm registration for
trtllm_fp4_block_scale_moe to compute and use a separate 64-aligned intermediate
size, rather than fp8_intermediate, so the gated 2 * intermediate dimension is
divisible by 128; add a regression test covering a value such as 65 that must
round to 128.

In `@plugins/modelopt/skills/deployment/scripts/deploy.sh`:
- Around line 545-553: Update the PORT validation in the numeric-argument
validation block to require a value between 1 and 65535 inclusive, rejecting
zero and values above 65535 before launch. Preserve the existing error logging
and exit behavior, while leaving TP_SIZE validation unchanged.

In `@plugins/modelopt/skills/evaluation/references/parallelism.md`:
- Around line 21-22: Update the TP guidance in the parallelism documentation to
say that power-of-two sizes are preferred rather than required. Preserve the
requirements that TP divides the model’s attention dimensions and does not cross
nodes, while acknowledging non-power-of-two sizes when dimensions are divisible.

In
`@plugins/modelopt/skills/launching-evals/references/benchmarks/terminal-bench-trace-analysis.md`:
- Line 15: Update the agent-log reference in the trace-analysis documentation to
use the Terminal-Bench 2.1 task/trial episode path under
artifacts/terminal-bench/{task_name}/{trial_name}/agent-logs/episode-N/,
replacing the invalid run-level tasks.jsonl path.

---

Nitpick comments:
In `@plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py`:
- Around line 149-160: Update the inner fallback around
AutoModelForCausalLM.from_config so that if the retry using text_config also
fails, its exception is chained from the original construction exception.
Preserve re-raising the original error when text_config is unavailable, and
ensure the outer ShapeError retains the chained error context.
- Around line 27-34: Define each new script module’s public API with __all__
immediately after its imports: in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_model.py:27-34,
declare ShapeError and main; in
plugins/modelopt/skills/benchmark-model-kernels/scripts/benchmark_via_builtin.py:26-36,
declare main.

In
`@plugins/modelopt/skills/benchmark-model-kernels/tests/test_benchmark_model.py`:
- Around line 223-225: Remove the redundant assert after the pytest.skip guard
in the test setup, leaving the existing config_cls/model_cls availability check
and skip behavior unchanged.
- Around line 159-161: Update the Mixtral and GPT-OSS tests around
_inspect_model to retain the third return value as problems and assert that
problems == [] alongside the existing MoE shape assertions. Do not discard the
diagnostic result in either test.

In `@plugins/modelopt/skills/common/remote_exec.sh`:
- Around line 437-465: Update remote_wait_job to accept an optional maximum wait
duration in addition to the existing job ID and polling interval, track elapsed
waiting time across polls, and exit with an error after the limit is reached
while preserving current terminal-state handling. Ensure the default behavior
remains compatible when no maximum wait is provided.

In `@plugins/modelopt/skills/day0-release/scripts/gate_compare.py`:
- Around line 49-75: Declare the module public APIs with __all__: in
gate_compare.py, include ACCEPT, REGRESSION, ANOMALOUS, evaluate_comparison, and
main; in gate_ptq.py, include evaluate_checkpoint and main. No direct changes
are required beyond adding the corresponding export declarations at the affected
sites.

In `@plugins/modelopt/skills/day0-release/scripts/gate_run.py`:
- Around line 41-46: Add the module-level __all__ declaration after the imports
in gate_run.py, exposing only evaluate_run and main so imported standard-library
names are not part of the public API.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

🛑 Comments failed to post (3)
plugins/modelopt/skills/evaluation/SKILL.md (2)

84-86: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Do not source the workspace .env file.

source .env executes command substitutions and shell code in any existing workspace file. A malicious or copied .env can therefore execute code on the submitting host.

Let NEL load the workspace-root .env instead. plugins/modelopt/skills/launching-evals/references/run-evaluation.md:11-26 states that NEL automatically reads that file. Remove the instruction to source it.

Also applies to: 389-394

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 84: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 392: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 394: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 84 - 86, Remove all
instructions to source the workspace .env, including the setup guidance and the
corresponding section around the later referenced steps. Rely on NEL’s automatic
workspace-root .env loading as documented by the launching-evals run-evaluation
guidance, while retaining safe creation via cp and the prohibition on opening
.env with Read/Write/Edit.

140-174: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Require explicit approval for remote model code.

auto_map and “custom-code model” identify a remote-code requirement. They do not establish that the model repository is trusted. Do not add --trust-remote-code automatically.

  • plugins/modelopt/skills/evaluation/SKILL.md#L140-L174: Require an explicit user trust decision before adding --trust-remote-code. Pin the reviewed model revision when approval is given.
  • plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml#L109-L113: Change the comment to require the same explicit approval. Keep remote code disabled by default.
🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 84: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 392: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 394: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

📍 Affects 2 files
  • plugins/modelopt/skills/evaluation/SKILL.md#L140-L174 (this comment)
  • plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml#L109-L113
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 140 - 174, Require
explicit user approval before adding --trust-remote-code when auto_map or custom
remote code is detected, and pin the reviewed model revision after approval;
update the guidance in plugins/modelopt/skills/evaluation/SKILL.md lines
140-174. Update the comment in
plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml
lines 109-113 to require the same approval while keeping remote code disabled by
default.
plugins/modelopt/skills/ptq/references/unsupported-models.md (1)

13-15: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C 3 --glob '*.py' --glob '*.md' \
  'trust_remote_code\s*=\s*True|--trust_remote_code' \
  plugins/modelopt/skills

Repository: NVIDIA/Model-Optimizer

Length of output: 3185


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- unsupported-models.md ---'
cat -n plugins/modelopt/skills/ptq/references/unsupported-models.md

printf '%s\n' '--- all trust_remote_code references in the skill tree ---'
rg -n -C 4 --glob '*.py' --glob '*.md' --glob '*.yaml' --glob '*.yml' \
  'trust_remote_code|hf_ptq\.py' plugins/modelopt/skills

printf '%s\n' '--- likely CLI definitions and call sites ---'
rg -n -C 5 --glob '*.py' \
  'add_argument\([^)]*trust_remote_code|trust_remote_code|hf_ptq' .

Repository: NVIDIA/Model-Optimizer

Length of output: 50379


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- documentation context ---'
sed -n '1,55p' plugins/modelopt/skills/ptq/references/unsupported-models.md
sed -n '45,65p' plugins/modelopt/skills/ptq/references/launcher-guide.md

printf '%s\n' '--- source references outside tests ---'
rg -n -C 6 --glob '*.py' --glob '!tests/**' \
  'trust_remote_code|add_argument.*remote|hf_ptq' examples modelopt plugins 2>/dev/null | head -n 500

printf '%s\n' '--- exact files containing the option ---'
rg -l --glob '*.py' --glob '!tests/**' 'trust_remote_code|remote_code' . | sort

Repository: NVIDIA/Model-Optimizer

Length of output: 50380


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- hf_ptq option definition and propagation ---'
rg -n -C 10 --glob 'hf_ptq.py' \
  'trust_remote_code|AutoConfig|AutoTokenizer|AutoModel|from_pretrained' examples/hf_ptq

printf '%s\n' '--- helper defaults and propagation ---'
rg -n -C 8 --glob '*.py' --glob '!tests/**' \
  'def (get_model|get_tokenizer|load_model)|trust_remote_code\s*:\s*bool|trust_remote_code\s*=' examples/hf_ptq

printf '%s\n' '--- relevant tests for default and opt-in behavior ---'
rg -n -C 8 --glob 'test_*.py' \
  'trust_remote_code|remote code|DeepSeek' tests/examples/hf_ptq | head -n 350

Repository: NVIDIA/Model-Optimizer

Length of output: 50378


🌐 Web query:

Hugging Face Transformers trust_remote_code AutoConfig from_pretrained executes remote modeling code security user opt-in official documentation

💡 Result:

In Hugging Face Transformers, trust_remote_code=True is a security-critical parameter used when loading models or configurations via methods like from_pretrained() [1][2][3]. Because Hugging Face allows repositories to ship custom Python modeling or configuration files (e.g., modeling_*.py, configuration_*.py), setting this flag to True explicitly authorizes the library to download and execute that arbitrary code on your local machine [1][4][5]. Official documentation emphasizes that this option should only be enabled for repositories you trust and have manually inspected [2][6][3]. When trust_remote_code is set to False (the default), the library is intended to restrict loading to built-in, pre-verified model architectures, preventing the execution of arbitrary remote code [7][8]. Security considerations include: 1. Risk of Remote Code Execution (RCE): Loading models with trust_remote_code=True from untrusted or compromised repositories can lead to full system compromise [5]. 2. Security Boundaries: While trust_remote_code=False is intended as a security barrier, historical vulnerabilities have demonstrated that configuration-based injections or improper handling of local file paths can occasionally bypass this protection [9][7][8]. 3. Recommended Practices: * Always inspect the source code of the modeling/configuration files in the repository before enabling the flag [1][2][3]. * Pin the specific repository revision (commit hash) to prevent the silent loading of updated, potentially malicious code [1][2]. * Use safetensors format for model weights whenever possible, as this format is designed to avoid the risks associated with older, pickle-based serialization [1][4][2]. Users should treat trust_remote_code=True as an explicit opt-in to potential arbitrary code execution and apply defense-in-depth measures, such as running in isolated environments (e.g., containers) and monitoring runtime activity [5][7].

Citations:


Require explicit opt-in for remote code execution. trust_remote_code=True can execute checkpoint-supplied Python, so the always use instruction and diagnostic commands must require source review first. Keep the existing CLI and helper defaults at False.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/ptq/references/unsupported-models.md` around lines 13
- 15, Update the guidance around custom modeling/tokenization files to require
reviewing the checkpoint-supplied source before enabling remote code execution.
Replace the unconditional “always use” wording and ensure diagnostic commands
explicitly pass trust_remote_code=True only after review, while preserving the
existing CLI and helper defaults of False.

Source: Coding guidelines

@chadvoegele
chadvoegele force-pushed the cvoegele/modelopt-skills-plugin branch 2 times, most recently from 88da754 to a54e457 Compare August 11, 2026 17:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/modelopt/skills/evaluation/SKILL.md (1)

84-86: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not source the workspace .env. Replace set -a && source .env && set +a with a non-executing loader that validates and exports only KEY=VALUE entries. The conditional cp preserves an existing malicious .env, and source executes command substitutions and other shell code before nel starts. Preserve the exports required by host:... values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 84 - 86, Update the
`.env` loading instructions in the evaluation setup to remove `source` and any
`set -a` execution flow. Use a non-executing loader that validates and exports
only KEY=VALUE entries while preserving the environment variables required by
`host:` values, and ensure the setup does not trust an existing `.env` created
by the conditional copy.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml`:
- Around line 5-10: Update the example commands in the configuration comments to
reference the repository-root-relative path
plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml,
including both dry-run and submit invocations, without relying on a
working-directory change.

In `@plugins/modelopt/skills/evaluation/SKILL.md`:
- Around line 43-46: Update the evaluation instructions around the nel-next
setup and execution commands to resolve `.agents` resources through the
installed plugin or a documented resolver, rather than directly assuming
`.agents/scripts/nel-next.sh` exists. Continue using the canonical
`plugins/modelopt/skills/evaluation/recipes/env.example` and preserve the
existing setup, evaluation, and MLflow-push flow.

---

Outside diff comments:
In `@plugins/modelopt/skills/evaluation/SKILL.md`:
- Around line 84-86: Update the `.env` loading instructions in the evaluation
setup to remove `source` and any `set -a` execution flow. Use a non-executing
loader that validates and exports only KEY=VALUE entries while preserving the
environment variables required by `host:` values, and ensure the setup does not
trust an existing `.env` created by the conditional copy.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a03a2c12-6ce1-40d0-bdb0-b567d01cc89c

📥 Commits

Reviewing files that changed from the base of the PR and between ab56a31 and a54e457.

📒 Files selected for processing (6)
  • .agents/README.md
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/swebench_verified.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/terminal_bench_2_1.md
  • plugins/modelopt/skills/evaluation/references/nel-next.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/terminal_bench_2_1.md
  • .agents/README.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/modelopt/skills/evaluation/SKILL.md (1)

84-86: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not source the workspace .env. Replace set -a && source .env && set +a with a non-executing loader that validates and exports only KEY=VALUE entries. The conditional cp preserves an existing malicious .env, and source executes command substitutions and other shell code before nel starts. Preserve the exports required by host:... values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 84 - 86, Update the
`.env` loading instructions in the evaluation setup to remove `source` and any
`set -a` execution flow. Use a non-executing loader that validates and exports
only KEY=VALUE entries while preserving the environment variables required by
`host:` values, and ensure the setup does not trust an existing `.env` created
by the conditional copy.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml`:
- Around line 5-10: Update the example commands in the configuration comments to
reference the repository-root-relative path
plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml,
including both dry-run and submit invocations, without relying on a
working-directory change.

In `@plugins/modelopt/skills/evaluation/SKILL.md`:
- Around line 43-46: Update the evaluation instructions around the nel-next
setup and execution commands to resolve `.agents` resources through the
installed plugin or a documented resolver, rather than directly assuming
`.agents/scripts/nel-next.sh` exists. Continue using the canonical
`plugins/modelopt/skills/evaluation/recipes/env.example` and preserve the
existing setup, evaluation, and MLflow-push flow.

---

Outside diff comments:
In `@plugins/modelopt/skills/evaluation/SKILL.md`:
- Around line 84-86: Update the `.env` loading instructions in the evaluation
setup to remove `source` and any `set -a` execution flow. Use a non-executing
loader that validates and exports only KEY=VALUE entries while preserving the
environment variables required by `host:` values, and ensure the setup does not
trust an existing `.env` created by the conditional copy.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a03a2c12-6ce1-40d0-bdb0-b567d01cc89c

📥 Commits

Reviewing files that changed from the base of the PR and between ab56a31 and a54e457.

📒 Files selected for processing (6)
  • .agents/README.md
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/swebench_verified.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/terminal_bench_2_1.md
  • plugins/modelopt/skills/evaluation/references/nel-next.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_next/terminal_bench_2_1.md
  • .agents/README.md
🛑 Comments failed to post (2)
plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml (1)

5-10: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use a repository-root-relative configuration path.

When run from the repository root, Line [8] passes recipes/examples/example_eval_next.yaml, but this file is located at plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml. The command fails unless .agents/scripts/nel-next.sh changes its working directory. Update the path or add an explicit working-directory step.

Proposed path fix
-#   .agents/scripts/nel-next.sh eval run recipes/examples/example_eval_next.yaml --dry-run
+#   .agents/scripts/nel-next.sh eval run plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml --dry-run

Based on learnings: Use relative paths from the repository root in commands and file references.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

# Run via the isolated nel-next venv:
#   .agents/scripts/nel-next.sh --setup-only
#   set -a && source .env && set +a    # HF_TOKEN, AWS_*, NEL_NEXT_EVAL_IMAGE, HARBOR_*_ECR_REPOSITORY (from modelopttools:eval-config)
#   .agents/scripts/nel-next.sh eval run plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml --dry-run
#   ... --submit -O benchmarks.0.max_problems=2 -O benchmarks.0.repeats=1 -O benchmarks.0.max_concurrent=2   # canary
#   ... --submit                                                                                             # full
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml`
around lines 5 - 10, Update the example commands in the configuration comments
to reference the repository-root-relative path
plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml,
including both dry-run and submit invocations, without relying on a
working-directory change.

Source: Learnings

plugins/modelopt/skills/evaluation/SKILL.md (1)

43-46: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for path in \
  .agents/scripts/nel-next.sh \
  .agents/skills/evaluation/recipes/env.example \
  plugins/modelopt/skills/evaluation/recipes/env.example
do
  test -e "$path" || {
    printf 'Missing path: %s\n' "$path" >&2
    exit 1
  }
done

Repository: NVIDIA/Model-Optimizer

Length of output: 160


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- path types and targets ---'
for path in \
  .agents/scripts/nel-next.sh \
  .agents/skills/evaluation \
  .agents/skills/evaluation/recipes/env.example \
  plugins/modelopt/skills/evaluation \
  plugins/modelopt/skills/evaluation/recipes/env.example
do
  if test -L "$path"; then
    printf '%s -> %s\n' "$path" "$(readlink "$path")"
  else
    stat -c '%F %n' "$path"
  fi
done

printf '%s\n' '--- install/package references ---'
rg -n --hidden -S \
  'plugins/modelopt/skills|\.agents/skills|SKILL\.md|env\.example|nel-next\.sh' \
  -g '!node_modules' -g '!dist' -g '!build' \
  . | head -n 240

printf '%s\n' '--- relevant skill instructions ---'
cat -n plugins/modelopt/skills/evaluation/SKILL.md | sed -n '35,95p'

Repository: NVIDIA/Model-Optimizer

Length of output: 234


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- path types and targets ---'
for path in \
  .agents/scripts/nel-next.sh \
  .agents/skills/evaluation \
  .agents/skills/evaluation/recipes/env.example \
  plugins/modelopt/skills/evaluation \
  plugins/modelopt/skills/evaluation/recipes/env.example
do
  if test -L "$path"; then
    printf 'symlink: %s -> %s\n' "$path" "$(readlink "$path")"
  elif test -e "$path"; then
    ls -ld "$path"
  else
    printf 'missing: %s\n' "$path"
  fi
done

printf '%s\n' '--- install/package references ---'
rg -n --hidden -S \
  'plugins/modelopt/skills|\.agents/skills|SKILL\.md|env\.example|nel-next\.sh' \
  -g '!node_modules' -g '!dist' -g '!build' \
  . | head -n 240

printf '%s\n' '--- relevant skill instructions ---'
cat -n plugins/modelopt/skills/evaluation/SKILL.md | sed -n '35,95p'

Repository: NVIDIA/Model-Optimizer

Length of output: 22669


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- compatibility-tree targets ---'
for path in .agents .agents/skills .agents/scripts .claude .claude/skills; do
  if test -L "$path"; then
    printf 'symlink: %s -> %s\n' "$path" "$(readlink "$path")"
  elif test -e "$path"; then
    ls -ld "$path"
  else
    printf 'missing: %s\n' "$path"
  fi
done

printf '%s\n' '--- plugin tree and script locations ---'
find plugins/modelopt -maxdepth 4 -type f \( -name 'nel-next.sh' -o -name 'env.example' -o -name 'SKILL.md' \) -print | sort
git ls-files .agents/scripts/nel-next.sh plugins/modelopt/skills/evaluation/recipes/env.example plugins/modelopt/skills/evaluation/SKILL.md

printf '%s\n' '--- packaging metadata ---'
rg -n -C 5 --hidden -S \
  'plugins/modelopt|package-data|include-package-data|plugin|skills' \
  pyproject.toml setup.cfg setup.py MANIFEST.in plugins/modelopt .github \
  2>/dev/null | head -n 260

printf '%s\n' '--- repository path contract ---'
cat -n AGENTS.md | sed -n '1,35p'
cat -n .agents/README.md | sed -n '1,48p'

Repository: NVIDIA/Model-Optimizer

Length of output: 23457


Resolve .agents paths through the installed plugin.

The repository exposes .agents/skills through a symlink, but .agents/scripts/nel-next.sh is outside the canonical plugin tree. Use plugins/modelopt/skills/evaluation/recipes/env.example and provide nel-next.sh through the installed plugin or a documented resolver.

🧰 Tools
🪛 SkillSpector (2.5.1)

[error] 84: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 392: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 393: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))


[error] 394: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

(Privilege Escalation (PE3))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/evaluation/SKILL.md` around lines 43 - 46, Update the
evaluation instructions around the nel-next setup and execution commands to
resolve `.agents` resources through the installed plugin or a documented
resolver, rather than directly assuming `.agents/scripts/nel-next.sh` exists.
Continue using the canonical
`plugins/modelopt/skills/evaluation/recipes/env.example` and preserve the
existing setup, evaluation, and MLflow-push flow.

Source: Coding guidelines

@cjluo-nv cjluo-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review (gpt-5.6-sol) — DM the bot to share feedback.

The goal is to distribute the existing repository-local ModelOpt skills as installable Claude/Codex marketplace plugins while retaining checkout compatibility. The move is cohesive and the compatibility symlink is a sensible direction, but the installed plugin is not currently self-contained: several skills still execute checkout-only .agents/... paths, and two required evaluation helpers remain outside plugins/modelopt, so workflows advertised for “any workspace” fail when invoked from a normal marketplace installation. The validator runs do not exercise this runtime path; please add a smoke test from a temporary non-ModelOpt workspace.

Design review: the PR body explains the desired packaging and single canonical tree, but does not compare this architecture with the existing in-repo symlink/sync system. Obvious alternatives are (1) retain .agents/skills as canonical and expose it through a thin plugin tree, extending tools/precommit/sync_claude_skills.sh; (2) generate a standalone plugin artifact/tree from .agents during validation/release; or (3) distribute the skills from a dedicated marketplace repository/submodule. The Python dependencies in pyproject.toml do not provide relevant plugin packaging machinery, so the main existing alternative is the repository’s current filesystem symlink/sync pattern. Please document why making plugins/modelopt canonical is preferable and, importantly, how runtime asset resolution is intended to work portably in both Claude and Codex.

This also adds Apache-2.0 license declarations to the plugin manifests and redistributes externally-derived skill material under a new plugin boundary. Per licensing policy, that needs human/legal-owner sign-off even after the functional issue is fixed.

Comment thread README.md
## AI Agents

For AI-assisted development setup, see the [agent tooling notes](./.agents/TOOLING.md).
ModelOpt's agent skills can be installed from this repository and used in any

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

The plugin is not currently usable from an arbitrary workspace as advertised. Only plugins/modelopt is packaged, but installed skills still execute checkout-relative paths such as .agents/skills/benchmark-model-kernels/scripts/..., .agents/skills/day0-release/scripts/..., and .agents/scripts/{nel-next,gdpval-sif}.sh; the latter two helpers are not under the plugin tree at all. deployment also shows scripts/deploy.sh, which resolves against the user's workspace rather than the installed skill directory. These commands therefore fail unless the current workspace happens to be a Model-Optimizer checkout. Please package every runtime helper and resolve it through a Claude/Codex-portable plugin-root mechanism (or ensure every affected workflow explicitly obtains and enters a checkout before using checkout paths), then add a smoke test that installs/loads the plugin from a temporary non-ModelOpt directory and verifies representative helper paths.

@chadvoegele chadvoegele Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[agent comment]

Addressed in b79d701. The nel-next and GDPVal helpers now ship under plugins/modelopt/skills/evaluation/scripts/; bundled helper and cross-skill references resolve from $SKILL_DIR rather than the workspace; and a pre-commit validator rejects checkout-relative plugin paths or missing packaged helpers. I also installed the rebased plugin with both Codex and Claude from an unrelated temporary workspace and exercised representative helper entry points successfully.

Comment thread README.md
## AI Agents

For AI-assisted development setup, see the [agent tooling notes](./.agents/TOOLING.md).
ModelOpt's agent skills can be installed from this repository and used in any

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installed marketplace copies only contain plugins/modelopt, but several bundled skills still execute checkout-relative paths such as .agents/skills/..., .agents/scripts/nel-next.sh, and scripts/deploy.sh; some required helpers are outside the plugin tree entirely. From a non-ModelOpt workspace these commands fail, contradicting this claim. Please package the required runtime helpers and resolve them relative to the installed skill/plugin, then add a smoke test from an unrelated working directory.

@chadvoegele chadvoegele Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[agent comment]

Addressed in b79d701. The nel-next and GDPVal helpers now ship under plugins/modelopt/skills/evaluation/scripts/; bundled helper and cross-skill references resolve from $SKILL_DIR rather than the workspace; and a pre-commit validator rejects checkout-relative plugin paths or missing packaged helpers. I also installed the rebased plugin with both Codex and Claude from an unrelated temporary workspace and exercised representative helper entry points successfully.

Comment thread .pre-commit-config.yaml

@cjluo-nv cjluo-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review (gpt-5.6-sol) — DM the bot to share feedback.

Focused follow-up only: repository-local use remains functionally equivalent on normal symlink-capable checkouts, aside from the already-reported CI path-filter regression. I found two additional checkout-local regressions caused by making .agents/skills a symlink.

Comment thread .agents/skills
@@ -0,0 +1 @@
../plugins/modelopt/skills No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

This is not fully backward-compatible for repository-local users on Git-for-Windows checkouts with core.symlinks=false (a common default): Git materializes this as a one-line regular file, so .agents/skills/<name> discovery and the skill test command no longer work. Previously .agents/skills was a real directory, so this specifically regresses users who work from the checkout without installing the marketplace. Please retain a Windows-safe compatibility mechanism or document/enforce the symlink requirement and cover it in checkout validation.

# Requires: gh, base64, awk. Run from the repo root.
#
# The script overwrites .agents/skills/<skill>/ with upstream contents and
# The script overwrites plugins/modelopt/skills/<skill>/ through the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

Although writes through .agents/skills reach the new canonical tree on a symlink-capable checkout, the script still ends with git diff $DEST_BASE/launching-evals $DEST_BASE/accessing-mlflow. Git pathspec traversal does not follow a tracked directory symlink, so this advertised review command now fails (or shows no canonical changes) after a sync. Please make DEST_BASE and the final review paths plugins/modelopt/skills, using .agents/skills only as the compatibility entry point.

@chadvoegele
chadvoegele force-pushed the cvoegele/modelopt-skills-plugin branch from a54e457 to b79d701 Compare August 11, 2026 18:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🧹 Nitpick comments (1)
tools/precommit/check_modelopt_plugin_paths.py (1)

18-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Define the module public API.

Add __all__ = ["main"] after the imports. main is the module public entry point.

As per coding guidelines, "**/*.py: Define each module's public API with __all__ = [...]."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/precommit/check_modelopt_plugin_paths.py` around lines 18 - 19, Add the
module-level __all__ declaration after the imports in
check_modelopt_plugin_paths.py, exposing only the existing main entry point and
preserving the rest of the module unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/precommit/check_modelopt_plugin_paths.py`:
- Around line 26-30: Extend FORBIDDEN_REFERENCES with a regular-expression entry
that rejects checkout-relative `.claude/skills/` paths, using the same behavior
and diagnostic style as the existing `.agents/skills/` rule while leaving the
canonical plugins/modelopt/skills path allowed.

---

Nitpick comments:
In `@tools/precommit/check_modelopt_plugin_paths.py`:
- Around line 18-19: Add the module-level __all__ declaration after the imports
in check_modelopt_plugin_paths.py, exposing only the existing main entry point
and preserving the rest of the module unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dec12286-38c3-457a-bd1d-16e9e6d21622

📥 Commits

Reviewing files that changed from the base of the PR and between a54e457 and b79d701.

📒 Files selected for processing (28)
  • .pre-commit-config.yaml
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/day0-release/tests/test_gates.py
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/evaluation/recipes/env.example
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml
  • plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_gym/gdpval.md
  • plugins/modelopt/skills/evaluation/references/gym-gdpval.md
  • plugins/modelopt/skills/evaluation/references/nel-next.md
  • plugins/modelopt/skills/evaluation/scripts/gdpval-sif.sh
  • plugins/modelopt/skills/evaluation/scripts/nel-next.sh
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/ptq/references/unsupported-models.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • tools/precommit/check_modelopt_plugin_paths.py
🚧 Files skipped from review as they are similar to previous changes (20)
  • plugins/modelopt/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/evaluation/recipes/examples/example_eval_next.yaml
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/evaluation/references/nel-next.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/evaluation/references/gym-gdpval.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/evaluation/recipes/env.example
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/evaluation/recipes/tasks/aa_gym/gdpval.md
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md

Comment thread tools/precommit/check_modelopt_plugin_paths.py Outdated
@ChenhanYu

Copy link
Copy Markdown
Collaborator

The plugins/modelopt location looks right: it keeps the distributable plugin metadata and skills separate from the MCP runtime implementation in tools/mcp.

My main recommendation is to make plugin installation enable the existing ModelOpt MCP as well. The current Codex manifest declares only skills, so users who install modelopt@modelopt must still run a separate codex mcp add command. Please consider adding plugins/modelopt/.mcp.json and referencing it from .codex-plugin/plugin.json via "mcpServers": "./.mcp.json" (plus the corresponding Claude plugin configuration). The server can continue to launch the existing package with:

uvx --from git+https://github.com/NVIDIA/Model-Optimizer.git#subdirectory=tools/mcp modelopt-mcp

For predictable releases, I would pin that Git source to a compatible tag or commit rather than implicitly following main.

With that wiring, the expected user experience becomes just marketplace registration plus codex plugin add modelopt@modelopt, while tools/mcp remains the canonical MCP implementation. If this PR is intentionally skills-only, the docs should instead call that out clearly and preserve the separate MCP installation step.

Separately, the new path validator should also reject legacy .claude/skills/ references so both old skill locations stay retired.

Signed-off-by: Chad Voegele <cvoegele@nvidia.com>
@chadvoegele
chadvoegele force-pushed the cvoegele/modelopt-skills-plugin branch 2 times, most recently from 926f955 to 69dc2bd Compare August 11, 2026 20:04
Signed-off-by: Chad Voegele <cvoegele@nvidia.com>
@chadvoegele
chadvoegele force-pushed the cvoegele/modelopt-skills-plugin branch from 69dc2bd to 1b0947f Compare August 11, 2026 20:16
Signed-off-by: Chad Voegele <cvoegele@nvidia.com>
@chadvoegele

Copy link
Copy Markdown
Contributor Author

My main recommendation is to make plugin installation enable the existing ModelOpt MCP as well.

@ChenhanYu This is done!

Signed-off-by: Chad Voegele <cvoegele@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/unit_tests.yml:
- Line 18: Update the workflow path filters used by check-file-changes so plugin
manifest files are included in the plugin validation workflow, ensuring
manifest-only pull requests trigger validation instead of skipping the skills
job. Reuse the existing plugin manifest path pattern or add the validator
workflow if no such workflow exists.
- Line 59: Add least-privilege GitHub Actions permissions to the workflow by
defining a workflow-level permissions block granting only contents: read, or
equivalent minimum permissions on every job including skills. Preserve the
existing skills job checkout and execution behavior.

In `@plugins/modelopt/.claude-plugin/plugin.json`:
- Line 25: Pin the shared Model-Optimizer MCP source to the same tested tag or
full commit instead of the mutable main branch in
plugins/modelopt/.claude-plugin/plugin.json:25 and plugins/modelopt/.mcp.json:6;
update both configuration URLs consistently.

In `@plugins/modelopt/skills/ptq/references/unsupported-models.md`:
- Line 9: Update the workspace-management.md reference in the download-first
guidance to resolve from the sibling common skill directory rather than the PTQ
skill's common subdirectory. Use the established common-skill root variable or
an explicit sibling path so agents can locate the guide when $SKILL_DIR points
to the PTQ skill root.

In `@plugins/modelopt/skills/quant-recipe-search/SKILL.md`:
- Around line 56-58: Update the default success rule in the quant-recipe-search
skill to require metric-specific acceptance criteria: define whether each listed
objective is maximized or minimized, its comparison unit, and its allowable
tolerance relative to the matching BF16/FP16 baseline before promoting a
candidate. Remove the universal “1 percentage point” rule and preserve reruns
for near-threshold or noisy results.
- Around line 136-156: Add an explicit default execution budget before the
Iteration Loop, covering maximum candidates plus GPU-hour and wall-time limits,
and define a stop condition when any limit is reached or the goal is met.
Require user confirmation before launching candidates or sweeps that would
exceed the default budget, while preserving the existing promotion criteria in
the iteration loop.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2d6c0194-e937-414d-9e04-9bf015c23a4c

📥 Commits

Reviewing files that changed from the base of the PR and between b79d701 and ab24e67.

📒 Files selected for processing (22)
  • .github/workflows/unit_tests.yml
  • .pre-commit-config.yaml
  • plugins/modelopt/.claude-plugin/plugin.json
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/.mcp.json
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/ptq/references/unsupported-models.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
🚧 Files skipped from review as they are similar to previous changes (15)
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/SKILL.md
  • .pre-commit-config.yaml
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md

Comment thread .github/workflows/unit_tests.yml
Comment thread .github/workflows/unit_tests.yml
Comment thread plugins/modelopt/.claude-plugin/plugin.json
Comment thread plugins/modelopt/skills/ptq/references/unsupported-models.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/unit_tests.yml:
- Line 18: Update the workflow path filters used by check-file-changes so plugin
manifest files are included in the plugin validation workflow, ensuring
manifest-only pull requests trigger validation instead of skipping the skills
job. Reuse the existing plugin manifest path pattern or add the validator
workflow if no such workflow exists.
- Line 59: Add least-privilege GitHub Actions permissions to the workflow by
defining a workflow-level permissions block granting only contents: read, or
equivalent minimum permissions on every job including skills. Preserve the
existing skills job checkout and execution behavior.

In `@plugins/modelopt/.claude-plugin/plugin.json`:
- Line 25: Pin the shared Model-Optimizer MCP source to the same tested tag or
full commit instead of the mutable main branch in
plugins/modelopt/.claude-plugin/plugin.json:25 and plugins/modelopt/.mcp.json:6;
update both configuration URLs consistently.

In `@plugins/modelopt/skills/ptq/references/unsupported-models.md`:
- Line 9: Update the workspace-management.md reference in the download-first
guidance to resolve from the sibling common skill directory rather than the PTQ
skill's common subdirectory. Use the established common-skill root variable or
an explicit sibling path so agents can locate the guide when $SKILL_DIR points
to the PTQ skill root.

In `@plugins/modelopt/skills/quant-recipe-search/SKILL.md`:
- Around line 56-58: Update the default success rule in the quant-recipe-search
skill to require metric-specific acceptance criteria: define whether each listed
objective is maximized or minimized, its comparison unit, and its allowable
tolerance relative to the matching BF16/FP16 baseline before promoting a
candidate. Remove the universal “1 percentage point” rule and preserve reruns
for near-threshold or noisy results.
- Around line 136-156: Add an explicit default execution budget before the
Iteration Loop, covering maximum candidates plus GPU-hour and wall-time limits,
and define a stop condition when any limit is reached or the goal is met.
Require user confirmation before launching candidates or sweeps that would
exceed the default budget, while preserving the existing promotion criteria in
the iteration loop.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2d6c0194-e937-414d-9e04-9bf015c23a4c

📥 Commits

Reviewing files that changed from the base of the PR and between b79d701 and ab24e67.

📒 Files selected for processing (22)
  • .github/workflows/unit_tests.yml
  • .pre-commit-config.yaml
  • plugins/modelopt/.claude-plugin/plugin.json
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/.mcp.json
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md
  • plugins/modelopt/skills/common/SKILL.md
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/deployment/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/evaluation/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/ptq/references/unsupported-models.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
🚧 Files skipped from review as they are similar to previous changes (15)
  • plugins/modelopt/.codex-plugin/plugin.json
  • plugins/modelopt/skills/common/slurm-setup.md
  • plugins/modelopt/skills/common/remote-execution.md
  • plugins/modelopt/skills/qad/SKILL.md
  • plugins/modelopt/skills/quant-recipe-search/references/recipe_iteration.md
  • plugins/modelopt/skills/common/remote_exec.sh
  • plugins/modelopt/skills/day0-release/SKILL.md
  • plugins/modelopt/skills/ptq/SKILL.md
  • plugins/modelopt/skills/compare-results/SKILL.md
  • plugins/modelopt/skills/deployment/tests/evals.json
  • plugins/modelopt/skills/common/environment-setup.md
  • plugins/modelopt/skills/common/SKILL.md
  • .pre-commit-config.yaml
  • plugins/modelopt/skills/ptq/references/slurm-setup-ptq.md
  • plugins/modelopt/skills/benchmark-model-kernels/SKILL.md
🛑 Comments failed to post (2)
plugins/modelopt/skills/quant-recipe-search/SKILL.md (2)

56-58: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the acceptance rule metric-aware.

The skill lists latency and custom metrics at Line 48 through Line 50. The default rule at Line 56 through Line 58 applies a fixed “1 percentage point” tolerance to every benchmark. That unit does not apply to latency, memory, perplexity, or other non-percentage metrics.

Define the comparison direction, unit, and tolerance for each metric before promoting a candidate.

Proposed fix
-Default success rule: maximize the chosen performance objective while keeping
-each benchmark within 1 percentage point of the matching BF16/FP16 baseline.
+For percentage-based accuracy metrics, keep each benchmark within 1 percentage
+point of the matching BF16/FP16 baseline. For other metrics, define a
+metric-specific direction, unit, and tolerance before evaluating candidates.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

For percentage-based accuracy metrics, keep each benchmark within 1 percentage
point of the matching BF16/FP16 baseline. For other metrics, define a
metric-specific direction, unit, and tolerance before evaluating candidates.
Near-threshold or noisy regressions require reruns before making a decision.
🧰 Tools
🪛 LanguageTool

[style] ~58-~58: ‘making a decision’ might be wordy. Consider a shorter alternative.
Context: ...noisy regressions require reruns before making a decision. ## Search Space Keep the search spac...

(EN_WORDINESS_PREMIUM_MAKING_A_DECISION)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/quant-recipe-search/SKILL.md` around lines 56 - 58,
Update the default success rule in the quant-recipe-search skill to require
metric-specific acceptance criteria: define whether each listed objective is
maximized or minimized, its comparison unit, and its allowable tolerance
relative to the matching BF16/FP16 baseline before promoting a candidate. Remove
the universal “1 percentage point” rule and preserve reruns for near-threshold
or noisy results.

136-156: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Bound candidate execution before the iteration loop.

Line 138 through Line 153 directs the agent to evaluate every candidate and launch larger sweeps, but the skill defines no maximum candidate count, GPU-hour budget, wall-time budget, or confirmation gate. A broad “find the best” request can therefore trigger unbounded expensive jobs.

Require a default budget and stop condition. Ask for confirmation before exceeding that budget.

Proposed fix
 ## Iteration Loop
 
+Before launching candidates, define maximum candidates, GPU-hours, and wall time.
+Stop when the budget is reached. Ask for confirmation before expanding it.
+
 1. Run cheap screen evals for every candidate that passes the gates.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/modelopt/skills/quant-recipe-search/SKILL.md` around lines 136 - 156,
Add an explicit default execution budget before the Iteration Loop, covering
maximum candidates plus GPU-hour and wall-time limits, and define a stop
condition when any limit is reached or the goal is met. Require user
confirmation before launching candidates or sweeps that would exceed the default
budget, while preserving the existing promotion criteria in the iteration loop.

@cjluo-nv cjluo-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review (gpt-5.6-sol) — DM the bot to share feedback.

Re-review: the installed-plugin portability concern was substantially addressed in b79d701d46 (helpers now ship under the plugin, most commands use $SKILL_DIR, and canonical skill tests run from plugins/modelopt/skills). The earlier CI skill-path filter comment was also addressed. However, the existing feedback is not fully resolved:

  • Critical/security findings remain: remote_exec.sh still builds commands as strings and executes them with eval; evaluation instructions still source a workspace .env; remote model code is still enabled based on auto_map/custom files without explicit trust approval; and NEMO_EVALUATOR_TRUST_PRE_CMD=1 remains enabled by default.
  • Correctness findings remain in the day-0 gates and deployment helper (malformed summaries can raise or pass incomplete sample accounting, non-positive output size can pass, PID reuse/process-group handling is unsafe, and TRT-LLM is still advertised although start always fails).
  • The FP8 dequantization example still silently casts when scale metadata is missing/unsupported, which can corrupt weights.
  • The claimed plugin-path validator is not present in tools/precommit/ or .pre-commit-config.yaml, despite the author reply and PR testing text. The upstream sync script also still uses the tracked symlink as DEST_BASE and its final git diff path, so that earlier checkout-local regression remains.
  • New/latest comments remain open: plugin manifests do not trigger the skills job; workflow-level least-privilege permissions are absent; MCP sources follow mutable main; and quant-recipe search remains metric-insensitive and unbounded.

Design review: the problem is to distribute repository-local skills as a self-contained Claude/Codex plugin while retaining checkout compatibility. Existing alternatives are (1) keep .agents/skills canonical and extend the existing tools/precommit/sync_claude_skills.sh/symlink mechanism, (2) generate a standalone plugin artifact from .agents during validation/release, or (3) publish from a dedicated marketplace repository/submodule. pyproject.toml has no relevant plugin-packaging dependency; the primary in-repo alternative is the existing sync/symlink tooling. The PR body still does not justify making plugins/modelopt canonical versus those alternatives or document portable cross-skill asset resolution for both hosts, so the required design question remains unaddressed.

Finally, this GitHub PR adds Apache-2.0 manifest declarations and redistributes externally-derived skills. Licensing requires human/legal-owner sign-off and cannot be auto-approved.


Additional comments (outside the PR diff):

  • plugins/modelopt/skills/common/remote_exec.sh:116 — > Bot comment.

This critical prior finding is still unresolved. _ssh_base_opts builds shell source from config values, and callers execute it with eval (including remote_start_session, remote_check_ssh, remote_run, and both rsync helpers). A crafted ssh_key, ssh_proxy, host/user, or local path can therefore execute commands on the local machine. Build SSH/rsync invocations as Bash arrays and call them directly with "${args[@]}"; remove the eval path entirely.

  • plugins/modelopt/skills/ptq/references/unsupported-models.md:13 — > Bot comment.

The prior remote-code finding remains: the presence of custom Python files establishes that remote code may be required, not that it is trusted. Require the user to review and explicitly approve the checkpoint-supplied code (and pin the reviewed revision) before adding --trust_remote_code / trust_remote_code=True; keep the default disabled.

Run `nel --version`; if missing, instruct `pip install nemo-evaluator-launcher`. If user has an existing config, skip to Step 8 (optionally review for `???` and quantization flags first).

**Set up `.env` now (not Step 8).** The working `.env` lives at the **workspace root** — the directory you run `nel` from — matching `modelopttools:eval-config`'s convention; do **not** create it under the skill dir. (NEL does not discover `.env` by path: it reads secrets from the shell env via the `host:` prefix after you `source`, so the location is purely *which file you source* before `nel run`. Keeping the single `.env` at the workspace root avoids a stale duplicate under the symlinked, shared `.agents/` skill tree.) For judge-scored / user-sim tasks (HLE, AA-LCR, Tau2), seed it from the template if absent — the template ships under the skill dir, the working `.env` does not: `[ -f .env ] || cp .agents/skills/evaluation/recipes/env.example .env`. Then try `modelopttools:eval-config` (if available) to fill the judge `model_id`/`url` rows (user adds the secret key). Needed before Step 5, which substitutes those values into task `<VAR>` placeholders.
**Set up `.env` now (not Step 8).** The working `.env` lives at the **workspace root** — the directory you run `nel` from — matching `modelopttools:eval-config`'s convention; do **not** create it under the skill dir. (NEL does not discover `.env` by path: it reads secrets from the shell env via the `host:` prefix after you `source`, so the location is purely *which file you source* before `nel run`. Keeping the single `.env` at the workspace root avoids a stale duplicate under the symlinked, shared `.agents/` skill tree.) For judge-scored / user-sim tasks (HLE, AA-LCR, Tau2), seed it from the template if absent — the template ships under the skill dir, the working `.env` does not: `[ -f .env ] || cp "$SKILL_DIR/recipes/env.example" .env`. Then try `modelopttools:eval-config` (if available) to fill the judge `model_id`/`url` rows (user adds the secret key). Needed before Step 5, which substitutes those values into task `<VAR>` placeholders.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

The previous security comment is still unresolved: the workflow later runs set -a && source .env, so an existing workspace .env can execute arbitrary shell code on the submitting host. Do not source this file. Either rely on NEL's supported env-file loading or use a non-executing parser that validates only KEY=VALUE records. The same guidance must be removed from recipes/env.example and references/nel-next.md.

- "tools/mcp/**"
- "tools/resource_monitor.py"
- ".agents/skills/**"
- "plugins/modelopt/skills/**"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

The latest manifest-validation comment is still open. plugins/modelopt/.claude-plugin/**, .codex-plugin/**, .mcp.json, and the marketplace manifests are not included in either the push paths or changed-files input, so a manifest-only change skips the skills/plugin checks. Include these paths and run an actual manifest/plugin validator in the skills job.

"command": "uvx",
"args": [
"--from",
"git+https://github.com/NVIDIA/Model-Optimizer.git#subdirectory=tools/mcp",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot comment.

This existing supply-chain/reproducibility comment is unresolved in both this manifest and .mcp.json: uvx installs from the repository's mutable default branch. Pin the Git source to the same tested release tag or full commit in both configurations.

@Edwardf0t1 Edwardf0t1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - will the skills still be loaded automatically under modelopt repo?

cc @Trenton-Starkey we are adding modelopt skills to marketplace.

@chadvoegele

Copy link
Copy Markdown
Contributor Author

will the skills still be loaded automatically under modelopt repo?

@Edwardf0t1 Yes

@chadvoegele
chadvoegele merged commit d3fe811 into NVIDIA:main Aug 12, 2026
69 checks passed
@chadvoegele
chadvoegele deleted the cvoegele/modelopt-skills-plugin branch August 12, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants