add-parent-command

Official

Organize root commands with subcommands

Authoropenkaiden
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Organize CLI tools by introducing a parent command that groups related subcommands under a single namespace.

Core Features & Use Cases

  • Provides a reusable pattern to scaffold a hierarchical Cobra-based CLI, with a dedicated parent command and multiple subcommands.
  • Demonstrates argument validation to prevent unknown subcommands and ensures the parent command displays helpful usage when invoked without a subcommand.
  • Guides integration with a root command and systematic registration of subcommands via AddCommand for scalable command organization.

Quick Start

Create a new parent command function, attach each subcommand with AddCommand, and ensure RunE returns help for the parent when no subcommand is provided.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-parent-command
Download link: https://github.com/openkaiden/kdn/archive/main.zip#add-parent-command

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.