Summary
Replace docsclaw's local skill-related packages with imports from
skillimage to avoid
duplication and keep the two projects aligned.
What to replace
| docsclaw package |
skillimage replacement |
Notes |
pkg/skills/card/ |
skillimage/pkg/skillcard |
SkillCard parsing, validation, serialization |
pkg/skills.ParseSkillYAML() |
skillimage/pkg/skillcard.Parse() |
Loose skill.yaml parse in a2a.go |
pkg/skills.SkillYAML struct |
skillimage/pkg/skillcard.SkillCard |
Metadata struct |
What to keep in docsclaw
pkg/skills/loader.go — Discover(), LoadContent(),
BuildSummary() (runtime skill loading, agent-specific)
pkg/skills/a2a.go — ToAgentSkills(), MergeSkills()
(AgentCard population, A2A-specific)
These functions would call into skillimage types instead of local
ones.
Skillimage packages available
| Package |
Purpose |
pkg/skillcard |
Parse, validate, serialize skill.yaml (any apiVersion) |
pkg/source |
Discover skills from directories or git repos |
pkg/installed |
Scan agent directories for installed skills |
pkg/collection |
Parse SkillCollection YAML, generate K8s manifests |
pkg/lifecycle |
Skill status transitions (draft → testing → published) |
Steps
- Add
github.com/redhat-et/skillimage as a dependency
- Replace
pkg/skills/card/ types with skillcard.SkillCard
- Replace
ParseSkillYAML() with skillcard.Parse()
- Update
ToAgentSkills() to map skillcard.SkillCard → a2a.AgentSkill
- Remove
pkg/skills/card/ package
- Verify
skill list and Discover() still work
Context
Both projects are maintained by the same team. The skillimage
project owns the skill.yaml schema (currently
skillimage.io/v1alpha1) and should be the single source of truth
for parsing and validation. Docsclaw currently has its own
docsclaw.io/v1alpha1 schema in pkg/skills/card/ plus a loose
SkillYAML struct — both should be replaced by the skillimage
types.
Summary
Replace docsclaw's local skill-related packages with imports from
skillimage to avoid
duplication and keep the two projects aligned.
What to replace
pkg/skills/card/skillimage/pkg/skillcardpkg/skills.ParseSkillYAML()skillimage/pkg/skillcard.Parse()a2a.gopkg/skills.SkillYAMLstructskillimage/pkg/skillcard.SkillCardWhat to keep in docsclaw
pkg/skills/loader.go—Discover(),LoadContent(),BuildSummary()(runtime skill loading, agent-specific)pkg/skills/a2a.go—ToAgentSkills(),MergeSkills()(AgentCard population, A2A-specific)
These functions would call into skillimage types instead of local
ones.
Skillimage packages available
pkg/skillcardpkg/sourcepkg/installedpkg/collectionpkg/lifecycleSteps
github.com/redhat-et/skillimageas a dependencypkg/skills/card/types withskillcard.SkillCardParseSkillYAML()withskillcard.Parse()ToAgentSkills()to mapskillcard.SkillCard→a2a.AgentSkillpkg/skills/card/packageskill listandDiscover()still workContext
Both projects are maintained by the same team. The skillimage
project owns the skill.yaml schema (currently
skillimage.io/v1alpha1) and should be the single source of truthfor parsing and validation. Docsclaw currently has its own
docsclaw.io/v1alpha1schema inpkg/skills/card/plus a looseSkillYAMLstruct — both should be replaced by the skillimagetypes.