sipeed/picoclaw · error
name is required
Error message
name is required
What it means
SkillInfo.validate rejects a skill whose Name is empty. Names are mandatory metadata (SKILL.md frontmatter / registry entries) and, when present, must additionally satisfy ValidateSkillName (pattern ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$, max 64). Empty name and invalid pattern are joined via errors.Join, so both can appear in one error.
Source
Thrown at pkg/skills/loader.go:43
MaxDescriptionLength = 1024
)
type SkillMetadata struct {
Name string `json:"name"`
Description string `json:"description"`
}
type SkillInfo struct {
Name string `json:"name"`
Path string `json:"path"`
Source string `json:"source"`
Description string `json:"description"`
}
func (info SkillInfo) validate() error {
var errs error
if info.Name == "" {
errs = errors.Join(errs, errors.New("name is required"))
} else {
if err := ValidateSkillName(info.Name); err != nil {
errs = errors.Join(errs, err)
}
}
if info.Description == "" {
errs = errors.Join(errs, errors.New("description is required"))
} else if len(info.Description) > MaxDescriptionLength {
errs = errors.Join(errs, fmt.Errorf("description exceeds %d character", MaxDescriptionLength))
}
return errs
}
type SkillsLoader struct {
workspace string
workspaceSkills string // workspace skills (project-level)
globalSkills string // global skills (~/.picoclaw/skills)View on GitHub (pinned to 49183d7e8d)
Solutions
- Add a name field to the SKILL.md frontmatter (or the skill payload), e.g. 'name: my-skill'
- Use the directory-name convention: lowercase alphanumerics separated by single hyphens, <= 64 chars
- If the name is present but still failing, check the separate pattern error also returned by validate()
Example fix
# before --- description: does a thing --- # after --- name: my-skill description: does a thing ---
Defensive patterns
Strategy: validation
Validate before calling
// before loading skills
func validSkillInfo(info skills.SkillInfo) error { return info.ValidateIfExposed() }
// or inline: reject empty names early
if info.Name == "" { return fmt.Errorf("skill %s: name is required", info.Path) } Try / catch
if err := info.Validate(); err != nil { // or the loader's validate path
if strings.Contains(err.Error(), "name is required") {
// fix SKILL.md frontmatter: add name field
}
} Prevention
- Always include name and description in SKILL.md frontmatter
- Use the directory-name convention for skills so name and folder match
- Validate skills in CI with the loader before shipping a workspace
When it happens
Trigger: Registering or validating a SkillInfo with Name == "" — e.g. a SKILL.md whose YAML frontmatter lacks the name field, or a JSON skill payload with an empty/missing name key.
Common situations: Hand-written SKILL.md missing frontmatter; frontmatter uses a different key (title: instead of name:); programmatic skill registration passing an uninitialized struct.
Related errors
- description is required
- host cannot be empty
- host list contains an empty entry
- channel '%s' not found or not enabled
- no media store available: %w
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/5e5ae6d28d3a8e6b.
Report an issue: GitHub.