LogoClawIndex
CasesSkillsAbout
LogoClawIndex

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.

cobra-patterns - Build Go CLIs with Cobra patterns

Provides production-ready patterns for Cobra command structures, flags, nested commands, lifecycle hooks, argument validation, and initialization.

Tags

Updated: 2026-10-04

Capabilities

Typical Inputs

Typical Outputs

What this skill does

  • Select CLI structure patterns
  • Scaffold Cobra CLI projects
  • Define nested commands
  • Manage local flags
  • Manage persistent flags
  • Validate command arguments
  • Configure lifecycle hooks
  • Initialize CLI configuration

Inputs

  • CLI name
  • CLI structure type
  • Go CLI requirements
  • Command arguments
  • Flag requirements
  • Configuration requirements

Outputs

  • Cobra CLI directory structure
  • Go command source files
  • Go module configuration
  • Command and flag definitions
  • Argument validation logic
  • CLI initialization logic

Requirements

  • Go development environment
  • Cobra dependency
  • Bash shell
  • File read and write access

Source

  • Spec: SKILL.md
Go
Cobra
CLI
command structure
flags
argument validation
Select CLI structure patterns
Scaffold Cobra CLI projects
Define nested commands
Manage local flags
CLI name
CLI structure type
Go CLI requirements
Cobra CLI directory structure
Go command source files
Go module configuration