← Browse

@aterdev/cli

A

Use for .NET command-line tool development with Spectre.Console/Spectre.Console.Cli, Microsoft.Extensions.Hosting, dependency injection, localized help text, command settings, aliases, examples, terminal output, exit codes, and stdio-safe command paths.

skillclaude

Install

agr install @aterdev/cli --target claude

Writes 1 file into .claude/skills/, pinned to git-15e89447.

  • .claude/skills/cli/SKILL.md

Document


name: cli description: "Use for .NET command-line tool development with Spectre.Console/Spectre.Console.Cli, Microsoft.Extensions.Hosting, dependency injection, localized help text, command settings, aliases, examples, terminal output, exit codes, and stdio-safe command paths."

CLI Development

Workflow

  1. Identify the command surface under src/Apps/CommandLine.
  2. Read command registration in src/Apps/CommandLine/Program.cs.
  3. Read the invoked service before changing command behavior.
  4. Keep command classes thin: parse settings, validate input, set context, call services, and format output.

Conventions

  • Inherit from AsyncCommand<TSettings> or AsyncCommand.
  • Put reusable behavior in CoreMod services, CodeGenerator, or Share instead of command classes.
  • Use CommandSolutionHelper.TrySetSolutionAsync when the command needs a current solution.
  • Use OutputHelper or AnsiConsole consistently with nearby commands.
  • Escape dynamic Spectre markup with Markup.Escape.
  • Return 0 for success and 1 for expected validation or operation failures.
  • Register new commands in DI and CommandApp.Configure, including aliases, examples, and localized descriptions.
  • Preserve raw MCP/stdio command paths. Do not add logos, logs, or human-readable output that can break protocol clients.

Localization And Tests

  • Add user-facing command text to both src/Share/Localizer.zh-CN.resx and src/Share/Localizer.en-US.resx.
  • Add focused tests under tests/StudioMod.Tests/Commands for command behavior, config output, or error handling.

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-15e8944740c42026-07-31