Skip to content

Skill service implementation #3650

@JAORMX

Description

@JAORMX

Description

Implement the full SkillService interface, orchestrating OCI library operations, state management, skill installation, parsing, and validation into a cohesive service layer.

Context

Part of the Skills Lifecycle Management epic. This is the central orchestration layer that ties together all skill components. Implements the SkillService interface defined in TASK-001 (#3645).

Dependencies: stacklok/toolhive-core#15, stacklok/toolhive-core#16, #3646, #3648, and Skill installer
Blocks: REST API handlers, Groups integration

Acceptance Criteria

  • pkg/skills/service_impl.go implements SkillService interface
  • List(): scans client skill directories, merges managed (from index) and unmanaged skills
  • Install(): pulls from registry (via toolhive-core), extracts to client directory, tracks state
  • Uninstall(): removes managed skill files, cleans state, refuses to remove unmanaged
  • Info(): returns detailed skill information from metadata + SKILL.md frontmatter
  • Validate(): runs parser + validator on skill directory, returns structured results
  • Build(): uses toolhive-core packager to create OCI artifact, stores locally
  • Push(): uses toolhive-core registry client to push artifact
  • Upgrade support via -u flag: resolves original reference, pulls latest
  • Constructor accepts all dependencies (OCI store, registry, packager, state, installer)
  • Unit tests with mocked dependencies, SPDX headers

Code Pointers

  • pkg/skills/service.go — interface to implement (from TASK-001)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgoPull requests that update go codeskillsSkills lifecycle managementtoolhive-platformToolHive Platform team

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions