Skip to content

refactor(skills): consolidate CLI guidance - #36

Merged
jingxiang-z merged 6 commits into
mainfrom
refactor/skill-cli-contracts
Aug 7, 2026
Merged

refactor(skills): consolidate CLI guidance#36
jingxiang-z merged 6 commits into
mainfrom
refactor/skill-cli-contracts

Conversation

@jingxiang-z

@jingxiang-z jingxiang-z commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

Summary by CodeRabbit

  • Documentation

    • Streamlined fleet health and node investigation workflows for evidence-backed offline HTML reports.
    • Added CLI guidance for authentication, profiles, filtering, pagination, retries, time ranges, and credential protection.
    • Added shared report styling guidance for responsive, printable layouts and consistent status indicators.
    • Added secure workspace handling, validation, cleanup, and privacy guidance.
    • Added authentication setup and troubleshooting instructions.
  • Chores

    • Added automated synchronization and validation checks for skill references and report requirements.

Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 691fa915-7e83-497c-9946-2017436ecd1a

📥 Commits

Reviewing files that changed from the base of the PR and between 758c57a and 2d34edb.

📒 Files selected for processing (6)
  • scripts/validate-skills.sh
  • skills/fleet-health-report/SKILL.md
  • skills/fleet-health-report/references/cli-contract.md
  • skills/node-rca-rcca/SKILL.md
  • skills/node-rca-rcca/references/cli-contract.md
  • skills/nvfleetint/references/cli-contract.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • skills/node-rca-rcca/references/cli-contract.md
  • skills/nvfleetint/references/cli-contract.md
  • skills/fleet-health-report/SKILL.md
  • skills/node-rca-rcca/SKILL.md
  • skills/fleet-health-report/references/cli-contract.md

📝 Walkthrough

Walkthrough

The changes add synchronized nvfleetint contracts, stricter skill validation, and rewritten fleet health, node RCA/RCCA, and nvfleetint workflows. Shared HTML theme and workspace guidance define report generation, validation, and cleanup requirements.

Changes

Skill workflows and validation

Layer / File(s) Summary
Shared CLI contracts and validation
scripts/sync-skill-cli-contract.sh, scripts/validate-skills.sh, skills/*/references/cli-contract.md
Synchronizes shared CLI contracts and validates commands, workflows, report sections, themes, workspaces, and obsolete guidance.
nvfleetint command reference
skills/nvfleetint/SKILL.md, skills/nvfleetint/references/auth.md
Defines live JSON queries, command mappings, filtering, pagination, authentication handling, and troubleshooting procedures.
Fleet health report workflow
skills/fleet-health-report/SKILL.md, skills/fleet-health-report/references/html-theme.md, skills/fleet-health-report/references/workspace.md
Defines scoped fleet collection, alert aggregation, health derivation, offline HTML requirements, and secure workspace handling.
Node RCA/RCCA workflow
skills/node-rca-rcca/SKILL.md, skills/node-rca-rcca/references/html-theme.md, skills/node-rca-rcca/references/workspace.md
Defines node resolution, evidence correlation, root-cause reporting, offline HTML requirements, and secure workspace handling.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: consolidating CLI guidance across the skill documentation.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/skill-cli-contracts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 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 `@skills/fleet-health-report/references/cli-contract.md`:
- Around line 22-24: Update the authentication guidance in cli-contract.md so it
no longer passes the API key through the --api-key command-line argument. Use an
interactive prompt or standard-input mechanism instead, and revise the
referenced auth command example while preserving the instruction not to request
or expose API keys.

In `@skills/fleet-health-report/SKILL.md`:
- Around line 63-69: Update the boundary initialization block around end,
cur_start, and prev_start to execute platform-appropriate date syntax: use
BSD/macOS `-v` flags on BSD systems and GNU/Linux `-d` expressions on Linux.
Ensure both cur_start and prev_start are assigned valid UTC timestamps before
trend queries run.

In `@skills/node-rca-rcca/SKILL.md`:
- Around line 30-39: Update the date initialization block in the node/event
query guidance to use an executable platform-specific GNU/Linux versus BSD/macOS
branch. Ensure both branches assign valid UTC end and seven-day start
timestamps, while preserving the 168h duration only for optional APIs and
avoiding the invalid 7d Go duration.

In `@skills/nvfleetint/references/auth.md`:
- Around line 26-29: Update the auth instructions around auth list and auth add
to clarify that listing profiles does not prevent overwriting an existing
profile. Tell users to verify the positional target name before running auth
add, and document overwrite confirmation only if the CLI actually enforces it;
preserve the existing guidance that --yes is used only for explicitly requested
key replacement.
- Around line 19-23: Update the auth command documentation in auth.md and every
duplicated CLI contract to remove API-key command-line argument examples, and
document a secure API-key input method such as an interactive prompt, stdin, or
file descriptor. Also state that auth add updates an exact existing profile and
prompts for confirmation before replacing its key, including the --yes behavior
for explicit noninteractive replacement.
🪄 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: 99040898-05b3-4fcc-80cc-5e15131ea5a1

📥 Commits

Reviewing files that changed from the base of the PR and between 9105d43 and b4dbda0.

📒 Files selected for processing (15)
  • scripts/sync-skill-cli-contract.sh
  • scripts/validate-skills.sh
  • skills/fleet-health-report/SKILL.md
  • skills/fleet-health-report/references/cli-contract.md
  • skills/fleet-health-report/references/html-report-template.md
  • skills/fleet-health-report/references/workspace.md
  • skills/node-rca-rcca/SKILL.md
  • skills/node-rca-rcca/references/cli-contract.md
  • skills/node-rca-rcca/references/example.md
  • skills/node-rca-rcca/references/html-report-template.md
  • skills/node-rca-rcca/references/report-writing.md
  • skills/node-rca-rcca/references/scratch-workspace.md
  • skills/nvfleetint/SKILL.md
  • skills/nvfleetint/references/auth.md
  • skills/nvfleetint/references/cli-contract.md
💤 Files with no reviewable changes (1)
  • skills/node-rca-rcca/references/scratch-workspace.md

Comment thread skills/fleet-health-report/references/cli-contract.md Outdated
Comment thread skills/fleet-health-report/SKILL.md Outdated
Comment thread skills/node-rca-rcca/SKILL.md Outdated
Comment thread skills/nvfleetint/references/auth.md
Comment thread skills/nvfleetint/references/auth.md Outdated
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
skills/fleet-health-report/SKILL.md (2)

91-95: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Apply unknown-total handling to every cardinality probe.

Line 91 uses a non---all response, so the alert array is .alerts, not normalized .items. The shared contract also treats a nonempty response with a missing or zero total as unreported for nodes, node groups, and compute zones.

Use the exact backend fields and mark all such probes as unknown. Otherwise, the workflow can miss conservative collection and timeout handling for large inventory results.

Proposed clarification
-If an alert probe returns items but total is zero/absent,
- treat cardinality as unknown and use the large-fleet path.
+If any single-page probe returns a nonempty backend array
+(`alerts`, `nodes`, `nodeGroups`, or `computezones`) while `total`
+is zero or absent, treat cardinality as unknown. Use the large-fleet
+path for alerts and conservative collection handling for inventory.
🤖 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 `@skills/fleet-health-report/SKILL.md` around lines 91 - 95, Update the
cardinality-probe guidance to apply unknown-total handling consistently across
alerts, nodes, node groups, and compute zones. Use the exact backend response
arrays, including .alerts for the non-—all alert response rather than normalized
.items, and treat any nonempty array with a missing or zero top-level total as
unknown. Ensure unknown cardinality selects the large-fleet path with
conservative collection and timeout handling.

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

Security Misconfiguration (CWE-16)

Reachability: External · Exploitability: Moderate

Bind every nvfleetint command to the selected profile.

The commands in this section omit --profile <name>. Add the same explicit profile to every command, or document a wrapper that injects and validates it. Without this binding, queries can use different defaults and combine data from the wrong tenant.

🤖 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 `@skills/fleet-health-report/SKILL.md` around lines 38 - 46, Update the
commands in the profile rules section to explicitly include the selected profile
via --profile <name> on every nvfleetint invocation. Apply the same profile
consistently to both computezone and nodegroup commands, or document and use a
validated wrapper that injects it for all commands.
🤖 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.

Outside diff comments:
In `@skills/fleet-health-report/SKILL.md`:
- Around line 91-95: Update the cardinality-probe guidance to apply
unknown-total handling consistently across alerts, nodes, node groups, and
compute zones. Use the exact backend response arrays, including .alerts for the
non-—all alert response rather than normalized .items, and treat any nonempty
array with a missing or zero top-level total as unknown. Ensure unknown
cardinality selects the large-fleet path with conservative collection and
timeout handling.
- Around line 38-46: Update the commands in the profile rules section to
explicitly include the selected profile via --profile <name> on every nvfleetint
invocation. Apply the same profile consistently to both computezone and
nodegroup commands, or document and use a validated wrapper that injects it for
all commands.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0314effe-f9c2-4eb7-82af-49fafb6d516a

📥 Commits

Reviewing files that changed from the base of the PR and between b4dbda0 and 89887e8.

📒 Files selected for processing (3)
  • scripts/validate-skills.sh
  • skills/fleet-health-report/SKILL.md
  • skills/node-rca-rcca/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/node-rca-rcca/SKILL.md

Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 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 `@scripts/validate-skills.sh`:
- Around line 117-142: Update the validation wording in the skill-check
expectations to constrain only the alert-collection phase to at most 12
nvfleetint command invocations, rather than the entire workflow. Explicitly
state that paginated invocations may fetch multiple underlying requests, while
retaining the existing alert-phase guidance in the validation strings array.

In `@skills/fleet-health-report/references/cli-contract.md`:
- Around line 21-37: Update the CLI contract’s list classification to state that
alert summary supports --page-size but does not support --all, while preserving
its existing response-field and bounded partial-page behavior.

In `@skills/fleet-health-report/SKILL.md`:
- Around line 80-88: Replace the claim that the workflow makes at most 12 calls
with a statement scoped specifically to alert collection, clarifying that this
phase invokes one options call, one summary call, and up to 10 node calls; do
not imply a whole-workflow limit or account for pagination beyond command
invocations.

In `@skills/node-rca-rcca/references/cli-contract.md`:
- Around line 33-35: Update the --all response validation rules in the CLI
contract so nonempty items with an explicit total of 0 are rejected as
inconsistent, rather than labeled as an unreported total. Treat only missing or
null total values as unreported, and apply the existing stop or allowed fallback
workflow for inconsistent results.
- Around line 21-25: Clarify the --all normalization rule so it applies only to
paginated list commands, excluding non-paginated commands such as tag list.
Preserve tag list’s native tags response and ensure the documented pagination
flags and {items, pagination:{total,hasMore,pagesFetched}} shape are not implied
for it.
🪄 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: ce1adc2d-81ce-4fcf-b039-8b501d66c4ce

📥 Commits

Reviewing files that changed from the base of the PR and between e6c29b7 and 758c57a.

📒 Files selected for processing (16)
  • scripts/sync-skill-cli-contract.sh
  • scripts/validate-skills.sh
  • skills/fleet-health-report/SKILL.md
  • skills/fleet-health-report/references/cli-contract.md
  • skills/fleet-health-report/references/html-report-template.md
  • skills/fleet-health-report/references/html-theme.md
  • skills/fleet-health-report/references/workspace.md
  • skills/node-rca-rcca/SKILL.md
  • skills/node-rca-rcca/references/cli-contract.md
  • skills/node-rca-rcca/references/example.md
  • skills/node-rca-rcca/references/html-report-template.md
  • skills/node-rca-rcca/references/html-theme.md
  • skills/node-rca-rcca/references/workspace.md
  • skills/nvfleetint/SKILL.md
  • skills/nvfleetint/references/auth.md
  • skills/nvfleetint/references/cli-contract.md
💤 Files with no reviewable changes (3)
  • skills/fleet-health-report/references/html-report-template.md
  • skills/node-rca-rcca/references/example.md
  • skills/node-rca-rcca/references/html-report-template.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • skills/nvfleetint/references/auth.md
  • scripts/sync-skill-cli-contract.sh
  • skills/nvfleetint/SKILL.md
  • skills/node-rca-rcca/SKILL.md

Comment thread scripts/validate-skills.sh
Comment thread skills/fleet-health-report/references/cli-contract.md
Comment thread skills/fleet-health-report/SKILL.md Outdated
Comment thread skills/node-rca-rcca/references/cli-contract.md
Comment thread skills/node-rca-rcca/references/cli-contract.md Outdated
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
@jingxiang-z jingxiang-z self-assigned this Aug 7, 2026
@jingxiang-z
jingxiang-z merged commit 2958b6c into main Aug 7, 2026
6 checks passed
@jingxiang-z
jingxiang-z deleted the refactor/skill-cli-contracts branch August 7, 2026 16:40
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.

2 participants