Skip to content

Add generate-api-stubs skill to openshift plugin#468

Open
rvanderp3 wants to merge 2 commits into
openshift-eng:mainfrom
openshift-splat-team:api-modification-skill
Open

Add generate-api-stubs skill to openshift plugin#468
rvanderp3 wants to merge 2 commits into
openshift-eng:mainfrom
openshift-splat-team:api-modification-skill

Conversation

@rvanderp3
Copy link
Copy Markdown
Contributor

@rvanderp3 rvanderp3 commented May 13, 2026

New skill to automate running make generate in openshift/api with iterative error detection and auto-fixing. Includes multi-repo workflow support for updating openshift/client-go vendoring and regeneration.

Bumps openshift plugin version to 0.0.6.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Summary by CodeRabbit

  • New Features

    • Added Agentic Docs plugin for AI-optimized OpenShift documentation access
    • Added /teams:list-repos command and a repository-owner lookup utility for teams
    • Added OpenShift API stub generation command with automated detection/fix/validation workflows
  • Documentation

    • New guidance and troubleshooting for API generation and client-go regeneration
  • Updates

    • OpenShift plugin version bumped to 0.0.7

New skill to automate running `make generate` in openshift/api with
iterative error detection and auto-fixing. Includes multi-repo workflow
support for updating openshift/client-go vendoring and regeneration.

Bumps openshift plugin version to 0.0.6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot requested review from LuboTerifaj and stbenjam May 13, 2026 18:37
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rvanderp3

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Walkthrough

Bumps the openshift plugin to v0.0.7; adds an OpenShift generate-api command and a generate-api-stubs skill with scripts for working-directory checks, error detection, and validation; updates docs/registry entries; and adds Agentic Docs and teams:list-repos entries to documentation and metadata.

Changes

OpenShift generate-api and supporting skill + docs & registry updates

Layer / File(s) Summary
Plugin manifest/version
.claude-plugin/marketplace.json, plugins/openshift/.claude-plugin/plugin.json
Bump openshift plugin version 0.0.50.0.7.
Command metadata and user-facing docs
plugins/openshift/commands/generate-api.md, PLUGINS.md, docs/data.json
Add /openshift:generate-api command; document synopsis, args, iterative fix-and-retry flow, client-go multi-repo workflow, examples, and common issues. Update PLUGINS.md TOC and add Agentic Docs and Teams command entries. Update docs/data.json with new generate-api command and skill entries and Teams list-repos.
Skill spec and error reference
plugins/openshift/skills/generate-api-stubs/SKILL.md, .../references/common_errors.md
Add full skill spec describing validation, make generate execution, error-detection/auto-fix loop (max 5 attempts), validation steps, multi-repo client-go workflow, expected outputs, and a catalog of common generation errors with fixes.
Working-directory validation script
plugins/openshift/skills/generate-api-stubs/scripts/check_working_directory.sh
New Bash script that validates current directory matches expected GOPATH import path (e.g., $GOPATH/src/github.com/openshift/api), prints diagnostics and remediation, and exits non‑zero on failure.
Generation error detection CLI
plugins/openshift/skills/generate-api-stubs/scripts/detect_generation_errors.py
New Python CLI that parses make generate output, matches known error patterns, extracts file/type references, and emits structured JSON (status, error_type, error_pattern, suggested_fix, auto_fixable, files_to_check, types_mentioned, error_sample).
Generated-code validator
plugins/openshift/skills/generate-api-stubs/scripts/validate_generated_code.sh
New Bash validator that checks presence/content of generated files (deepcopy, clientset, informers, listers, OpenAPI), runs go build ./... and go list ./..., aggregates failures, and exits with a summary status.
Teams plugin additions
docs/data.json, PLUGINS.md
Add teams:list-repos command with optional --refresh and new helper skill find-repo-owner; replace list-regressions skill with list-repos report skill.
sequenceDiagram
  participant User
  participant CLI as /openshift:generate-api
  participant Make as make generate
  participant Detector as detect_generation_errors.py
  participant Validator as validate_generated_code.sh
  User->>CLI: invoke /openshift:generate-api (api-repo-path [, --client-go])
  CLI->>Make: run make generate
  Make-->>Detector: stdout/stderr (piped)
  Detector-->>CLI: JSON error classification
  CLI->>CLI: attempt auto-fix loop (<=5) / run fix scripts
  CLI->>Make: re-run make generate (if fixes applied)
  Make-->>Validator: generated files
  Validator-->>CLI: validation result (pass/fail, details)
  CLI->>User: report modified files, errors/fixes, final status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

