Skip to content

Claude plugin oadp cli#209

Open
NicholasYancey wants to merge 8 commits into
migtools:oadp-devfrom
NicholasYancey:claude-plugin-oadp-cli
Open

Claude plugin oadp cli#209
NicholasYancey wants to merge 8 commits into
migtools:oadp-devfrom
NicholasYancey:claude-plugin-oadp-cli

Conversation

@NicholasYancey

@NicholasYancey NicholasYancey commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Why the changes were made

Adds a Claude Code plugin under plugins/oadp-cli/ so assistants recommend oc oadp / kubectl oadp for OpenShift backup and restore instead of generic oc/kubectl or manual CRD edits.

How to test the changes made

claude plugin validate ~/git/oadp-cli/plugins/oadp-cli
claude plugin marketplace add ~/git/oadp-cli
claude plugin install oadp-cli@oadp-cli-plugins
claude plugin details oadp-cli

Restart Claude Code or run /reload-plugins, then:

/oadp-cli:backup-restore

Expect responses to point to oc oadp setup and admin or nonadmin commands.

After merge use Claude marketplace

claude plugin marketplace add github:migtools/oadp-cli
claude plugin install oadp-cli@oadp-cli-plugins
claude plugin details oadp-cli

Summary by CodeRabbit

  • New Features
    • Added a marketplace-listed Claude Code plugin that provides OpenShift OADP CLI backup/restore guidance.
    • Included the plugin manifest and introduced the initial backup-restore skill (/oadp-cli:backup-restore).
  • Documentation
    • Added end-to-end installation, verification, and usage instructions for the plugin.
    • Added a detailed skill guide with command examples and recommended assistant response workflow.
  • Tests / CI
    • Added a CI step to validate the plugin manifest.
    • Minor cleanup to the test command formatting.

@NicholasYancey NicholasYancey self-assigned this Jun 24, 2026
@openshift-ci openshift-ci Bot requested review from Joeavaikath and weshayutin June 24, 2026 19:34
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: NicholasYancey
Once this PR has been reviewed and has the lgtm label, please assign weshayutin for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jun 24, 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
📝 Walkthrough

Walkthrough

Adds marketplace and plugin manifests, workflow validation, and README plus skill documentation for oadp-cli, including installation, verification, and backup-restore guidance.

Changes

OADP CLI plugin packaging and docs

Layer / File(s) Summary
Marketplace and plugin manifests
.claude-plugin/marketplace.json, plugins/oadp-cli/.claude-plugin/plugin.json
Adds the marketplace entry for oadp-cli and the plugin manifest metadata, including name, description, version, author, links, license, and keywords.
Plugin validation workflow
.github/workflows/test.yml
Updates the test workflow’s go test ./... step and adds a job that installs the Claude CLI and validates plugins/oadp-cli.
Plugin README and installation guidance
plugins/oadp-cli/README.md
Documents the plugin layout, installation paths, verification steps, cache refresh, enterprise registration, and references.
Backup-restore skill guidance
plugins/oadp-cli/skills/backup-restore/SKILL.md
Documents the backup-restore skill frontmatter, OADP CLI guidance, setup flow, admin and non-admin command cheat sheets, response checklist, and out-of-scope topics.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: shubham-pampattiwar, weshayutin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding a Claude plugin for OADP CLI support.
Description check ✅ Passed The description covers both required sections and includes concrete test steps and expected behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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: 2

