22// SPDX-License-Identifier: Apache-2.0
33
44/*
5- Package skills provides OCI artifact types, media types, and local storage for
6- ToolHive skill packages.
5+ Package skills provides OCI artifact types, media types, local storage, and
6+ remote registry operations for ToolHive skill packages.
77
88A skill is an OCI artifact containing MCP server configuration, prompt files,
9- and metadata. This package defines the constants, data structures, and storage
10- layer that the rest of the ToolHive ecosystem uses to package, push, pull, and
11- cache skills as OCI images.
9+ and metadata. This package defines the constants, data structures, storage
10+ layer, and registry client that the rest of the ToolHive ecosystem uses to
11+ package, push, pull, and cache skills as OCI images.
1212
1313# Media Types and Constants
1414
@@ -25,6 +25,26 @@ Standard OCI media types and ToolHive-specific annotation/label keys:
2525 skills.LabelSkillName
2626 skills.LabelSkillFiles
2727
28+ # Registry Client
29+
30+ The [Registry] type implements [RegistryClient] for pushing and pulling skill
31+ artifacts to/from OCI-compliant registries (GHCR, ECR, Docker Hub, etc.).
32+ It uses ORAS for registry operations and the Docker credential store for
33+ authentication by default:
34+
35+ reg, err := skills.NewRegistry()
36+ // Push an artifact
37+ err = reg.Push(ctx, store, indexDigest, "ghcr.io/myorg/my-skill:v1.0.0")
38+ // Pull an artifact
39+ digest, err := reg.Pull(ctx, store, "ghcr.io/myorg/my-skill:v1.0.0")
40+
41+ Use functional options to customise behaviour:
42+
43+ reg, err := skills.NewRegistry(
44+ skills.WithPlainHTTP(true), // for local dev registries
45+ skills.WithCredentialStore(myStore), // custom auth
46+ )
47+
2848# Stability
2949
3050This package is Alpha. Breaking changes are possible between minor versions.
0 commit comments