Skip to content

feat: build skill images from remote Git repositories - #24

Merged
pavelanni merged 11 commits into
mainfrom
feature/remote-git-sources
Apr 30, 2026
Merged

pavelanni merged 11 commits into
mainfrom
feature/remote-git-sources

Conversation

@pavelanni

@pavelanni pavelanni commented Apr 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Build OCI skill images directly from Git repository URLs (skillctl build https://github.com/org/repo)
  • Discover skills by SKILL.md presence (no skill.yaml required in source repos)
  • Generate SkillCards on the fly from SKILL.md frontmatter metadata
  • Support GitHub, GitLab, and generic Git host URLs
  • Sparse checkout optimization when targeting a subdirectory

Closes #10. Closes #13.

Usage

# Build all skills from a repo
skillctl build https://github.com/anthropics/skills

# Build skills from a specific subdirectory
skillctl build https://github.com/anthropics/skills/tree/main/skills

# Build a single skill
skillctl build https://github.com/anthropics/skills/tree/main/skills/code-review

# Filter by name glob
skillctl build https://github.com/org/repo --filter "code-*"

# Pin to a specific ref
skillctl build https://github.com/org/repo --ref v1.0

Design

New pkg/source package (source resolver layer) that sits between the CLI and pkg/oci:

File Responsibility
giturl.go URL parsing for GitHub, GitLab, generic hosts
clone.go Shallow clone with sparse checkout, ref override
discover.go Walk directories for SKILL.md, glob filtering
generate.go SKILL.md frontmatter → in-memory SkillCard
source.go Orchestrator: parse → clone → discover → generate → provenance

pkg/oci.BuildOptions gains a SkillCard field so generated SkillCards
can be passed in without writing temporary files.

Test plan

  • URL parsing: 7 test cases (GitHub, GitLab, generic, errors)
  • Git clone: 4 test cases (shallow, subpath, ref override, bad subpath)
  • Skill discovery: 7 test cases (multi, single, hidden, filter, nesting)
  • SkillCard generation: 3 test cases (frontmatter, fallbacks, malformed)
  • Pre-built SkillCard build: 1 test case + all existing OCI tests pass
  • Orchestrator: 2 test cases (IsRemote, OrgFromCloneURL)
  • End-to-end: tested against live GitHub repos
  • Linter: 0 issues
  • Local build regression: unchanged behavior confirmed

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • The build command now accepts remote Git repository URLs as input
    • Added --ref flag to specify Git branches or tags for remote sources
    • Added --filter flag to select specific skills from multi-skill repositories
    • Automatic discovery and sequential building of multiple skills from a single remote repository
    • Support for sparse checkouts and subpath handling within cloned repositories
  • Documentation

    • New implementation plan and design specification for remote Git source support

Design for building OCI skill images directly from Git repository
URLs, with SKILL.md-based discovery and SkillCard generation from
frontmatter. Closes #10 and #13.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Eight tasks covering URL parsing, git clone with sparse checkout,
SKILL.md discovery, SkillCard generation, Build() changes, resolver
orchestrator, CLI integration, and end-to-end verification.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Implement Git clone functionality with sparse checkout optimization and
ref override support for remote Git repositories.

Features:
- CheckGit validates git availability in PATH
- Clone performs shallow clone with depth=1 for efficiency
- Sparse checkout with --filter=blob:none for subPath clones
- Automatic fallback to full shallow clone when sparse fails
- RefOverride option to clone specific tags/branches/commits
- Returns CloneResult with directory, commit SHA, and cleanup func

Tests verify:
- Git availability check
- Shallow clone with subpath extraction
- Error on nonexistent subpath
- RefOverride clones correct tag/branch

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Implements Tasks 3 and 4: SKILL.md-based skill discovery with glob filtering
and SkillCard generation from frontmatter.

- Discover(): walks directory tree for SKILL.md files, supports glob patterns
- GenerateSkillCard(): parses YAML frontmatter, generates SkillCard with fallbacks
- Shared frontmatter parser (parseFrontmatterRaw) handles malformed YAML gracefully
- Skips hidden directories, prevents nested skill discovery
- Normalizes versions to semver (e.g., '2.0' → '2.0.0')
- Falls back to first sentence for description, directory name for skill name

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Add SkillCard field to BuildOptions to support building from a
pre-built SkillCard instead of always reading skill.yaml from disk.
When SkillCard is provided, Build skips file read/parse/validate.

This enables building skills from remote Git sources where the
SkillCard is generated from SKILL.md frontmatter.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Enables 'skillctl build' to accept Git URLs in addition to local
directories. New --ref flag allows specifying branch, tag, or commit
SHA. New --filter flag enables glob pattern matching on skill names.

The command automatically detects remote URLs via source.IsRemote()
and routes them to runBuildRemote(), which:
- Clones the repo (with optional ref)
- Discovers skills (with optional filter)
- Generates SkillCards for skills missing skillcard.yaml
- Builds each skill into a local OCI image
- Reports success/failure counts

The existing runBuild() function remains unchanged for local paths.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@pavelanni has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 3 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: f1d91919-a858-4354-978a-ff92933c114a

📥 Commits

Reviewing files that changed from the base of the PR and between 579dc2c and 5e39cd6.

📒 Files selected for processing (6)
  • internal/cli/build.go
  • pkg/oci/build.go
  • pkg/source/clone.go
  • pkg/source/discover.go
  • pkg/source/generate.go
  • pkg/source/source.go
📝 Walkthrough

Walkthrough

Implements remote Git source support for skill building. The feature adds URL parsing for Git repositories, cloning with ref/subpath handling, automatic skill directory discovery, SkillCard generation from SKILL.md frontmatter, and CLI integration to build multiple skills with provenance tracking.

Changes

Cohort / File(s) Summary
Documentation & Specifications
docs/superpowers/plans/2026-04-29-remote-git-sources.md, docs/superpowers/specs/2026-04-29-remote-git-sources-design.md
New planning and design documents specifying end-to-end remote Git source feature including URL parsing, cloning, discovery, SkillCard generation, and CLI integration.
CLI Build Command
internal/cli/build.go
Extended build command to accept remote Git URLs alongside local directories. Detects remote sources via source.IsRemote, resolves them to one or more skills with source.Resolve, validates --tag usage, and builds each skill sequentially with provenance injection and aggregated error handling.
OCI Build Integration
pkg/oci/client.go, pkg/oci/build.go, pkg/oci/oci_test.go
Added optional SkillCard field to BuildOptions allowing pre-built skill cards to bypass disk-based parsing; updated build flow to use provided card when available; added test validating pre-built card workflow.
Git URL Parsing
pkg/source/giturl.go, pkg/source/giturl_test.go
New module parsing Git URLs (GitHub, GitLab, generic hosts) into normalized clone URL, ref, and optional subpath components; extracts tree/<ref>/<subpath> patterns and applies host-specific rules.
Repository Cloning
pkg/source/clone.go, pkg/source/clone_test.go
New module verifying Git availability, cloning remote repos with ref-aware strategies (SHA-based no-checkout, sparse checkout with shallow fallback, or standard shallow clone), returning resolved directory, commit SHA, and cleanup function.
Skill Discovery
pkg/source/discover.go, pkg/source/discover_test.go
New module recursively locating SKILL.md directories in cloned repos, deriving skill names from frontmatter, filtering by glob pattern, skipping hidden directories, and returning sorted results.
SkillCard Generation
pkg/source/generate.go, pkg/source/generate_test.go
New module generating SkillCard from SKILL.md frontmatter (parsing YAML, extracting metadata with fallbacks, normalizing version, deriving description from first sentence).
Source Resolution
pkg/source/source.go, pkg/source/source_test.go
New orchestration module combining URL detection, Git parsing, cloning, discovery, and SkillCard generation; attaches provenance metadata (source URL, commit SHA, repo-relative path); validates and accumulates resolved skills with cleanup.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI Build Command
    participant Source as Source Resolver
    participant Git as Git Operations
    participant Discover as Skill Discovery
    participant Generate as SkillCard Gen
    participant OCI as OCI Builder

    CLI->>Source: Resolve(remoteURL, ref, filter)
    Source->>Git: ParseGitURL(URL)
    Git-->>Source: GitSource{CloneURL, Ref, SubPath}
    Source->>Git: CheckGit()
    Git-->>Source: ok/error
    Source->>Git: Clone(GitSource, CloneOptions)
    Git->>Git: git clone + git checkout
    Git-->>Source: CloneResult{Dir, CommitSHA}
    Source->>Discover: Discover(clonedDir, filter)
    Discover-->>Source: []DiscoveredSkill
    
    loop For each discovered skill
        Source->>Generate: GenerateSkillCard(skillDir)
        Generate->>Generate: Parse SKILL.md frontmatter
        Generate-->>Source: *SkillCard
        Source->>Source: Inject Provenance(source, commit, path)
    end
    
    Source-->>CLI: ResolveResult{Skills, Cleanup}
    
    loop For each resolved skill
        CLI->>OCI: Build(skillDir, BuildOptions{SkillCard})
        OCI->>OCI: Use provided SkillCard
        OCI-->>CLI: Image digest
    end
    
    CLI->>Source: Cleanup()
    Source->>Git: Remove temp directory
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main objective: enabling skill image building from Git repository sources.
Linked Issues check ✅ Passed All coding requirements from issues #10 and #13 are met: Git URL parsing/cloning, skill discovery from SKILL.md, SkillCard generation from frontmatter with fallbacks, ref pinning, sparse checkout, and OCI build integration.
Out of Scope Changes check ✅ Passed All changes directly support remote Git repository skill building and SkillCard generation objectives; no unrelated modifications found.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/remote-git-sources

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 45 minutes and 3 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

- Support commit SHA refs via clone + checkout (not --branch)
- Fix GitLab nested group URL parsing (org/subgroup/repo)
- Surface discoverNested errors instead of swallowing them
- Validate namespace/name on generated SkillCards before build
- Sanitize git error output to avoid leaking credentials

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni marked this pull request as ready for review April 30, 2026 00:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@internal/cli/build.go`:
- Around line 66-70: The code prints rawURL to stdout which can leak credentials
(e.g., https://token@host/repo.git); update the printing in the block that uses
rawURL and ref so you first parse rawURL (using net/url.Parse), remove or redact
the User field (set url.User = nil or replace with a placeholder like
"<redacted>"), build a sanitizedURL string and use that in the
fmt.Fprintf/Fprintln calls instead of rawURL (keep ref printing unchanged).
Locate the print statements that reference rawURL and replace them to use the
sanitizedURL variable.
- Line 64: Replace uses of context.Background() with the CLI command context so
cancellation/interrupts propagate; in functions runBuild() and runBuildRemote(),
change the created ctx variable to use cmd.Context() (the context from the cobra
command parameter) wherever ctx := context.Background() is currently used so
resolve, clone, and build operations respect Ctrl+C and parent cancellations.

In `@pkg/oci/build.go`:
- Around line 30-57: In Build, do not skip validation when opts.SkillCard is
supplied: after setting sc = opts.SkillCard (or after parsing via
skillcard.Parse when opts.SkillCard is nil), always call skillcard.Validate(sc),
handle its error (valErr) and the returned validationErrors the same way as the
parsed-path (returning fmt.Errorf on valErr and composing a joined message when
len(validationErrors) > 0). Update the branch that currently just assigns sc to
invoke the same validation logic (including returning ocispec.Descriptor{} on
failures) so both injected and parsed SkillCards are validated consistently.

In `@pkg/source/clone.go`:
- Around line 82-88: sparseClone can leave destDir populated when it returns an
error (e.g., after a failed sparse-checkout), so immediately calling
shallowClone into the same destDir will fail; change the fallback logic around
sparseClone and shallowClone to detect a failed sparseClone and remove/clean
destDir (e.g., os.RemoveAll on destDir) before invoking shallowClone, or
alternatively have sparseClone itself rollback the destination on error —
reference the sparseClone, shallowClone and destDir symbols when making the
change.

In `@pkg/source/discover.go`:
- Around line 33-45: The current discovery loop in discover/discoverNested only
iterates root + one nested level and misses deeper skills; replace the manual
two-level traversal in the functions (e.g., discoverNested / discover) with
filepath.WalkDir and prune entries: skip hidden directories
(strings.HasPrefix(name, ".")), and when a directory containing "SKILL.md" is
encountered, record that skill and skip walking its descendants (use
DirEntry.IsDir and WalkDirFunc to return fs.SkipDir) so nested skills under a
skill dir are not explored; ensure you still collect SKILL.md paths and
propagate errors the same way as the existing logic.
- Around line 20-21: The code is ignoring errors from filepath.Match and
treating invalid glob syntax as "no skills matching"; change each occurrence
(where you currently have "if matched, _ := filepath.Match(filter, name) { ...
}") to capture the error (if matched, err := filepath.Match(filter, name)), and
if err != nil return a clear user error (e.g. fmt.Errorf("invalid --filter
pattern %q: %w", filter, err)); otherwise proceed with the matched boolean check
and existing logic. Apply this change to all three occurrences that use
filepath.Match with variables filter, name (and similar uses) so malformed
patterns produce an immediate, descriptive error rather than being silently
ignored.

In `@pkg/source/generate.go`:
- Around line 115-120: The normalizeVersion function currently splits the entire
version string on dots, which truncates and mutates versions containing
pre-release or build metadata like "1.2.3-beta.1" or "1.2.3+build.5"; update
normalizeVersion to first separate any suffix starting with '-' or '+' (preserve
that suffix), operate only on the core version (split core on '.', pad with "0"
until 3 parts or take first 3 parts), then rejoin core and append the original
suffix unchanged; locate the normalizeVersion function to implement this change.
- Line 29: The generated metadata.description can end up empty when
stringFromMap(fm, "description", firstSentence(body)) resolves to an empty
string; update the logic in the code that builds metadata.description (the call
site using stringFromMap and firstSentence) to ensure a non-empty fallback is
used—for example, compute desc := stringFromMap(fm, "description",
firstSentence(body)); if desc == "" { desc = "<no description>" } and then set
Description: desc so SkillCard metadata.description is never empty (refer to
stringFromMap and firstSentence in the same generation path).

In `@pkg/source/giturl.go`:
- Around line 69-71: The fallback for GitLab nested-group root URLs incorrectly
sets groupRepoPath using parts[:2], dropping intermediate groups; update the
logic in pkg/source/giturl.go where groupRepoPath is assigned (variable
groupRepoPath) so that when parts length >= 2 you join all path segments except
the final repo segment (e.g., strings.Join(parts[:len(parts)-1], "/")) instead
of parts[:2], and ensure you guard against small slice lengths so you don’t
panic.

In `@pkg/source/source.go`:
- Around line 67-70: When hasSkillYAML(d.Dir) is true the code currently appends
ResolvedSkill with SkillCard: nil which skips the provenance injection applied
later; change this branch to load and parse the skill.yaml into a SkillCard
(deserialize into the same SkillCard type used elsewhere), run the same
provenance injection routine you use for remote builds (the provenance injection
block that currently runs for non-skill.yaml paths), and set
ResolvedSkill.SkillCard to the parsed+injected SkillCard before appending;
specifically update the hasSkillYAML branch that calls hasSkillYAML to call the
parser/decoder for skill.yaml into SkillCard, invoke the provenance injection
helper (the same function or logic used in the other branch), and then append
ResolvedSkill{Dir: d.Dir, Name: d.Name, SkillCard: parsedCard}.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 546e56f5-8b07-44a1-8aa0-0b9743f01604

📥 Commits

Reviewing files that changed from the base of the PR and between d841cb9 and 579dc2c.

📒 Files selected for processing (16)
  • docs/superpowers/plans/2026-04-29-remote-git-sources.md
  • docs/superpowers/specs/2026-04-29-remote-git-sources-design.md
  • internal/cli/build.go
  • pkg/oci/build.go
  • pkg/oci/client.go
  • pkg/oci/oci_test.go
  • pkg/source/clone.go
  • pkg/source/clone_test.go
  • pkg/source/discover.go
  • pkg/source/discover_test.go
  • pkg/source/generate.go
  • pkg/source/generate_test.go
  • pkg/source/giturl.go
  • pkg/source/giturl_test.go
  • pkg/source/source.go
  • pkg/source/source_test.go

Comment thread internal/cli/build.go Resolved
Comment thread internal/cli/build.go Resolved
Comment thread pkg/oci/build.go Resolved
Comment thread pkg/source/clone.go Resolved
Comment thread pkg/source/discover.go Resolved
Comment thread pkg/source/discover.go Resolved
Comment thread pkg/source/generate.go
Name: stringFromMap(fm, "name", filepath.Base(skillDir)),
Namespace: orgFallback,
Version: normalizeVersion(stringFromMapNested(fm, "metadata", "version", "0.1.0")),
Description: stringFromMap(fm, "description", firstSentence(body)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Ensure generated metadata.description is never empty.

At Line 29, if frontmatter has no description and the body is empty/whitespace, firstSentence(body) returns "", producing a SkillCard that violates required metadata and may fail later in validation/build paths.

Suggested fix
-			Description:   stringFromMap(fm, "description", firstSentence(body)),
+			Description:   nonEmpty(
+				stringFromMap(fm, "description", ""),
+				firstSentence(body),
+				filepath.Base(skillDir),
+			),
+func nonEmpty(values ...string) string {
+	for _, v := range values {
+		if s := strings.TrimSpace(v); s != "" {
+			return s
+		}
+	}
+	return ""
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Description: stringFromMap(fm, "description", firstSentence(body)),
Description: nonEmpty(
stringFromMap(fm, "description", ""),
firstSentence(body),
filepath.Base(skillDir),
),
Suggested change
Description: stringFromMap(fm, "description", firstSentence(body)),
func nonEmpty(values ...string) string {
for _, v := range values {
if s := strings.TrimSpace(v); s != "" {
return s
}
}
return ""
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/source/generate.go` at line 29, The generated metadata.description can
end up empty when stringFromMap(fm, "description", firstSentence(body)) resolves
to an empty string; update the logic in the code that builds
metadata.description (the call site using stringFromMap and firstSentence) to
ensure a non-empty fallback is used—for example, compute desc :=
stringFromMap(fm, "description", firstSentence(body)); if desc == "" { desc =
"<no description>" } and then set Description: desc so SkillCard
metadata.description is never empty (refer to stringFromMap and firstSentence in
the same generation path).

Comment thread pkg/source/generate.go Resolved
Comment thread pkg/source/giturl.go
Comment on lines +69 to +71
if groupRepoPath == "" {
groupRepoPath = strings.Join(parts[:2], "/")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

GitLab nested-group root URLs are parsed incorrectly.

At Line 70, fallback uses only parts[:2], so a URL like https://gitlab.com/group/sub/repo becomes clone URL .../group/sub.git (repo segment dropped).

Suggested fix
 	if groupRepoPath == "" {
-		groupRepoPath = strings.Join(parts[:2], "/")
+		// root repo URL: include full group/repo path (supports nested groups)
+		groupRepoPath = strings.Join(parts, "/")
 	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if groupRepoPath == "" {
groupRepoPath = strings.Join(parts[:2], "/")
}
if groupRepoPath == "" {
// root repo URL: include full group/repo path (supports nested groups)
groupRepoPath = strings.Join(parts, "/")
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/source/giturl.go` around lines 69 - 71, The fallback for GitLab
nested-group root URLs incorrectly sets groupRepoPath using parts[:2], dropping
intermediate groups; update the logic in pkg/source/giturl.go where
groupRepoPath is assigned (variable groupRepoPath) so that when parts length >=
2 you join all path segments except the final repo segment (e.g.,
strings.Join(parts[:len(parts)-1], "/")) instead of parts[:2], and ensure you
guard against small slice lengths so you don’t panic.

Comment thread pkg/source/source.go Resolved
- Sanitize URLs in CLI output to avoid leaking credentials
- Use cmd.Context() for cancellation/Ctrl+C propagation
- Validate all SkillCards (pre-built and parsed) in Build()
- Clean destDir before shallowClone fallback after sparse failure
- Use WalkDir for recursive skill discovery at any depth
- Validate --filter glob pattern early with clear error
- Preserve pre-release/build metadata in normalizeVersion
- Parse skill.yaml and inject provenance for repos that have it

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni merged commit 8f8227b into main Apr 30, 2026
5 checks passed
@pavelanni
pavelanni deleted the feature/remote-git-sources branch April 30, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: generate skill.yaml from SKILL.md frontmatter and manifest files feat: pack skills from remote Git repositories

1 participant