sipeed/picoclaw · error

✗ invalid registry name: %w

Error message

✗  invalid registry name: %w

What it means

The registry name in `skills install <registry>/<target>` failed utils.ValidateSkillIdentifier before any registry lookup: registry names must satisfy picoclaw's identifier policy (no spaces, slashes, uppercase, or punctuation outside the allowed set). The specific rule broken is in the wrapped error.

Source

Thrown at cmd/picoclaw/internal/skills/helpers.go:54

		fmt.Println("No skills installed.")
		return
	}

	fmt.Println("\nInstalled Skills:")
	fmt.Println("------------------")
	for _, skill := range allSkills {
		fmt.Printf("  ✓ %s (%s)\n", skill.Name, skill.Source)
		if skill.Description != "" {
			fmt.Printf("    %s\n", skill.Description)
		}
	}
}

// skillsInstallFromRegistry installs a skill from a named registry (e.g. clawhub).
func skillsInstallFromRegistry(cfg *config.Config, registryName, target string) error {
	err := utils.ValidateSkillIdentifier(registryName)
	if err != nil {
		return fmt.Errorf("✗  invalid registry name: %w", err)
	}

	registryMgr := skills.NewRegistryManagerFromToolsConfig(cfg.Tools.Skills)

	registry := registryMgr.GetRegistry(registryName)
	if registry == nil {
		return fmt.Errorf("✗  registry '%s' not found or not enabled. check your config.json.", registryName)
	}

	dirName, err := registry.ResolveInstallDirName(target)
	if err != nil {
		return fmt.Errorf("✗  invalid install target %q: %w", target, err)
	}

	fmt.Printf("Installing skill '%s' from %s registry...\n", target, registryName)

	workspace := cfg.WorkspacePath()
	targetDir := filepath.Join(workspace, "skills", dirName)

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Use the exact registry key from config.json (e.g. clawhub).
  2. Check for typos, stray spaces, and unbalanced shell quotes.
  3. Rename the registry key in config to a valid identifier.
  4. Read the wrapped ValidateSkillIdentifier message for the precise rule violated.

Example fix

# before
picoclaw skills install "claw hub/myskill"
# after
picoclaw skills install clawhub/myskill
Defensive patterns

Strategy: validation

Validate before calling

registryName = strings.TrimSpace(registryName)
if err := utils.ValidateSkillIdentifier(registryName); err != nil {
    return fmt.Errorf("invalid registry name %q: %w", registryName, err)
}

Type guard

func validRegistryName(s string) bool {
    return utils.ValidateSkillIdentifier(s) == nil
}

Prevention

When it happens

Trigger: skillsInstallFromRegistry receives a registryName with invalid characters — e.g. "Claw Hub", "claw/hub", or "clawhub!" — and ValidateSkillIdentifier rejects it at helpers.go:54.

Common situations: Typing the registry's display name instead of its config key, shell quoting mistakes, or a registry key in config.json that itself contains invalid characters.

Related errors


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/4bcef4a1159bf665. Report an issue: GitHub.