registry

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package registry reads a Skillcrew registry: a Claude Code marketplace repository with a skillcrew.yaml governance file at its root.

Index

Constants

View Source
const GovernanceFile = "skillcrew.yaml"

GovernanceFile is the governance file at the registry root.

View Source
const MarketplaceFile = ".claude-plugin/marketplace.json"

MarketplaceFile is the Claude Code marketplace manifest.

Variables

This section is empty.

Functions

func ValidTagName

func ValidTagName(name string) bool

ValidTagName reports whether name is a tag name git accepts (git check-ref-format), given without its refs/tags/ prefix. Names starting with a dash or refs/ are refused too: they would be read as options or as another ref.

Types

type Governance

type Governance struct {
	Org     string          `yaml:"org"`
	Default Status          `yaml:"default"`
	Skills  map[string]Rule `yaml:"skills"`
	Teams   map[string]Team `yaml:"teams"`
}

Governance is the content of skillcrew.yaml.

func (Governance) OrgRule

func (g Governance) OrgRule(id string) Rule

OrgRule returns the organization rule for a skill, falling back to the default status.

type Issue

type Issue struct {
	Severity Severity `json:"severity"`
	Message  string   `json:"message"`
	Skill    string   `json:"skill,omitempty"` // id of the skill concerned, when there is one
}

Issue is a validation finding.

func (Issue) String

func (i Issue) String() string

type Registry

type Registry struct {
	Name       string
	Skills     []Skill           // sorted by ID
	Plugins    map[string]string // plugin name -> directory
	Governance Governance
	// Warnings concern every developer (e.g. ignored plugins); syncs show them.
	Warnings []string
	// contains filtered or unexported fields
}

Registry is a parsed registry.

func Discover

func Discover(fsys fs.FS) (*Registry, error)

Discover reads the marketplace and its skills, ignoring the governance file.

func Load

func Load(fsys fs.FS) (*Registry, error)

Load parses the registry stored in fsys.

func (*Registry) InstallName

func (r *Registry) InstallName(s Skill) string

InstallName is the directory name a skill is installed under.

func (*Registry) PluginDir

func (r *Registry) PluginDir(name string) (string, bool)

PluginDir returns the directory of a plugin.

func (*Registry) Skill

func (r *Registry) Skill(id string) (Skill, bool)

Skill returns the skill with the given ID.

func (*Registry) Validate

func (r *Registry) Validate(fsys fs.FS) []Issue

Validate checks the skills and the governance of a registry loaded from fsys.

type Rule

type Rule struct {
	Status     Status `yaml:"status"`
	Message    string `yaml:"message"`
	ReplacedBy string `yaml:"replaced_by"`
	Ref        string `yaml:"ref"`
	SHA        string `yaml:"sha"`
	InstallAs  string `yaml:"install_as"`
}

Rule is the governance of one skill at one level.

func (Rule) Pinned

func (r Rule) Pinned() bool

Pinned reports whether the rule fixes the skill to a ref or a commit.

func (*Rule) UnmarshalYAML

func (r *Rule) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML accepts either a bare status or a mapping.

type Severity

type Severity string

Severity of a validation issue.

const (
	Error   Severity = "error"
	Warning Severity = "warning"
)

Issue severities: errors fail validation, warnings do not.

type Skill

type Skill struct {
	ID     string // "plugin:name"
	Plugin string
	Name   string
	Dir    string // directory relative to the registry root
}

Skill is a skill discovered in the registry.

type Status

type Status string

Status is the lifecycle status of a skill.

const (
	Available   Status = "available"
	Recommended Status = "recommended"
	Required    Status = "required"
	Deprecated  Status = "deprecated"
	Blocked     Status = "blocked"
)

Skill statuses.

func (*Status) UnmarshalYAML

func (s *Status) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML rejects unknown statuses.

type Team

type Team struct {
	Skills map[string]Rule `yaml:"skills"`
}

Team holds the rules of one team.

func (*Team) UnmarshalYAML

func (t *Team) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML rejects unknown fields.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL