cli-expert

Guide C# CLI development with System.CommandLine and POSIX conventions.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/MCrank/code-compress --skill cli-expert-mcrank
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-expert
Source: https://github.com/MCrank/code-compress/tree/main/.claude/skills/cli-expert
Command: npx skills add https://github.com/MCrank/code-compress --skill cli-expert-mcrank

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the development of robust command-line interface (CLI) tools, ensuring they are production-ready with proper help text, output formatting, and error handling.

Core Features & Use Cases

  • CLI Development Guidance: Provides expert advice on using System.CommandLine for building CLIs.
  • Convention Adherence: Ensures adherence to POSIX conventions and best practices for CLI design.
  • Output & Error Handling: Guides implementation of dual-mode (human-readable/JSON) output and standardized error reporting.
  • Use Case: Develop a new CLI command for the CodeCompress project, ensuring it follows all established patterns for options, arguments, help text, and output formatting.

Quick Start

Use the cli-expert skill to implement a new command for the CodeCompress CLI.

Frequently Asked Questions about cli-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a production-grade CLI in C# using System.CommandLine?

Build a production-grade CLI in C# using System.CommandLine by following expert implementation patterns for command registration, option handling, and POSIX conventions. This ensures proper help text, dual-mode output formatting, and robust error reporting.

What is the best way to format CLI output for both human users and JSON consumers?

The best way to format CLI output is implementing dual-mode output formatting. This approach generates human-readable text for terminal users and structured JSON output for automated consumers, guided by standardized error reporting patterns.

How do I handle command registration and option parsing in a dotnet command-line tool?

Handle command registration and option parsing in a dotnet command-line tool by utilizing the System.CommandLine library. It provides structured patterns for defining commands, arguments, and options while adhering to POSIX conventions.

Does System.CommandLine support security validation for path inputs?

Yes, implementing security validation for path inputs is supported. You can apply robust validation patterns within your command-line interface to secure file and directory path arguments before processing.

Why does my dotnet CLI tool need POSIX convention adherence?

Your dotnet CLI tool needs POSIX convention adherence to ensure predictable command-line argument parsing and option formatting. This guarantees compatibility with standard terminal behaviors and provides a familiar user experience.

When do I need dual-mode output formatting in a command-line interface?

You need dual-mode output formatting when your command-line interface serves both interactive users and automated scripts. It allows you to output human-readable text by default and structured JSON when invoked by other tools.