🤖 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/oadp-cli/README.md`:
- Around line 10-16: The markdown file-tree block in README.md is missing a
language label, causing markdownlint MD040. Update the opening fence for the
tree snippet to use a text label so the fenced code block is properly
identified; this change should be made in the README.md content that shows the
plugin structure.

In `@plugins/oadp-cli/skills/backup-restore/SKILL.md`:
- Around line 90-91: The CLI examples in SKILL.md are too broad and imply a
top-level verb-noun command that does not exist. Update the backup-restore usage
text to keep the noun-verb example for `oc oadp backup create` and narrow the
verb-noun example to the `nonadmin` command path, using the backup-restore skill
section as the place to adjust the documented command forms.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d456a38-97a8-4baf-9c22-e60664852976

📥 Commits

Reviewing files that changed from the base of the PR and between faac019 and 0103ea4.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • plugins/oadp-cli/.claude-plugin/plugin.json
  • plugins/oadp-cli/README.md
  • plugins/oadp-cli/skills/backup-restore/SKILL.md

Comment thread plugins/oadp-cli/README.md Outdated
Comment thread plugins/oadp-cli/skills/backup-restore/SKILL.md Outdated

@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: 1

🧹 Nitpick comments (1)
.github/workflows/test.yml (1)

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

Pin the Claude CLI version in CI.

npm install -g @anthropic-ai/claude-code`` makes this job nondeterministic: a new upstream release can break validation or silently change what gets validated between runs. Please install a vetted version explicitly, and preferably pair it with actions/setup-node so the job is not coupled to the runner image.

Suggested fix
+    - name: Set up Node
+      uses: actions/setup-node@v4
+      with:
+        node-version: '22'
+
     - name: Install Claude CLI
-      run: npm install -g `@anthropic-ai/claude-code`
+      run: npm install -g `@anthropic-ai/claude-code`@<validated-version>
🤖 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 @.github/workflows/test.yml around lines 31 - 32, The CI step that installs
Claude CLI is unpinned and can change behavior between runs; update the workflow
job using the Install Claude CLI step to install an explicit vetted
`@anthropic-ai/claude-code` version instead of the floating latest, and preferably
add actions/setup-node before that step so the Node environment is controlled
rather than inherited from the runner image.

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 @.github/workflows/test.yml:
- Around line 29-32: Disable the persisted credentials from actions/checkout
before the Install Claude CLI step so the job token is not left in local git
config. Update the workflow around the actions/checkout and Install Claude CLI
steps to turn off credential persistence since this job only needs to read the
repo and then runs third-party npm code. Refer to the checkout step and the
Install Claude CLI step to apply the change in the same job sequence.

---

Nitpick comments:
In @.github/workflows/test.yml:
- Around line 31-32: The CI step that installs Claude CLI is unpinned and can
change behavior between runs; update the workflow job using the Install Claude
CLI step to install an explicit vetted `@anthropic-ai/claude-code` version instead
of the floating latest, and preferably add actions/setup-node before that step
so the Node environment is controlled rather than inherited from the runner
image.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31aacfa0-9266-484e-97f4-a249f987adf5

📥 Commits

Reviewing files that changed from the base of the PR and between 0103ea4 and b836d7f.

📒 Files selected for processing (4)
  • .github/workflows/test.yml
  • plugins/oadp-cli/.claude-plugin/plugin.json
  • plugins/oadp-cli/README.md
  • plugins/oadp-cli/skills/backup-restore/SKILL.md
✅ Files skipped from review due to trivial changes (3)
  • plugins/oadp-cli/.claude-plugin/plugin.json
  • plugins/oadp-cli/skills/backup-restore/SKILL.md
  • plugins/oadp-cli/README.md

Comment thread .github/workflows/test.yml Outdated

@shubham-pampattiwar shubham-pampattiwar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for working on this @NicholasYancey ! Overall PR looks good! I have added some comments here and there.

oc oadp nonadmin backup get
oc oadp nonadmin backup describe <name>
oc oadp nonadmin backup logs <name>
oc oadp nonadmin restore create <name> --backup-name <backup> # upcoming

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The non-admin section marks restore create, restore get, restore describe, and bsl get as # upcoming, but all four are implemented and registered in the current codebase. The # upcoming annotations should be removed.
Also, the non-admin cheat sheet is missing several commands that exist: nonadmin backup delete, nonadmin backup logs, nonadmin restore logs, and nonadmin restore delete. Since this plugin's purpose is to be the authoritative command reference for AI assistants, completeness matters here.

run: go test ./...
run: go test ./...

validate-plugin:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The validate-plugin job should pin the @anthropic-ai/claude-code version and add actions/setup-node. Something like:

  
  - uses: actions/setup-node@v4
    with:
      node-version: '22'

  - name: Install Claude CLI
    run: npm install -g @anthropic-ai/claude-code@0.2.57

Pick whatever version you've validated against and bump it intentionally when needed.

oc oadp setup --force
```

