Repository navigation
Remove OCI skill code, populate AgentCard from discovered skills - #41
Conversation
Covers issues #38 (remove OCI code moved to skillimage) and #39 (populate AgentCard skills from discovered skill files). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Six-task plan covering OCI code removal (#38) and AgentCard skill population (#39). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Remove internal/oci/, internal/verify/, and CLI commands skill pack, push, pull, inspect, verify. This code now lives in the skillimage project and its skillctl CLI. Keep local skill management (list, delete), runtime skill discovery (pkg/skills/), and SkillCard parsing (pkg/skills/card/). Closes #38 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Map discovered SkillMeta to a2a.AgentSkill with optional SkillCard enrichment (tags from namespace, author, required tools). MergeSkills handles deduplication with static entries winning on ID conflict. Refs #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Move skill discovery before the toolRegistry block so discovered skills are injected into the AgentCard in both phase 1 and phase 2 modes. The A2A endpoint now reflects runtime-available skills. Static skills from agent-card.json are preserved; discovered skills are merged with static entries winning on ID conflict. Closes #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
- README: document automatic AgentCard skill injection, replace docsclaw skill commands with skillctl - OCI skills guide: replace all docsclaw skill CLI examples with skillctl, update init container to use skillctl image - examples/openshift/agent-pod-pull.yaml: use skillctl image Refs #38, #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Initialize Tags to empty slice for skills without skill.yaml so the AgentCard JSON serializes as "tags": [] instead of "tags": null. Add docs/demo/skill-discovery-test.yaml that demonstrates pure skill discovery — agent-card.json has empty skills array, skills come from an OCI image volume and a ConfigMap. Refs #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Add --skills-dir flag to docsclaw serve so skills can be mounted at a separate path from --config-dir. This avoids a Kubernetes limitation where image volumes mounted as subdirectories of a ConfigMap volume appear empty. Update skill-discovery-test.yaml to mount skills at /skills/ using the new flag. Document the volume nesting gotcha in the OCI skills guide with broken/working examples. Refs #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Replace strict card.Parse() (requires docsclaw.io/v1alpha1) with a loose YAML parse that extracts AgentSkill-relevant fields from any skill.yaml regardless of apiVersion. This supports skillimage.io format alongside the docsclaw format. When explicit tags are present (skillimage format), use them directly. Otherwise derive tags from namespace/author/tools (docsclaw format). Also extract examples from spec.examples. Refs #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Replace all card.Parse() callers (which required docsclaw.io/v1alpha1) with the loose ParseSkillYAML that accepts any apiVersion. This affects Discover() in loader.go and the skill list command. The card package with strict validation is retained but no longer used outside its own tests. Refs #39 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Add labels for Kagenti agent platform discovery: - kagenti.io/type: agent - protocol.kagenti.io/a2a: "" - a2a-agent.demo/protocol: a2a - a2a-agent.demo/type: agent Applied to executive-assistant, hr-analyst, and skill-discovery-test deployments. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR removes OCI skill pack/push/pull/inspect functionality (delegated to the ChangesOCI Skill Management Code Removal
AgentCard Skill Injection from Discovered Skills
Documentation, Specifications & Examples
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The PR spans multiple independent layers (OCI removal, skill injection, documentation) with heterogeneous changes: deletion of deep OCI/verify implementations and extensive CLI command wiring, introduction of new conversion logic with multiple helper functions and fallback chains, and integration into the serve-time card-building flow. Review requires separate reasoning for package removals (ensuring no dangling imports), new conversion logic (validating YAML parsing and tag/example derivation), serve.go wiring (ensuring skills are discovered and merged at the correct phase), and verification that all removed references are cleaned up. The breadth of affected files (13 deletions, 10 additions spanning 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 15 minutes and 4 seconds.Comment |
Address review feedback: silent fallback to SKILL.md lost observability for malformed skill.yaml files. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/cmd/skill_list.go (1)
46-62:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winKeep
skill listinformative whenskill.yamlis missing or invalid.This fallback currently prints the directory name plus
"(no skill.yaml)", even though the SKILL.md frontmatter already has the skill name and description. That regresses the command for markdown-only skills and hides parse failures behind a generic placeholder.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/cmd/skill_list.go` around lines 46 - 62, When skills.ParseSkillYAML(cardPath) fails, don’t immediately fall back to printing entry.Name() with "(no skill.yaml)"; instead attempt to read and parse SKILL.md frontmatter to extract name and description (use the repository's frontmatter/markdown parser or add one) and print those values (name, version or "-" if absent, description) using the same fmt.Printf formatting; if SKILL.md parsing also fails, print the directory name but include the original ParseSkillYAML error (and/or the SKILL.md parse error) in the output so parse failures aren't hidden (referencing cardPath, mdPath, sy, and entry.Name()).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/demo/executive-assistant.yaml`:
- Around line 96-101: The Deployment's labels (app, kagenti.io/type,
protocol.kagenti.io/a2a, a2a-agent.demo/protocol, a2a-agent.demo/type) are only
on the Deployment metadata and must be copied into the Pod template so running
Pods expose the same labels; update the Deployment spec.template.metadata.labels
to include those same keys and values (mirror the labels block currently under
metadata.labels into spec.template.metadata.labels) so Kagenti/A2A discovery and
any label-based selection on Pod metadata will work.
In `@docs/demo/hr-analyst.yaml`:
- Around line 103-108: The Deployment's labels (app, kagenti.io/type,
protocol.kagenti.io/a2a, a2a-agent.demo/protocol, a2a-agent.demo/type) are only
on the Deployment metadata and need to be mirrored onto the Pod template so
running Pods inherit them; update the Deployment spec.template.metadata.labels
to include the same label keys and values (ensure spec.template.metadata.labels
matches metadata.labels) so Kagenti/A2A discovery and any pod-level label
selection will see these labels on pods.
In `@docs/oci-skills-guide.md`:
- Around line 163-168: The example mixes two CLI names; pick one and make both
lines consistent. Replace the mixed snippet so both commands use the same CLI
surface (e.g., change "docsclaw skill list" to "skillctl list" and "docsclaw
skill delete resume-screener --dir /tmp/skills" to "skillctl delete
resume-screener --dir /tmp/skills"), or alternatively switch both lines to the
"docsclaw skill ..." form if DocsClaw is still the canonical tool; ensure the
final block consistently uses either the skillctl or docsclaw command names
(referencing the "docsclaw skill list" / "docsclaw skill delete" and "skillctl
list" / "skillctl delete" symbols to locate and change the lines).
In `@docs/superpowers/specs/2026-05-02-skill-cleanup-agentcard-design.md`:
- Around line 10-13: Update the doc so it references the correct AgentCard
endpoint path by replacing any occurrences of "/.well-known/agent.json" with
"/.well-known/agent-card.json" and ensure mentions of the AgentCard endpoint
align with the server/demo manifest and pkg/skills/Discover() behavior; also
remove the noted dead code that references the old endpoint so the document no
longer points readers to a non-existent path and matches runtime discovery of
skills.
---
Outside diff comments:
In `@internal/cmd/skill_list.go`:
- Around line 46-62: When skills.ParseSkillYAML(cardPath) fails, don’t
immediately fall back to printing entry.Name() with "(no skill.yaml)"; instead
attempt to read and parse SKILL.md frontmatter to extract name and description
(use the repository's frontmatter/markdown parser or add one) and print those
values (name, version or "-" if absent, description) using the same fmt.Printf
formatting; if SKILL.md parsing also fails, print the directory name but include
the original ParseSkillYAML error (and/or the SKILL.md parse error) in the
output so parse failures aren't hidden (referencing cardPath, mdPath, sy, and
entry.Name()).
🪄 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: b672d680-0452-4d97-9292-7722e79aa64d
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (33)
README.mddocs/demo/executive-assistant.yamldocs/demo/hr-analyst.yamldocs/demo/skill-discovery-test.yamldocs/oci-skills-guide.mddocs/superpowers/plans/2026-05-03-skill-cleanup-agentcard.mddocs/superpowers/specs/2026-04-15-oci-skill-registry-design.mddocs/superpowers/specs/2026-04-15-oci-skill-registry-landscape.mddocs/superpowers/specs/2026-05-02-skill-cleanup-agentcard-design.mdexamples/openshift/agent-pod-pull.yamlgo.modinternal/cmd/serve.gointernal/cmd/skill.gointernal/cmd/skill_inspect.gointernal/cmd/skill_list.gointernal/cmd/skill_pack.gointernal/cmd/skill_pull.gointernal/cmd/skill_push.gointernal/cmd/skill_verify.gointernal/oci/extract_test.gointernal/oci/inspect.gointernal/oci/media.gointernal/oci/pack.gointernal/oci/pack_test.gointernal/oci/pull.gointernal/oci/push.gointernal/oci/push_pull_test.gointernal/verify/policy.gointernal/verify/verify.gointernal/verify/verify_test.gopkg/skills/a2a.gopkg/skills/a2a_test.gopkg/skills/loader.go
💤 Files with no reviewable changes (17)
- internal/verify/policy.go
- internal/verify/verify.go
- internal/oci/media.go
- internal/oci/push.go
- internal/oci/pull.go
- internal/cmd/skill_push.go
- internal/verify/verify_test.go
- internal/oci/extract_test.go
- internal/oci/pack_test.go
- go.mod
- internal/cmd/skill_verify.go
- internal/cmd/skill_pack.go
- internal/oci/push_pull_test.go
- internal/cmd/skill_inspect.go
- internal/oci/inspect.go
- internal/cmd/skill_pull.go
- internal/oci/pack.go
- Mirror Kagenti labels onto pod template labels so pods are discoverable (executive-assistant, hr-analyst, skill-discovery-test) - Fix mixed CLI names in oci-skills-guide.md (list/delete stay in docsclaw) - Fix endpoint typo in design spec (agent.json → agent-card.json) - Show SKILL.md name/description in skill list fallback instead of "(no skill.yaml)" Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Pavel Anni <[email protected]>
Summary
skillimage project
(
internal/oci/,internal/verify/, 5 CLI commands). Dropsoras.land/oras-go/v2dependency. Closes refactor: remove OCI skill management code (moved to skillimage) #38runtime. The A2A endpoint at
/.well-known/agent-card.jsonnowreflects skills mounted as ConfigMaps or OCI image volumes.
Closes Populate AgentCard skills from discovered skill files #39
--skills-dirflag to mount skills at a separate pathfrom
--config-dir, avoiding a Kubernetes limitation whereimage volumes nested under ConfigMap mounts appear empty
apiVersion checks, supporting both skillimage.io and docsclaw.io
schemas
skillctl, documentthe K8s volume nesting gotcha
What changed
internal/oci/internal/verify/internal/cmd/skill_*.gopkg/skills/a2a.goToAgentSkills(),MergeSkills(),ParseSkillYAML()pkg/skills/a2a_test.gointernal/cmd/serve.go--skills-dirflagdocs/oci-skills-guide.mddocs/demo/skill-discovery-test.yamlVerified on
testdata/standalone— 3 skills (1 static + 2 discovered)appear in AgentCard with tags and examples
Test plan
make buildpassesmake testpasses (all packages)make lintclean (pre-existing errcheck issues only)go mod tidy— oras/opencontainers deps removeda2a discovershows skills on deployed agentSummary by CodeRabbit
Release Notes
New Features
--skills-dirconfiguration option to specify where skills are discovered.Bug Fixes
skillctlinstead.Documentation
skillctlCLI.Chores