scaffold

package
v0.2.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: 21 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 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

This section is empty.

Variables

This section is empty.

Functions

func SanitizeOrg

func SanitizeOrg(name string) string

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 workflow pins it; otherwise it uses @latest.
	Version 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

func Init(dir string, opts Options) (Result, error)

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.

Jump to

Keyboard shortcuts

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