ilude/claude-code-config/cli-development
Claude Code and agent skill by ilude/claude-code-config
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Best practices for building CLI applications across languages. Covers CLI design principles (Unix philosophy, command structure, subcommands vs flags), argument parsing (required/optional args, flags, environment variables, config files, precedence), user interface (help text, version info, progress indicators, color output, interactive prompts), output formatting (human-readable vs machine-readable JSON/YAML, exit codes), error handling (clear messages, suggestions, debug mode), cross-platform considerations (paths, line endings, terminal capabilities), testing strategies (integration tests, output verification, exit codes), documentation (README, man pages, built-in help), and language-specific libraries. Activate when working with CLI applications, command-line tools, argument parsing, CLI utilities, argument handling, commands, subcommands, CLI frameworks, or building command-line interfaces.
Install
npx vskill@latest install ilude/claude-code-config/cli-developmentSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
CLI Development Guidelines
Best practices for designing and implementing command-line interface (CLI) applications across programming languages.
CLI Design Principles
Unix Philosophy
Follow the core Unix philosophy for robust, composable CLIs:
- Do one thing well - Each command should have a single, well-defined responsibility
- Make it composable - Design output to work as input to other programs
- Handle text streams - CLIs work with stdin/stdout/stderr
- Exit cleanly - Use appropriate exit codes (0 for success, non-zero for errors)
- Fail fast - Detect and report problems immediately
- Be scriptable - All functionality must be accessible from non-interactive contexts
Command Structure
Verb-Noun Pattern
Organize commands using verb-noun relationships:
Subcommands vs Flags
Use subcommands when:
- Commands have distinct behaviors or workflows
- Different sets of options apply to different operations
- You want clear logical grouping
Use flags when:
- Modifying behavior of a single operation
- Toggling optional features
- Providing configuration
Never mix deeply:
Command Hierarchy
Keep hierarchy shallow (max 2-3 levels):
Argument Parsing
Argument Types
Positional Arguments
- Required by default
- Appear in specific positions
- Use for primary input/object
Optional Arguments (with defaults)
- Used less frequently
- Should have sensible defaults
- Clearly documented
Flags and Options
Short Flags (-f)
- Single letter, used frequently
- For common operations
Long Flags (--flag)
- Verbose, self-documenting
- For less-common operations
- Preferred in scripts
Flag Styles
Environment Variables
Convention: Use SCREAMING_SNAKE_CASE for environment variables
Hierarchy (high to low precedence):
- Command-line flags (highest priority - most explicit)
- Environment variables (middle - applies to multiple invocations)
- Configuration file (lower - shared settings)
- Built-in defaults (lowest priority - fallback)
Example precedence:
Configuration Files
Location convention:
- Linux/macOS:
~/.config/app/config.yamlor~/.apprc - Windows:
%APPDATA%\App\config.yamlor~\AppData\Local\App\config.yaml - All platforms:
./config.yaml(current directory, highest priority)
Format preference: YAML > TOML > JSON > INI
- YAML is human-readable and concise
- TOML is simpler than YAML but supports nested structures
- JSON is universal but verbose
- INI is legacy
Example config file:
Load with proper precedence:
User Interface
Help Text
Provide comprehensive help:
Help text structure:
- Usage line:
Usage: tool [OPTIONS] COMMAND [ARGS]... - Brief description (1-2 lines)
- Options section (sorted: common first)
- Commands section (if subcommands exist)
- Examples section (show common patterns)
- Additional resources (docs link, contact info)
Per-command help:
Version Information
Provide version with --version / -v:
Store version in configuration:
Progress Indicators
For long operations, show progress:
Output format:
Spinners and Progress Bars
Use spinners for indeterminate progress:
Use progress bars for determinate progress:
Implement responsibly:
- Disable in non-interactive environments (detect piped output)
- Respect
--no-progressflag - Never output progress to stdout (use stderr)
Color Output
Support color with disable option:
Environment variable override:
Terminal detection:
Interactive Prompts
Use for confirmations and user input:
Guidelines:
- Ask for confirmation before destructive operations
- Provide sensible defaults
- Allow bypassing with
--forceflag - Never prompt in non-interactive contexts (detect piped input)
Output Formatting
Human-Readable Output
Default format for interactive use:
Characteristics:
- Table format with clear columns
- Natural language (e.g., "2 hours ago")
- Colors for emphasis (when supported)
- Sorted intelligently
Machine-Readable Output
JSON format for scripting:
YAML format (compact, readable):
CSV format (for spreadsheets):
Implementation:
Exit Codes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cli-development/SKILL.md
Popularity
- Repository stars
- 7
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Apr 2026, 7 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ilude/claude-code-config/cli-development)