lgtm

Suggested reviewers

  • stbenjam
  • dgoodwin
  • bentito

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No Assumed Git Remote Names ❌ Error Hardcoded git remote name "origin" found in check_working_directory.sh. The script uses 'git remote get-url origin' without first discovering available remotes. Replace 'git remote get-url origin' with 'git remote -v' to discover remotes first, then extract the appropriate remote URL to verify the repository identity.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a new generate-api-stubs skill to the openshift plugin, which is clearly reflected across all file modifications.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
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.
No Real People Names In Style References ✅ Passed No real people's names are used in plugin commands, skill docs, examples, or style references. All documentation uses explicit technical descriptions.
Git Push Safety Rules ✅ Passed No git push operations found. Git operations are validations only or documented as user instructions in "Next Steps" sections. No force push variants detected anywhere.
No Untrusted Mcp Servers ✅ Passed No untrusted MCP server installations found. The PR only adds internal utility scripts and documentation for OpenShift API code generation with no external MCP server dependencies.
Ai-Helpers Overlap Detection ✅ Passed No overlapping functionality detected. All new features (/openshift:generate-api, generate-api-stubs skill, /teams:list-repos) are unique with no conflicts with existing functionality.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment thread PLUGINS.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

error (plugins-doc-up-to-date): PLUGINS.md is out of sync with plugin metadata. Run 'make update' to update.

Comment thread docs/data.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

error (plugins-doc-up-to-date): docs/data.json is out of sync with plugin metadata. Run 'make update' to update.

New `/openshift:generate-api` command that invokes the generate-api-stubs
skill. Accepts optional path to openshift/api and a --client-go flag to
also update and regenerate openshift/client-go.

Bumps openshift plugin version to 0.0.7.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
plugins/openshift/skills/generate-api-stubs/scripts/check_working_directory.sh (1)

34-39: ⚡ Quick win

Avoid assuming origin when identifying the repo remote.

Using only origin can generate false warnings when the canonical remote has a different name.

Suggested adjustment
-REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "")
-if [[ ! "$REMOTE_URL" =~ openshift/api ]]; then
+REMOTE_URLS="$(git remote -v 2>/dev/null | awk '{print $2}' | sort -u)"
+if ! grep -Eq 'github\.com[:/]+openshift/api(\.git)?$' <<< "$REMOTE_URLS"; then
     echo -e "${YELLOW}Warning: This doesn't appear to be the openshift/api repository${NC}" >&2
-    echo "Remote URL: $REMOTE_URL" >&2
+    echo "Remote URLs: $REMOTE_URLS" >&2
     echo "Expected: *openshift/api*" >&2
 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/openshift/skills/generate-api-stubs/scripts/check_working_directory.sh`
around lines 34 - 39, The script currently sets REMOTE_URL by querying only the
"origin" remote; change it to detect any configured remote whose URL contains
"openshift/api" (e.g. parse "git remote -v" or iterate `git remote` names) and
set REMOTE_URL accordingly before the check; update the conditional that
references REMOTE_URL in check_working_directory.sh so it doesn't emit a warning
when a different remote name (not "origin") points to openshift/api.
🤖 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 `@docs/data.json`:
- Around line 674-677: The synopsis for the "list-repos" command is missing the
optional flag declared in argument_hint; update the "synopsis" field for the
JSON object with "name": "list-repos" to include the same " [--refresh]" suffix
so it matches the "argument_hint" value, ensuring both fields remain consistent.

In `@plugins/openshift/skills/generate-api-stubs/references/common_errors.md`:
- Around line 8-12: Several fenced signature blocks containing the lines "Types
need DeepCopy methods", "missing deepcopy-gen markers", and "DeepCopy method not
found for type X" (and other similar signature-only blocks) lack a fence
language and trigger MD040; update each of those fenced code blocks to use the
language tag "text" (i.e., replace ``` with ```text) so the blocks become
```text ... ```; search for each occurrence of the exact signature strings
(e.g., the three-line block shown and the other signature-only blocks with the
same pattern) and apply the same change to all listed occurrences.

In
`@plugins/openshift/skills/generate-api-stubs/scripts/validate_generated_code.sh`:
- Around line 82-88: The build log uses a fixed /tmp/validation-build.log which
can collide; change it to a unique temp file using mktemp (e.g.
TMP_LOG=$(mktemp)) before the go build call, redirect go build output to
"$TMP_LOG" (2>&1), reference "$TMP_LOG" when printing errors and set
VALIDATION_FAILED=1 as before, and ensure cleanup by removing the temp file (rm
-f "$TMP_LOG") or installing a trap 'trap "rm -f \"$TMP_LOG\"" EXIT' so the temp
log is removed after validate_generated_code.sh finishes; update any references
in this block to use the TMP_LOG variable instead of the fixed path.

In `@plugins/openshift/skills/generate-api-stubs/SKILL.md`:
- Around line 61-64: The GOPATH example in SKILL.md is incorrect: change the
Option C example so it shows that the repository must be placed under
GOPATH/src/github.com/openshift/api (not directly under GOPATH as
/home/user/repos/api) and update the example lines that currently read "export
GOPATH=/home/user/repos" and the following path to demonstrate the correct
layout (e.g., GOPATH=/home/user/repos with the repo at
$GOPATH/src/github.com/openshift/api), plus adjust the explanatory text to state
that the repo must live under src/github.com/openshift/api for the import path
github.com/openshift/api to resolve.
- Around line 38-39: The SKILL.md contains incorrect `${CLAUDE_PLUGIN_ROOT}`
path expansions that omit the skill subdirectory; update all occurrences to
include `skills/generate-api-stubs/` so the scripts and references point to the
correct skill folder: replace the entry for the check script referenced in the
README (`${CLAUDE_PLUGIN_ROOT}/scripts/check_working_directory.sh`) with
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/check_working_directory.sh`,
update the detect script reference
(`${CLAUDE_PLUGIN_ROOT}/scripts/detect_generation_errors.py`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/detect_generation_errors.py`,
change the common errors reference
(`${CLAUDE_PLUGIN_ROOT}/references/common_errors.md`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/references/common_errors.md`,
and update the validate script
(`${CLAUDE_PLUGIN_ROOT}/scripts/validate_generated_code.sh`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/validate_generated_code.sh`
so all paths match the pattern used by other plugins.

---

Nitpick comments:
In
`@plugins/openshift/skills/generate-api-stubs/scripts/check_working_directory.sh`:
- Around line 34-39: The script currently sets REMOTE_URL by querying only the
"origin" remote; change it to detect any configured remote whose URL contains
"openshift/api" (e.g. parse "git remote -v" or iterate `git remote` names) and
set REMOTE_URL accordingly before the check; update the conditional that
references REMOTE_URL in check_working_directory.sh so it doesn't emit a warning
when a different remote name (not "origin") points to openshift/api.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0e873985-631c-4209-8327-3d7f7bb43796

📥 Commits

Reviewing files that changed from the base of the PR and between 2550735 and 3733125.

📒 Files selected for processing (9)
  • .claude-plugin/marketplace.json
  • PLUGINS.md
  • docs/data.json
  • plugins/openshift/.claude-plugin/plugin.json
  • plugins/openshift/skills/generate-api-stubs/SKILL.md
  • plugins/openshift/skills/generate-api-stubs/references/common_errors.md
  • plugins/openshift/skills/generate-api-stubs/scripts/check_working_directory.sh
  • plugins/openshift/skills/generate-api-stubs/scripts/detect_generation_errors.py
  • plugins/openshift/skills/generate-api-stubs/scripts/validate_generated_code.sh

Comment thread docs/data.json
Comment on lines +674 to +677
"argument_hint": "[--refresh]",
"description": "Report on repository purpose and approvers for github.com/openshift",
"name": "list-repos",
"synopsis": "/teams:list-repos"
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep command synopsis aligned with declared options.

Line 677 omits [--refresh] even though Line 674 declares it in argument_hint, which can confuse users relying on synopsis text.

Suggested fix
-          "synopsis": "/teams:list-repos"
+          "synopsis": "/teams:list-repos [--refresh]"
📝 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.

Suggested change
"argument_hint": "[--refresh]",
"description": "Report on repository purpose and approvers for github.com/openshift",
"name": "list-repos",
"synopsis": "/teams:list-repos"
"argument_hint": "[--refresh]",
"description": "Report on repository purpose and approvers for github.com/openshift",
"name": "list-repos",
"synopsis": "/teams:list-repos [--refresh]"
🤖 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 `@docs/data.json` around lines 674 - 677, The synopsis for the "list-repos"
command is missing the optional flag declared in argument_hint; update the
"synopsis" field for the JSON object with "name": "list-repos" to include the
same " [--refresh]" suffix so it matches the "argument_hint" value, ensuring
both fields remain consistent.

Comment on lines +8 to +12
```
Types need DeepCopy methods
missing deepcopy-gen markers
DeepCopy method not found for type X
```
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add fence languages to signature blocks to clear markdown lint.

Several fenced blocks omit a language identifier, triggering MD040 warnings.

Suggested fix pattern
-```
+```text
 Types need DeepCopy methods
 missing deepcopy-gen markers
 DeepCopy method not found for type X

Apply the same `text` language annotation to all signature-only fenced blocks in this file.
</details>


Also applies to: 50-54, 100-104, 142-148, 181-185, 221-225, 243-248, 277-281, 305-309, 327-331, 358-361, 384-388, 421-424, 460-463

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 8-8: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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/openshift/skills/generate-api-stubs/references/common_errors.md
around lines 8 - 12, Several fenced signature blocks containing the lines "Types
need DeepCopy methods", "missing deepcopy-gen markers", and "DeepCopy method not
found for type X" (and other similar signature-only blocks) lack a fence
language and trigger MD040; update each of those fenced code blocks to use the
language tag "text" (i.e., replace withtext) so the blocks become
text ... ; search for each occurrence of the exact signature strings
(e.g., the three-line block shown and the other signature-only blocks with the
same pattern) and apply the same change to all listed occurrences.


</details>

<!-- fingerprinting:phantom:poseidon:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +82 to +88
if go build ./... > /tmp/validation-build.log 2>&1; then
echo -e "${GREEN}✓${NC} Code compiles successfully"
else
echo -e "${RED}✗${NC} Compilation failed"
echo "Build errors:"
cat /tmp/validation-build.log
VALIDATION_FAILED=1
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a unique temp log file for build output.

A fixed /tmp/validation-build.log path is collision-prone across concurrent executions.

Suggested fix
+BUILD_LOG="$(mktemp -t validation-build.XXXXXX.log)"
+trap 'rm -f "$BUILD_LOG"' EXIT
 ...
-if go build ./... > /tmp/validation-build.log 2>&1; then
+if go build ./... > "$BUILD_LOG" 2>&1; then
     echo -e "${GREEN}✓${NC} Code compiles successfully"
 else
     echo -e "${RED}✗${NC} Compilation failed"
     echo "Build errors:"
-    cat /tmp/validation-build.log
+    cat "$BUILD_LOG"
     VALIDATION_FAILED=1
 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/openshift/skills/generate-api-stubs/scripts/validate_generated_code.sh`
around lines 82 - 88, The build log uses a fixed /tmp/validation-build.log which
can collide; change it to a unique temp file using mktemp (e.g.
TMP_LOG=$(mktemp)) before the go build call, redirect go build output to
"$TMP_LOG" (2>&1), reference "$TMP_LOG" when printing errors and set
VALIDATION_FAILED=1 as before, and ensure cleanup by removing the temp file (rm
-f "$TMP_LOG") or installing a trap 'trap "rm -f \"$TMP_LOG\"" EXIT' so the temp
log is removed after validate_generated_code.sh finishes; update any references
in this block to use the TMP_LOG variable instead of the fixed path.

Comment on lines +38 to +39
- Run `${CLAUDE_PLUGIN_ROOT}/scripts/check_working_directory.sh` from the openshift/api repository
- This script validates that the repository is in the correct Go workspace structure
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "References used in this skill:"
rg -n '\$\{CLAUDE_PLUGIN_ROOT\}/(scripts|references)/' plugins/openshift/skills/generate-api-stubs/SKILL.md

echo
echo "Actual files added for this skill:"
fd -p check_working_directory.sh
fd -p detect_generation_errors.py
fd -p validate_generated_code.sh
fd -p common_errors.md

Repository: openshift-eng/ai-helpers

Length of output: 823


🏁 Script executed:

# Check how CLAUDE_PLUGIN_ROOT is used in other plugins/skills
rg -n 'CLAUDE_PLUGIN_ROOT' plugins/ -t md | head -30

# Look for plugin initialization or environment setup
fd -p 'plugin.json' plugins/ -x cat {}

# Check if there's documentation about variable resolution
fd -p 'README.md' plugins/openshift/ -x cat {}

Repository: openshift-eng/ai-helpers

Length of output: 27789


Fix path references to include the skill directory name in all ${CLAUDE_PLUGIN_ROOT} expansions.

The current references assume scripts and references are at the plugin root, but they are located in the skill-specific subdirectory. Based on the pattern used in other plugins (e.g., git/skills/suggest-reviewers references ${CLAUDE_PLUGIN_ROOT}/skills/suggest-reviewers/...), the paths must include skills/generate-api-stubs/:

  • Line 38: Change ${CLAUDE_PLUGIN_ROOT}/scripts/check_working_directory.sh to ${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/check_working_directory.sh
  • Line 90: Change ${CLAUDE_PLUGIN_ROOT}/scripts/detect_generation_errors.py to ${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/detect_generation_errors.py
  • Line 94: Change ${CLAUDE_PLUGIN_ROOT}/references/common_errors.md to ${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/references/common_errors.md
  • Line 169: Change ${CLAUDE_PLUGIN_ROOT}/scripts/validate_generated_code.sh to ${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/validate_generated_code.sh
🤖 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/openshift/skills/generate-api-stubs/SKILL.md` around lines 38 - 39,
The SKILL.md contains incorrect `${CLAUDE_PLUGIN_ROOT}` path expansions that
omit the skill subdirectory; update all occurrences to include
`skills/generate-api-stubs/` so the scripts and references point to the correct
skill folder: replace the entry for the check script referenced in the README
(`${CLAUDE_PLUGIN_ROOT}/scripts/check_working_directory.sh`) with
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/check_working_directory.sh`,
update the detect script reference
(`${CLAUDE_PLUGIN_ROOT}/scripts/detect_generation_errors.py`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/detect_generation_errors.py`,
change the common errors reference
(`${CLAUDE_PLUGIN_ROOT}/references/common_errors.md`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/references/common_errors.md`,
and update the validate script
(`${CLAUDE_PLUGIN_ROOT}/scripts/validate_generated_code.sh`) to
`${CLAUDE_PLUGIN_ROOT}/skills/generate-api-stubs/scripts/validate_generated_code.sh`
so all paths match the pattern used by other plugins.

Comment on lines +61 to +64
# If repo is at /home/user/repos/api
export GOPATH=/home/user/repos
# Now the import path github.com/openshift/api resolves correctly
```
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Correct the GOPATH example in Option C.

This example is incorrect: setting GOPATH=/home/user/repos does not make /home/user/repos/api resolve as github.com/openshift/api; the repo must still live under src/github.com/openshift/api.

Suggested correction
-# If repo is at /home/user/repos/api
-export GOPATH=/home/user/repos
-# Now the import path github.com/openshift/api resolves correctly
+# If repo is at /home/user/repos/src/github.com/openshift/api
+export GOPATH=/home/user/repos
+# The import path github.com/openshift/api now resolves correctly
🤖 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/openshift/skills/generate-api-stubs/SKILL.md` around lines 61 - 64,
The GOPATH example in SKILL.md is incorrect: change the Option C example so it
shows that the repository must be placed under
GOPATH/src/github.com/openshift/api (not directly under GOPATH as
/home/user/repos/api) and update the example lines that currently read "export
GOPATH=/home/user/repos" and the following path to demonstrate the correct
layout (e.g., GOPATH=/home/user/repos with the repo at
$GOPATH/src/github.com/openshift/api), plus adjust the explanatory text to state
that the repo must live under src/github.com/openshift/api for the import path
github.com/openshift/api to resolve.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/data.json (1)

673-678: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep synopsis aligned with argument_hint for teams:list-repos.

Line 674 declares [--refresh], but Line 677 omits it from synopsis, creating inconsistent command metadata.

Proposed fix
-          "synopsis": "/teams:list-repos"
+          "synopsis": "/teams:list-repos [--refresh]"
🤖 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 `@docs/data.json` around lines 673 - 678, The metadata for the "list-repos"
command has an argument_hint of "[--refresh]" but the synopsis omits it; update
the "list-repos" entry (look for the object with "name": "list-repos") so its
"synopsis" includes the same "[--refresh]" token (e.g., "/teams:list-repos
[--refresh]") to keep argument_hint and synopsis consistent.
🤖 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/openshift/commands/generate-api.md`:
- Around line 10-12: Add a language identifier (e.g., "text") to every fenced
code block that contains the /openshift:generate-api usage examples so
markdownlint MD040 is satisfied; update the top usage block and each example
block that contains "/openshift:generate-api" (the header usage and Example 1–4
command fences) from triple backticks with no language to triple backticks with
"text".

---

Duplicate comments:
In `@docs/data.json`:
- Around line 673-678: The metadata for the "list-repos" command has an
argument_hint of "[--refresh]" but the synopsis omits it; update the
"list-repos" entry (look for the object with "name": "list-repos") so its
"synopsis" includes the same "[--refresh]" token (e.g., "/teams:list-repos
[--refresh]") to keep argument_hint and synopsis consistent.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0c1732b5-936e-485e-9a7f-cc3ebb0c9b9d

📥 Commits

Reviewing files that changed from the base of the PR and between 3733125 and dc994f8.

📒 Files selected for processing (5)
  • .claude-plugin/marketplace.json
  • PLUGINS.md
  • docs/data.json
  • plugins/openshift/.claude-plugin/plugin.json
  • plugins/openshift/commands/generate-api.md
✅ Files skipped from review due to trivial changes (2)
  • plugins/openshift/.claude-plugin/plugin.json
  • .claude-plugin/marketplace.json

Comment on lines +10 to +12
```
/openshift:generate-api [api-repo-path] [--client-go [client-go-path]]
```
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifiers to fenced code blocks.

markdownlint MD040 is triggered on these fences; this can fail docs lint in CI.

Proposed fix
 ## Synopsis
-```
+```text
 /openshift:generate-api [api-repo-path] [--client-go [client-go-path]]

Example 1: Generate from current directory

- +text
/openshift:generate-api


### Example 2: Generate from a specific path
-```
+```text
/openshift:generate-api ~/code/api

Example 3: Generate API and update client-go

- +text
/openshift:generate-api ~/code/api --client-go ~/code/client-go


### Example 4: Generate API and auto-detect client-go
-```
+```text
/openshift:generate-api --client-go
</details>


Also applies to: 73-75, 79-81, 85-87, 91-93

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 10-10: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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/openshift/commands/generate-api.md around lines 10 - 12, Add a
language identifier (e.g., "text") to every fenced code block that contains the
/openshift:generate-api usage examples so markdownlint MD040 is satisfied;
update the top usage block and each example block that contains
"/openshift:generate-api" (the header usage and Example 1–4 command fences) from
triple backticks with no language to triple backticks with "text".


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 21, 2026

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant