Skip to content

feat: Add support for Claude customization (inference backend, skills, etc) - #116

Merged
andrewdonheiser merged 5 commits into
mainfrom
claude-agent
Jun 8, 2026
Merged

andrewdonheiser merged 5 commits into
mainfrom
claude-agent

Conversation

@msager27

@msager27 msager27 commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Fixes the skills mount point and adds a sample skill
  • Adds support for custom inference backend
  • Adds claude -> vLLM deployment
  • Adds claude -> OGX -> vLLM deployment

Jira Ticket

RHAIENG-4740
RHAIENG-4743
RHAIENG-4744

Testing

  • Deploy claude and use the sample skill (/code-review) and/or add/test other skills
  • Verify mcp, CLAUDE.md, and settings.json can also be customized (see README)
  • Test claude -> vLLM workflow
  • Test claude -> OGX -> vLLM workflow

Related PRs

#92

msager27 and others added 2 commits May 21, 2026 23:23
@coderabbitai

coderabbitai Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates Claude Code skills discovery from /opt/skills to ~/.claude/skills, adds settings configuration via ConfigMaps, and introduces two new deployment backends (vLLM direct and OGX Gateway) alongside updates to existing Anthropic and Vertex AI deployments, with comprehensive documentation updates.

Changes

Skills Path Migration and Multi-Backend Deployment

Layer / File(s) Summary
Container image and entrypoint skills discovery
agents/claude-code/deployment/Containerfile, agents/claude-code/deployment/entrypoint.sh
Containerfile creates the skills directory at ~/.claude/skills with correct ownership and permissions. entrypoint.sh setup_skills function auto-discovers skills from the new home-directory path; the --add-dir flag is removed from build_claude_args.
Anthropic deployment: base configuration structure
agents/claude-code/deployment/deployment.yaml
Skills ConfigMap is populated with code-review SKILL.md template, new settings ConfigMap provides default settings.json, and container volume mounts are updated to place skills at ~/.claude/skills and settings at ~/.claude/settings.json (read-only).
Vertex AI deployment: vertex-specific resource updates
agents/claude-code/deployment/deployment-vertex.yaml
New claude-vertex-settings ConfigMap, claude-vertex-skills expanded with code-review template, container mounts updated to ~/.claude paths, and ConfigMap projections configured to place SKILL.md under code-review/ subdirectory.
vLLM direct connection: new deployment manifest
agents/claude-code/deployment/deployment-vllm.yaml
New manifest for direct vLLM /v1/messages integration with ImageStream, BuildConfig, runtime ConfigMaps (settings, MCP, skills), workspace PVC, deployment with vLLM environment variables (base URL, API key, model overrides), MCP wiring, and security hardening (non-root, dropped caps, no privilege escalation).
OGX Gateway deployment: new gateway-proxied vLLM manifest
agents/claude-code/deployment/deployment-ogx-vllm.yaml
New manifest for Claude Code behind OGX Gateway forwarding to vLLM with ImageStream, BuildConfig, ConfigMaps (settings, MCP, skills), workspace PVC, deployment with OGX connection and model alias environment variables, volume mounts, resource limits, and security context.
Deployment documentation and configuration guides
agents/claude-code/deployment/README.md
Updated mode headings to remove "(optional)", repositioned CLAUDE_MODEL guidance with Interactive mode, added "Option C: Deploy with vLLM (Direct Connection)" section with end-to-end steps and curl verification examples, expanded "Customization" section covering skills injection/MCP/settings management, and updated cleanup instructions for all deployment scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: fixing skills mount point, adding sample skills, supporting custom inference backends, and introducing new deployment options (vLLM and OGX).
Description check ✅ Passed The description is directly related to the changeset, clearly outlining the key modifications including skills mount fixes, sample skill addition, custom inference backend support, and new deployment configurations.
Docstring Coverage ✅ Passed Docstring coverage is 100.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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude-agent

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 and usage tips.

@msager27
msager27 marked this pull request as ready for review June 5, 2026 18:52
@msager27
msager27 requested a review from a team as a code owner June 5, 2026 18:52

@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

🧹 Nitpick comments (1)
agents/claude-code/deployment/README.md (1)

370-381: ⚡ Quick win

Add inline YAML examples for manual configuration steps.

The instructions tell users to "Edit deployment-vllm.yaml and update" several environment variables, but don't show where these fields appear in the YAML structure. Users unfamiliar with the manifest will need to search through the file.

Consider adding a brief YAML snippet showing the env section structure for these variables to reduce friction.

Example inline snippet
 Edit `deployment-vllm.yaml` and update:
 
 - `ANTHROPIC_BASE_URL`: Your vLLM server URL (e.g., `https://vllm.apps.cluster.domain`)
 - `ANTHROPIC_CUSTOM_MODEL_OPTION`: Your model ID (bare model name, no prefix)
 - Model alias overrides (required to prevent 404 errors):
   - `ANTHROPIC_DEFAULT_HAIKU_MODEL`: Set to your vLLM model ID
   - `ANTHROPIC_DEFAULT_SONNET_MODEL`: Set to your vLLM model ID
   - `ANTHROPIC_DEFAULT_OPUS_MODEL`: Set to your vLLM model ID
 - `claude-vllm-settings` ConfigMap: Set the `model` field to your model ID
+
+Example environment variable section in the Deployment:
+```yaml
+env:
+  - name: ANTHROPIC_BASE_URL
+    value: "https://vllm.apps.cluster.domain"
+  - name: ANTHROPIC_CUSTOM_MODEL_OPTION
+    value: "your-model-id"
+  - name: ANTHROPIC_DEFAULT_HAIKU_MODEL
+    value: "your-model-id"
+  - name: ANTHROPIC_DEFAULT_SONNET_MODEL
+    value: "your-model-id"
+  - name: ANTHROPIC_DEFAULT_OPUS_MODEL
+    value: "your-model-id"
+```
🤖 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 `@agents/claude-code/deployment/README.md` around lines 370 - 381, Add an
inline YAML env snippet to README's "Update the deployment manifest" section
showing where to set ANTHROPIC_BASE_URL, ANTHROPIC_CUSTOM_MODEL_OPTION and the
three ANTHROPIC_DEFAULT_* variables; include a short example of the container
env: block with - name: ANTHROPIC_BASE_URL / value:
"https://vllm.apps.cluster.domain", - name: ANTHROPIC_CUSTOM_MODEL_OPTION /
value: "your-model-id", and the three - name: ANTHROPIC_DEFAULT_HAIKU_MODEL,
ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL entries so readers
can see the exact YAML structure to edit in deployment-vllm.yaml and the
claude-vllm-settings ConfigMap.
🤖 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 `@agents/claude-code/deployment/README.md`:
- Line 506: The README's "OGX with PostgreSQL" note is too vague; add a short
PostgreSQL deployment subsection under that heading explaining how to satisfy
the prerequisite: include links to OGX/RHOAI official docs, a minimal example
manifest (Kubernetes StatefulSet/Deployment + Service) or Helm chart command,
and an optional Docker Compose snippet for local testing; reference the README
section title "OGX with PostgreSQL" so the new content sits directly beneath it
and mention common connection parameters (host, port, user, password, db name)
and a note about creating the required database/schema before starting OGX.
- Line 269: The README note mentions "Vertex AI (and Bedrock/Foundry)" which are
not documented elsewhere; update the sentence referencing the model alias
`sonnet` and the `CLAUDE_MODEL` env var to remove the undocumented
"Bedrock/Foundry" platforms (or alternatively add corresponding deployment
docs/manifests for Bedrock and Foundry). Specifically edit the paragraph that
mentions `sonnet` and `CLAUDE_MODEL` so it only references platforms actually
covered (Anthropic API, Vertex AI, vLLM direct, OGX) or add links/sections for
Bedrock/Foundry if you opt to document them.
- Around line 719-738: Add a short security guidance section near the mcpServers
example explaining that placeholders like ${API_TOKEN} must not be hardcoded in
the ConfigMap JSON and should be injected via Kubernetes Secrets; mention the
mcpServers -> remote-api -> headers -> "Authorization" example and instruct
implementers to mount or inject the secret as an environment variable (e.g.,
API_TOKEN) from a Secret in their Deployment/Pod spec (valueFrom secretKeyRef)
or reference it via an external secret management tool, and explicitly call out
to avoid placing credentials in the ConfigMap.

---

Nitpick comments:
In `@agents/claude-code/deployment/README.md`:
- Around line 370-381: Add an inline YAML env snippet to README's "Update the
deployment manifest" section showing where to set ANTHROPIC_BASE_URL,
ANTHROPIC_CUSTOM_MODEL_OPTION and the three ANTHROPIC_DEFAULT_* variables;
include a short example of the container env: block with - name:
ANTHROPIC_BASE_URL / value: "https://vllm.apps.cluster.domain", - name:
ANTHROPIC_CUSTOM_MODEL_OPTION / value: "your-model-id", and the three - name:
ANTHROPIC_DEFAULT_HAIKU_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL,
ANTHROPIC_DEFAULT_OPUS_MODEL entries so readers can see the exact YAML structure
to edit in deployment-vllm.yaml and the claude-vllm-settings ConfigMap.
🪄 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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: cbf160af-cd4d-4401-8a9a-903d124f403e

📥 Commits

Reviewing files that changed from the base of the PR and between 2c79692 and 4604178.

📒 Files selected for processing (7)
  • agents/claude-code/deployment/Containerfile
  • agents/claude-code/deployment/README.md
  • agents/claude-code/deployment/deployment-ogx-vllm.yaml
  • agents/claude-code/deployment/deployment-vertex.yaml
  • agents/claude-code/deployment/deployment-vllm.yaml
  • agents/claude-code/deployment/deployment.yaml
  • agents/claude-code/deployment/entrypoint.sh

Comment thread agents/claude-code/deployment/README.md Resolved
Comment thread agents/claude-code/deployment/README.md Resolved
Comment thread agents/claude-code/deployment/README.md Resolved
@andrewdonheiser andrewdonheiser self-assigned this Jun 5, 2026

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

Review Summary

Good work on the skills path fix and the new vLLM/OGX deployment options. Security context is solid across all manifests, and the entrypoint.sh cleanup is clean. A few issues need addressing before merge — the most critical being missing env vars in the vLLM manifest that will cause runtime 404s.

Critical (3)

  • Missing ANTHROPIC_DEFAULT_*_MODEL overrides in deployment-vllm.yaml — will 404 at runtime
  • Context window size comment says ~14K in vLLM manifest but ~23K everywhere else
  • "Note on model selection" paragraph placed under wrong heading in Vertex section

Important (5)

  • README step ordering: "Before deploying" advice appears after deployment steps
  • Skills ConfigMap --from-file example uses invalid keys (slashes)
  • claude-settings volume missing optional: true across all manifests
  • Customization section only references Option A ConfigMap names
  • SKIP_PERMISSIONS warning text inconsistent across manifests

See inline comments for details and suggested fixes.

Comment thread agents/claude-code/deployment/README.md Resolved
Comment thread agents/claude-code/deployment/README.md Resolved
Comment thread agents/claude-code/deployment/README.md Resolved
Comment thread agents/claude-code/deployment/README.md Resolved
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.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.

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 `@agents/claude-code/deployment/README.md`:
- Around line 705-712: The README example hardcodes the ConfigMap name
"claude-skills" which doesn't match backend-specific mounts (for example the
vLLM manifest mounts "claude-vllm-skills" in deployment-vllm.yaml), so update
the example command to either use a placeholder/name variable or show the
correct name per deployment option and add a short note listing the valid skills
ConfigMap names per option (e.g., mention "claude-vllm-skills" for vLLM and the
default name used by the other deployment), and remind users to update the
volume spec's items entries to match the chosen ConfigMap when adding skills
(affecting the skills volume items projection).
🪄 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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 0492735b-bcb2-4509-b374-cc4b77996061

📥 Commits

Reviewing files that changed from the base of the PR and between 4604178 and 27682ee.