> **Note:** `oc oadp setup` and `oc oadp must-gather` require the latest dev build and are not in the current release. Verify availability with `oc oadp setup --help`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This note should either be removed entirely or replaced with something version-aware, like "Available since v0.5.0" (or whatever version ships them). A static "not in the current release" statement in a living reference doc will rot quickly.

oc oadp restore create --from-backup <name>
oc oadp restore get
oc oadp restore describe <name>
oc oadp restore logs <name>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The admin restore section should include:

oc oadp restore delete

to match the pattern of the backup section.

@@ -0,0 +1,136 @@
---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Worth considering whether a lightweight CI check could verify SKILL.md against registered commands, or at minimum adding a note in SKILL.md or the plugin README reminding contributors to update the skill file when commands change

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

🧹 Nitpick comments (1)
.github/workflows/test.yml (1)

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

Consider pinning to an LTS Node.js version instead of the Current release line.

Node.js 26 is on the "Current" release line and does not enter Active LTS until October 2026; CI jobs are typically more stable on an LTS line (currently Node 24) rather than a freshly-cut Current release.

♻️ Suggested fix
     - uses: actions/setup-node@v4
       with:
-        node-version: '26'
+        node-version: '24'
🤖 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 @.github/workflows/test.yml around lines 33 - 35, The workflow is using the
Current Node.js release line via actions/setup-node, which is less stable for CI
than an LTS version. Update the node-version in the setup-node step to an active
LTS release (for example, the current LTS line) so the test job runs against a
stable supported Node version. Keep the change confined to the setup-node
configuration in the test workflow.
🤖 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.

Nitpick comments:
In @.github/workflows/test.yml:
- Around line 33-35: The workflow is using the Current Node.js release line via
actions/setup-node, which is less stable for CI than an LTS version. Update the
node-version in the setup-node step to an active LTS release (for example, the
current LTS line) so the test job runs against a stable supported Node version.
Keep the change confined to the setup-node configuration in the test workflow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a2ace02e-d612-49c7-b383-1f1cf3598e42

📥 Commits

Reviewing files that changed from the base of the PR and between db8491f and 8aa6782.

📒 Files selected for processing (2)
  • .github/workflows/test.yml
  • plugins/oadp-cli/skills/backup-restore/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • plugins/oadp-cli/skills/backup-restore/SKILL.md

@weshayutin

Copy link
Copy Markdown
Contributor

Is it reasonable to include in this pr how a customer would use the skill? Is it something like.. /plugin marketplace add anthropics/skills, select oadp-cli etc.. and BOOOM .. you gots it?

@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: 1

🤖 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/oadp-cli/README.md`:
- Around line 90-107: The remaining Markdown example fences in the README are
unlabeled, which keeps triggering MD040. Update the two fenced examples in the
“Use the skill” section to use a text code fence, and keep the content the same
so markdownlint recognizes both blocks; the relevant section is the one
containing /oadp-cli:backup-restore and the natural-language OADP questions.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: c717365d-a58a-47e7-b595-1500444a0516

📥 Commits

Reviewing files that changed from the base of the PR and between 8aa6782 and 3be3228.

📒 Files selected for processing (1)
  • plugins/oadp-cli/README.md

Comment thread plugins/oadp-cli/README.md
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.

3 participants