[Feat] Implement 'add-cap-operator-skill' command to add CAP Operator agent skills#117
[Feat] Implement 'add-cap-operator-skill' command to add CAP Operator agent skills#117anirudhprasad-sap wants to merge 9 commits into
Conversation
… CAP Operator agent skills
There was a problem hiding this comment.
The PR implements the add-cap-operator-skill command with reasonable test coverage, but has several issues worth addressing: a path-traversal vulnerability when writing tarball contents to disk, an uncaught JSON.parse exception in the HTTP response handler, an infinite redirect loop risk, and some test hygiene problems (dead helper function, mid-suite afterEach registration). The security concern around path traversal is the most important to resolve before merging.
PR Bot Information
Version: 1.29.2
- Event Trigger:
pull_request.opened - Experiment Variant:
control - File Content Strategy: Full file content
- LLM:
anthropic--claude-4.6-sonnet - Correlation ID:
d1845160-8688-11f1-9a7a-e5bff9f4ce87
…g and error reporting
…add-cap-operator-skill' command
…ns for integrating skills with Claude Code
Pavan-SAP
left a comment
There was a problem hiding this comment.
Looks good overall, but not sure if we should keep it as is!
As mentioned inline - let's check we should instead do this via users machine relying on curl/tar etc to be present at consumers side and using node exec for e.g.
Like we do while generating runtime yaml (kubectl)
We just document that we rely on these parts.
…nd version options, and update README and tests accordingly
… the correct agents tarball
Add
add-cap-operator-skillCommand for AI Coding Assistant IntegrationNew Feature
✨ Introduces a new
add-cap-operator-skillcommand to thecap-op-pluginCLI. This command downloads the CAP Operator agent skill from a published tarball and installs it into the project's.agents/skills/cap-operator/folder, enabling AI coding assistants (e.g., Claude Code) to understand and manage CAP Operator Kubernetes resources.Key behaviors:
https://sap.github.io/cap-operator/agent.tar.gz.cap-operatorskill directory is wiped before extraction, pruning stale files, while other skills under.agents/remain untouched.Changes
bin/cap-op-plugin.js:add-cap-operator-skillas a supported command in theSUPPORTEDmap.httpGet()helper for HTTPS requests with redirect support.addCapOperatorSkill()function that downloads the tarball from the published URL, prunes the existing skill directory, and extracts new skill files to.agents/skills/cap-operator/.yamlPath→optionValuefor generality across all commands.README.md:@sap/cds-dkversion requirement from>=8.2.1to>=9.add-cap-operator-skillcommand, including usage examples and instructions for integrating the skill with Claude Code.test/cap-op-plugin.test.js:PR Bot Information
Version:
1.29.2anthropic--claude-4.6-sonnetca1b4df0-8770-11f1-8e60-bf27d5a0828cpull_request.edited