[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 12 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
…the correct agents skills tarball
…ion path and ensure proper extraction of agent skills
…ommand in CHANGELOG
✨ 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 (https://sap.github.io/cap-operator/agentskills.tar.gz) 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:
cap-operatorskill directory is wiped before extraction, pruning stale files, while other skills under.agents/remain untouched.Changes
bin/cap-op-plugin.js: Registeredadd-cap-operator-skillin theSUPPORTEDcommand map; implementedhttpGet()helper with redirect support; implementedaddCapOperatorSkill()function; added the new command to CLI usage/help text; renamed internal parameteryamlPath→optionValuefor consistency.README.md: Updated minimum@sap/cds-dkversion requirement from>=8.2.1to>=9; added a new documentation section foradd-cap-operator-skillincluding usage examples and Claude Code integration instructions.test/cap-op-plugin.test.js: Added a test suite covering live tarball extraction, file overwrite on re-run, stale file pruning, preservation of unrelated skills, and rejection of unknown options; updated the usage help text snapshot.CHANGELOG.md: Added entry for version0.19.0documenting the new command.package.json/package-lock.json: Bumped version from0.18.0to0.19.0.PR Bot Information
Version:
1.29.2anthropic--claude-4.6-sonnetdf8915d0-899d-11f1-888a-0bdf84f9d67epull_request.edited