Closed
Conversation
41bfb71 to
3cbcedd
Compare
Implement the SkillPackager interface with deterministic OCI artifact creation from skill directories. Uses ocispec types from github.com/opencontainers/image-spec for OCI 1.1 compliance. Parses SKILL.md YAML frontmatter for metadata, creates reproducible tar.gz content layers, per-platform OCI configs (ocispec.Image) with skill metadata in labels, manifests (ocispec.Manifest) with annotations, and multi-platform image indexes (ocispec.Index). Key components: - tar.go: Deterministic tar (sorted entries, normalized headers, PAX format) - gzip.go: Deterministic gzip (OS=255, no name/comment, BestCompression) - packager.go: Full packaging pipeline using ocispec types with digest.FromBytes for diff IDs and specs.Versioned for schema version Security: rejects symlinks (files and directories), hardlinks, device entries, path traversal in both filesystem reads and tar extraction. Size limits on decompression and per-file extraction. Resolves: #16 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3cbcedd to
aa1ebf4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SkillPackagerinterface with deterministic OCI artifact creation from skill directoriestar.gofor reproducible tar archives (sorted entries, normalized headers, PAX format, UID/GID=0)gzip.gofor reproducible gzip compression (OS=255, no name/comment, BestCompression)packager.gowith full packaging pipeline: directory reading, SKILL.md YAML frontmatter parsing, content layer creation, per-platform OCI configs with metadata labels, manifests with annotations, and multi-platform image indexesgopkg.in/yaml.v3from indirect to direct dependency for frontmatter parsingSecurity hardening:
82.6% test coverage with table-driven, parallel tests using testify.
Resolves #16
Test plan
taskpasses (lint + test)task license-checkpasses🤖 Generated with Claude Code