MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

System-Commandline-Cli

System-Commandline-Cli is an design AI skill with a core value of Use this skill when adding, modifying, or reviewing CLI commands in a . It helps developers solve real-world problems in the design domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Use this skill when adding, modifying, or reviewing CLI commands in a .NET project built with System.CommandLine. Triggers include: creating a new CLI command, adding options or arguments, wiring comm

Last verified on: 2026-10-06

Quick Facts

Category design
Works With GitHub Copilot, Claude
Source github/awesome-copilot
Stars ⭐ 34.1k
Last Verified 2026-10-06
Risk Level Low
mkdir -p ./skills/system-commandline-cli && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/system-commandline-cli/SKILL.md -o ./skills/system-commandline-cli/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# System.CommandLine CLI Developer Skill


You are working on a .NET CLI application built with **System.CommandLine v2.x.x**, targeting **.NET 8 or later** or any **.NET Standard 2.0** implementation, including **.NET Framework 4.6.1 or later** and **.NET Core 2.0 or later**.

Follow these rules and patterns strictly when creating or modifying CLI commands.


---


Architecture Overview


text
<CLI Project>/
├── Program.cs                       # Entry point and command invocation
└── Commands/
    ├── CommandBase.cs               # Base class for all commands
    ├── GlobalOptions.cs             # Defines global options for the CLI
    ├── RootCommand.cs               # Registers top-level commands
    └── <Group>/                     # One folder per command group
        ├── <Group>Command.cs        # Parent command that registers its children
        └── <Group><Verb>Command.cs  # Leaf command with its handler


---


RULE 1 — Prefer a Project-Specific Command Base Class


Prefer defining a project-specific abstract `CommandBase` that inherits from `System.CommandLine.Command`. Concrete commands should inherit from this base class so shared behavior and conventions remain centralized.


csharp
internal abstract class CommandBase : Command
{
    protected CommandBase(string name, string? description = null)
        : base(name, description)
    {
    }
}

internal sealed class MyCommand : CommandBase
{
    public MyCommand()
        : base("command-name", "Help text shown in --help")
    {
        this.SetAction(CommandHandler);
    }

    private async Task<int> CommandHandler(
        ParseResult parseResult,
        CancellationToken cancellationToken)
    {
        // implementation
        return 0;
    }
}

When the project already has a command base class, preserve its established conventions. Otherwise, introduce one when commands need shared behavior; simple applications may inherit from `Command` directly when a base class adds no meaningful value.


---


RULE 2 — Options and Arguments


Defining Options


csharp
private readonly Option<string> _myOption;

// In constructor:
_myOption = new Option<string>("--my-option")
{
    Description = "Clear description of what this option does",
    Required = true,   // or false
};
_myOption.Aliases.Add("-m");       // Add a short alias
this.Options.Add(_myOption);

Defining Arguments (positional)


csharp
private readonly Argument<string> _fileArgument;

// In constructor:
_fileArgument = new Argument<string>("file")
{
    Description = "Path to the input file"
};
this.Arguments.Add(_fileArgument);

Reading Values in Handlers


csharp
// Required option/argument — use GetValue:
var value = parseResult.GetValue(_myOption);

---


RULE 3 — Command Handler Pattern


Handlers are **async methods** wired via `SetAction`:


csharp
this.SetAction(CommandHandler);

private async Task<int> CommandHandler(ParseResult parseResult, CancellationToken cancellationToken)
{
    // 1. Read option/argument values
    // 2. Load session settings (if needed)
    // 3. Validate configuration early — fail fast with clear error
    // 4. Execute business logic
    // 5. Output results with Console

    return 0; // or non-zero exit code
}

---


RULE 4 — Command Group (Parent with Subcommands)


A **group command** registers children but does **not** call `SetAction`:


csharp
internal class MyGroupCommand : CommandBase
{
    public MyGroupCommand()
        : base("mygroup", "Manages my-group resources")
    {
        this.Subcommands.Add(new MyGroupListCommand());
        this.Subcommands.Add(new MyGroupCreateCommand());
        this.Subcommands.Add(new MyGroupDeleteCommand());
    }
}

A command may define both an action and subcommands when the direct invocation has meaningful behavior.


---


RULE 5 — Registration


- **Top-level commands** → register in `RootCommand.cs`:

```csharp

this.Subcommands.Add(new MyGroupCommand());

```


-

🎯 Best For

  • Engineering teams doing code reviews
  • Open source maintainers
  • UI designers
  • Product designers
  • GitHub Copilot users

💡 Use Cases

  • Reviewing pull requests for security vulnerabilities
  • Checking code style consistency
  • Generating component mockups
  • Creating design system tokens

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open GitHub Copilot or Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply System-Commandline-Cli to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this skill check for OWASP Top 10?

Security-focused review skills often include OWASP checks. Check the skill content for specific vulnerability categories covered.

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Does System-Commandline-Cli generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install System-Commandline-Cli?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/system-commandline-cli/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Blindly accepting AI suggestions

Always verify AI-generated review comments. Some suggestions may not apply to your specific codebase conventions.

Skipping usability testing

AI-generated designs should be validated with real users before development.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills