Skip to content

fix: split colon-separated skill names into namespace and name - #39

Merged
pavelanni merged 3 commits into
mainfrom
fix/colon-separated-skill-names
May 1, 2026
Merged

pavelanni merged 3 commits into
mainfrom
fix/colon-separated-skill-names

Conversation

@pavelanni

@pavelanni pavelanni commented May 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Split colon-separated names in SKILL.md frontmatter (e.g., agnosticv:catalog-builder) into namespace=agnosticv, name=catalog-builder
  • Fix provenance path to use resolved SkillCard name instead of raw discovered name

Context

Skills in repos like rhpds/rhdp-skills-marketplace use colon-separated names following the Claude Code plugin namespacing convention. These failed OCI name validation (^[a-z0-9]+(-[a-z0-9]+)*$) because colons aren't valid in OCI image names.

The colon maps naturally to our existing namespace + name fields — the prefix becomes namespace, the suffix becomes name.

Test plan

  • Unit test for colon-split in generate_test.go
  • Full test suite passes
  • Linter passes
  • Manual test: collection install with rhdp-collection.yaml installs all 5 skills
  • Provenance written correctly with split name/namespace

Closes #38

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Skills now support colon-separated naming conventions in frontmatter to automatically derive namespace and name values.
    • Enhanced skill metadata name resolution for improved directory organization during installation.
  • Tests

    • Added test coverage for skill metadata name and namespace derivation, including edge cases.

When SKILL.md frontmatter uses colon-separated names like
agnosticv:catalog-builder, split on the colon: prefix becomes
namespace, suffix becomes name. This matches the Claude Code
plugin namespacing convention.

Also fixes provenance path to use the resolved SkillCard name
instead of the raw discovered name.

Closes #38

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

coderabbitai Bot commented May 1, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: be67c9c5-6040-4c77-988d-37b635a78b49

📥 Commits

Reviewing files that changed from the base of the PR and between e133701 and 638ac1a.

📒 Files selected for processing (3)
  • internal/cli/collection.go
  • pkg/source/generate.go
  • pkg/source/generate_test.go

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Walkthrough

The changes implement support for colon-separated skill names in SKILL.md frontmatter (e.g., agnosticv:catalog-builder) by parsing them into separate namespace and name components. The GenerateSkillCard function now treats the colon prefix as namespace and suffix as name, with proper override handling for explicit namespace metadata. The CLI collection installation now uses this derived metadata name when writing unpacked skills.

Changes

Cohort / File(s) Summary
Namespace/Name Parsing Logic
pkg/source/generate.go, pkg/source/generate_test.go
Core parsing logic updated to split colon-separated name field into namespace prefix and name suffix, with fallback behavior and explicit namespace override support. Comprehensive test suite added covering colon parsing edge cases and namespace override scenarios.
CLI Integration
internal/cli/collection.go
Directory path derivation in installFromSource now uses SkillCard.Metadata.Name instead of skill.Name to align with the updated namespace/name separation logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/colon-separated-skill-names

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 60 minutes.

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

pavelanni added 2 commits May 1, 2026 18:00
Support explicit namespace in SKILL.md frontmatter via the
metadata.namespace field, including nested namespaces like
business/hr. Precedence: explicit metadata.namespace > colon
prefix in name > org from clone URL.

Refs: #38

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
Cover multiple colons (foo:bar:baz), leading colon (:bar),
and trailing colon (foo:) to document expected behavior.

Refs: #38

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni marked this pull request as ready for review May 1, 2026 22:07
@pavelanni
pavelanni merged commit 994dc6f into main May 1, 2026
5 checks passed
@pavelanni
pavelanni deleted the fix/colon-separated-skill-names branch May 1, 2026 22:07
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.

fix: handle colon-separated skill names in SKILL.md frontmatter

1 participant