# golang-spf13-cobra

> Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args vali…

Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage/help template customization, man-page and markdown doc generation, and testing with SetArgs/SetOut/SetErr. Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`. For configuration layering alongside cobra, see the `samber/cc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I/O patterns), see `samber/cc-skills-golang@golang-cli`.

- Type: Skill
- Made by: samber
- Category: Developer tools
- Formats: Skills
- Version: 1.1.2
- Source: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra
- Page: https://pluginboard.ai/skills/golang-spf13-cobra

## Works with

- ChatGPT
- Claude
- Gemini
- GitHub Copilot
- Cursor
- Claude Code
- Codex
- Antigravity
- Gemini CLI
- Replit
- OpenClaw
- OpenCode
- Hermes Agent

## Install

### ChatGPT

In ChatGPT: Download the golang-spf13-cobra folder and zip it, then Plugins → Skills → Create → Upload from your computer. Business and Enterprise plans.

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Claude

In Claude (web or desktop): Download the golang-spf13-cobra folder and zip the folder itself, then upload it in Customize → Skills.

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Gemini

In Gemini: Download the golang-spf13-cobra folder, then at gemini.google.com click Customize → Skills → Create → Upload and pick the folder (or a .zip of it).

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### GitHub Copilot

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.copilot/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Cursor

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.cursor/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Claude Code

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.claude/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Codex

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.agents/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Antigravity

In Antigravity: Copy the golang-spf13-cobra folder into ~/.gemini/config/skills (Antigravity app and IDE) or ~/.gemini/antigravity-cli/skills (Antigravity CLI).

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Gemini CLI

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.gemini/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Replit

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra .agents/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### OpenClaw

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.openclaw/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### OpenCode

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.config/opencode/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

### Hermes Agent

Run in your terminal:

```shell
npx -y degit samber/cc-skills-golang/skills/golang-spf13-cobra ~/.hermes/skills/golang-spf13-cobra
```

View the folder on GitHub: https://github.com/samber/cc-skills-golang/tree/HEAD/skills/golang-spf13-cobra

---
From Pluginboard (https://pluginboard.ai).
