Skip to content

Commit 1f2e06d

Browse files
JAORMXclaude
andcommitted
Add OCI skill packager using ocispec types
Implement the SkillPackager interface with deterministic OCI artifact creation from skill directories. Uses canonical ocispec types from github.com/opencontainers/image-spec for OCI 1.1 compliance. Reads SKILL.md YAML frontmatter for metadata, creates per-platform OCI configs (ocispec.Image) with skill metadata in labels, manifests (ocispec.Manifest) with annotations, and multi-platform image indexes (ocispec.Index). Uses digest.FromBytes for diff IDs and specs.Versioned for schema version. Security: rejects symlinks (files and directories), hardlinks, device entries, and path traversal in filesystem reads. Nil store panics at construction. Frontmatter capped at 64KB. New dependencies: github.com/opencontainers/image-spec, gopkg.in/yaml.v3 Resolves: #16 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent be33c9c commit 1f2e06d

3 files changed

Lines changed: 1162 additions & 1 deletion

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/stretchr/testify v1.11.1
1111
go.uber.org/mock v0.6.0
1212
golang.org/x/net v0.49.0
13+
gopkg.in/yaml.v3 v3.0.1
1314
oras.land/oras-go/v2 v2.6.0
1415
)
1516

@@ -25,5 +26,4 @@ require (
2526
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
2627
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
2728
google.golang.org/protobuf v1.36.10 // indirect
28-
gopkg.in/yaml.v3 v3.0.1 // indirect
2929
)

0 commit comments

Comments
 (0)