sipeed/picoclaw · warning

exactly 1 argument is required: <github>

Error message

exactly 1 argument is required: <github>

What it means

Cobra Args validator for `picoclaw skills install` without --registry: exactly one positional argument (a GitHub owner/repo/path reference) is required. Any other arity is rejected before the command runs.

Source

Thrown at cmd/picoclaw/internal/skills/install.go:30

	var registry string

	cmd := &cobra.Command{
		Use:   "install",
		Short: "Install skill from GitHub or a registry",
		Example: `
picoclaw skills install sipeed/picoclaw-skills/weather
picoclaw skills install --registry clawhub github
`,
		Args: func(cmd *cobra.Command, args []string) error {
			if registry != "" {
				if len(args) != 1 {
					return fmt.Errorf("when --registry is set, exactly 1 argument is required: <slug>")
				}
				return nil
			}

			if len(args) != 1 {
				return fmt.Errorf("exactly 1 argument is required: <github>")
			}

			return nil
		},
		RunE: func(_ *cobra.Command, args []string) error {
			cfg, err := internal.LoadConfig()
			if err != nil {
				return err
			}
			if registry != "" {
				return skillsInstallFromRegistry(cfg, registry, args[0])
			}

			return skillsInstallFromRegistry(cfg, "github", args[0])
		},
	}

	cmd.Flags().StringVar(&registry, "registry", "", "Install from registry: --registry <name> <slug>")

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Pass exactly one GitHub reference: `picoclaw skills install sipeed/picoclaw-skills/weather`
  2. Install multiple skills by invoking the command once per skill
  3. Quote the whole owner/repo/skill argument so the shell delivers one word

Example fix

# before
picoclaw skills install weather news

# after
picoclaw skills install sipeed/picoclaw-skills/weather
picoclaw skills install sipeed/picoclaw-skills/news
Defensive patterns

Strategy: validation

Validate before calling

if registry == "" && len(args) != 1 {
    return fmt.Errorf("usage: picoclaw skills install <owner/repo/skill>")
}

Prevention

When it happens

Trigger: `picoclaw skills install` with no arguments, or with two or more arguments such as `picoclaw skills install sipeed/picoclaw-skills/weather extra`.

Common situations: Forgetting the skill path; trying to install several skills in one invocation (not supported); unquoted paths splitting into multiple shell words.

Related errors


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