Skip to content

Standardize CLI flag patterns #44

@hbelmiro

Description

@hbelmiro

Summary

CLI flags have several inconsistencies that should be cleaned up to lock in a consistent UX.

Items

Required flag marking is inconsistent

init uses cmd.MarkFlagRequired() (idiomatic Cobra), but skill install and skill uninstall validate --target manually in RunE. All required flags should use Cobra's built-in mechanism.

Files: internal/cli/install.go, internal/cli/uninstall.go

--target validation is duplicated

The "cursor" | "claude" check is copy-pasted in three places (install.go, uninstall.go, skill_list.go). Extract a shared constant or validator function.

Files: internal/cli/install.go, internal/cli/uninstall.go, internal/cli/skill_list.go

StringP() vs StringVarP() style inconsistency

pack.go uses StringP() for --output, while pull.go uses StringVarP() for the same flag. Pick one style and apply it consistently.

Files: internal/cli/pack.go, internal/cli/pull.go

No short flags on skill subcommands

validate, pack, and push have -f; pack and pull have -o. But skill install/uninstall/list have no short flags at all. Consider adding -t for --target.

Files: internal/cli/install.go, internal/cli/uninstall.go, internal/cli/skill_list.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions