Documentation
¶
Overview ¶
Package scaffold creates Skillcrew registries ("skillcrew registry init"): it either adds a skillcrew.yaml to an existing Claude Code marketplace or scaffolds a new marketplace with an example plugin and skill.
Index ¶
Constants ¶
const ( CIGitHub = "github" CIGitLab = "gitlab" CINone = "none" )
CI systems Init can write a configuration for.
Variables ¶
This section is empty.
Functions ¶
func SanitizeOrg ¶
SanitizeOrg turns name into a valid organization and marketplace name: lowercase letters, digits and dashes, never a name reserved by Claude Code.
Types ¶
type Options ¶
type Options struct {
Org string // organization name; defaults to the marketplace name, else a sanitized dir basename
Owner string // marketplace owner name (used only when creating a marketplace); default = Org
Force bool // overwrite an existing skillcrew.yaml
// Version is the running skillcrew version. When it is a release
// (vX.Y.Z), the generated CI pins it; otherwise it uses @latest.
Version string
// CI is the CI configuration written in a new registry: CIGitHub (the
// default when empty), CIGitLab or CINone.
CI string
}
Options configures Init.
type Result ¶
type Result struct {
Converted bool // an existing Claude Code marketplace was converted
Created []string // files created, relative to dir, sorted
Notices []string // how the organization name was chosen
Warnings []string // e.g. external plugins ignored, skills aliased or left out
// Issues are what "skillcrew validate" reports on the result, minus the
// warnings already listed.
Issues []registry.Issue
}
Result lists what Init did.
func Init ¶
Init turns dir into a Skillcrew registry. If dir holds a Claude Code marketplace, only skillcrew.yaml is written, listing every skill as available. Otherwise a new marketplace is scaffolded; no existing file is ever overwritten in that case. Init never writes through a symbolic link: it fails if any existing path it would write to, or any directory on the way, is one.
type SkillOptions ¶ added in v0.2.0
type SkillOptions struct {
ID string // "plugin:skill"
Description string // what the skill does and when to use it
// Status, when set, is written to skillcrew.yaml: as an organization
// rule, or as a rule of Team when Team is set.
Status registry.Status
Team string
}
SkillOptions configures NewSkill.
type SkillResult ¶ added in v0.2.0
type SkillResult struct {
File string // the new SKILL.md, relative to dir
Created []string // files created, relative to dir, sorted
Modified []string // files changed, relative to dir, sorted
Notices []string // e.g. a team created in skillcrew.yaml
// OrgStatus is the status of the skill for the whole organization.
OrgStatus registry.Status
// RuleExists reports that skillcrew.yaml already had an organization
// rule for the skill, which OrgStatus reflects.
RuleExists bool
// Issues are what "skillcrew validate" reports on the result and did not
// report before, except the placeholder warning of the new skill.
Issues []registry.Issue
}
SkillResult lists what NewSkill did.
func NewSkill ¶ added in v0.2.0
func NewSkill(dir string, opts SkillOptions) (SkillResult, error)
NewSkill adds a skill to the registry in dir: its SKILL.md, its plugin (plugin.json and marketplace entry) when the plugin is new, and its status in skillcrew.yaml when opts.Status is set. Everything is checked before anything is written, so a refusal leaves the registry untouched. Like Init, it never writes through a symbolic link.