What problem does it solve?
Building a consistent, well-structured command-line interface in .NET requires many architectural decisions: command hierarchies, option validation, dependency injection, and naming conventions. This Skill enforces proven patterns for System.CommandLine v2.x so every command follows the same structure without repeated design work.
Core Features & Use Cases
- Command Architecture Patterns: Provides rules for command base classes, command groups with subcommands, and registration in RootCommand.
- Options, Arguments & Validation: Covers defining options and arguments, global recursive options, and validator-based input checking that fails before handlers run.
- DI-Based Handler Design: Enforces thin handlers that delegate business logic to injected service interfaces registered in Program.cs.
- Use Case: When asked to add a new verb like
agent create to an existing .NET CLI, the Skill produces an internal command class with kebab-case naming, described options, an async SetAction handler, and proper registration in the parent command.
Quick Start
Add a new subcommand called 'list' to the config command group in my System.CommandLine project following the established conventions.