add-command-with-json

Official

Add JSON-enabled CLI commands quickly

Authoropenkaiden
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Add a new CLI command with JSON output support to standardize how new commands are created and tested within the kdn CLI environment.

Core Features & Use Cases

  • Scaffold a Cobra-based command file at pkg/cmd/<command>.go with a Use, Short, Long, Example sections.
  • Wire the command into rootCmd for discovery and add tests for preRun and execution paths.
  • Generate JSON-mode output support and optional text output for progress logging and error handling.

Quick Start

Create the new command file at pkg/cmd/<command>.go, wire it into root.go, and write tests to exercise both standard and JSON outputs.

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-command-with-json
Download link: https://github.com/openkaiden/kdn/archive/main.zip#add-command-with-json

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.