📒 Files selected for processing (5)
  • agents/claude-code/deployment/README.md
  • agents/claude-code/deployment/deployment-ogx-vllm.yaml
  • agents/claude-code/deployment/deployment-vertex.yaml
  • agents/claude-code/deployment/deployment-vllm.yaml
  • agents/claude-code/deployment/deployment.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • agents/claude-code/deployment/deployment.yaml
  • agents/claude-code/deployment/deployment-vertex.yaml
  • agents/claude-code/deployment/deployment-ogx-vllm.yaml

Comment on lines +705 to +712
# Create a ConfigMap with skills
oc create configmap claude-skills \
--from-file=code-review-skill=./skills/code-review/SKILL.md \
--from-file=security-audit-skill=./skills/security-audit/SKILL.md
```

The deployment manifests include an `items` projection in the skills volume that maps ConfigMap keys to subdirectory paths. When adding skills, update both the ConfigMap and the volume spec's `items` entries to match. For multi-skill setups, consider using a PVC instead of a ConfigMap.

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

Use backend-specific skills ConfigMap names in the skills command example.

Line 706 hardcodes claude-skills, but the vLLM manifest mounts claude-vllm-skills (deployment-vllm.yaml Line 83 and Line 210). In Option C/Option D, copy-pasting this creates an unused ConfigMap and skills won’t be picked up unless users also retarget mounts. Add the same “name varies by deployment option” note here (as you already did for MCP/settings), with the valid skills ConfigMap names per option.

Suggested doc fix
-oc create configmap claude-skills \
+oc create configmap <skills-configmap-name> \
   --from-file=code-review-skill=./skills/code-review/SKILL.md \
   --from-file=security-audit-skill=./skills/security-audit/SKILL.md
+
+# Use the skills ConfigMap name for your deployment option:
+# - Option A: claude-skills
+# - Option B: claude-vertex-skills
+# - Option C: claude-vllm-skills
+# - Option D: claude-ogx-vllm-skills

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

📝 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
# Create a ConfigMap with skills
oc create configmap claude-skills \
--from-file=code-review-skill=./skills/code-review/SKILL.md \
--from-file=security-audit-skill=./skills/security-audit/SKILL.md
```
The deployment manifests include an `items` projection in the skills volume that maps ConfigMap keys to subdirectory paths. When adding skills, update both the ConfigMap and the volume spec's `items` entries to match. For multi-skill setups, consider using a PVC instead of a ConfigMap.
# Create a ConfigMap with skills
oc create configmap <skills-configmap-name> \
--from-file=code-review-skill=./skills/code-review/SKILL.md \
--from-file=security-audit-skill=./skills/security-audit/SKILL.md
# Use the skills ConfigMap name for your deployment option:
# - Option A: claude-skills
# - Option B: claude-vertex-skills
# - Option C: claude-vllm-skills
# - Option D: claude-ogx-vllm-skills
The deployment manifests include an `items` projection in the skills volume that maps ConfigMap keys to subdirectory paths. When adding skills, update both the ConfigMap and the volume spec's `items` entries to match. For multi-skill setups, consider using a PVC instead of a ConfigMap.
🤖 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 `@agents/claude-code/deployment/README.md` around lines 705 - 712, The README
example hardcodes the ConfigMap name "claude-skills" which doesn't match
backend-specific mounts (for example the vLLM manifest mounts
"claude-vllm-skills" in deployment-vllm.yaml), so update the example command to
either use a placeholder/name variable or show the correct name per deployment
option and add a short note listing the valid skills ConfigMap names per option
(e.g., mention "claude-vllm-skills" for vLLM and the default name used by the
other deployment), and remind users to update the volume spec's items entries to
match the chosen ConfigMap when adding skills (affecting the skills volume items
projection).

Source: Coding guidelines

@msager27

msager27 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@andrewdonheiser Thanks for the review. Everything should be addressed in the latest commit.

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

I've been using this content, and it has been very helpful. I have a long list of follow-on items, but nothing that should be a blocker for this PR merging.

@andrewdonheiser
andrewdonheiser self-requested a review June 8, 2026 17:57
@andrewdonheiser
andrewdonheiser merged commit b9a632f into main Jun 8, 2026
9 checks passed
@andrewdonheiser
andrewdonheiser deleted the claude-agent branch June 8, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants