dotnet-cli-parsing

dotnet-cli-parsing is a skill for Claude Code, Codex from Arasz/ai-raccoon. It costs 18 tokens per session (5,100 once invoked), scanned A, original, MIT.

A guide for adding command-line argument parsing to a .NET console application or global .NET tool. Command-line arguments are options and values supplied when starting a program, such as --help or --port 8080.

In plain words
What is it for?
Use it when choosing and implementing an argument parser for a .NET command-line program.
Why use it?
It helps avoid treating command-line settings as unvalidated key-value data and provides a basis for handling options, help, and invalid input.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when choosing and implementing an argument parser for a .NET command-line program.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arasz/ai-raccoon/dotnet-cli-parsing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Arasz/ai-raccoon --skill dotnet-cli-parsing
Clone the repo
git clone --depth 1 https://github.com/Arasz/ai-raccoon

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dotnet-cli-parsing

README.md
[![agentmods](https://agentmods.dev/badge/skills/arasz/ai-raccoon/dotnet-cli-parsing/github.svg)](https://agentmods.dev/skills/arasz/ai-raccoon/dotnet-cli-parsing)
Your own site
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/dotnet-cli-parsing"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/dotnet-cli-parsing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dotnet-cli-parsing

Your own site · 80×15
<a href="https://agentmods.dev/skills/arasz/ai-raccoon/dotnet-cli-parsing"><img src="https://agentmods.dev/badge/skills/arasz/ai-raccoon/dotnet-cli-parsing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,100 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.05100
Opus 5.5 $0.00007 $0.02040
Sonnet 5.5 $0.00004 $0.01020
Haiku 4.5 $0.00002 $0.00510

Measured yesterday against content hash ab61d147421d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dotnet-cli-parsing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

## Research technique: primary-source facts via curl
.ai-badger/skills/learned/uncategorized/dotnet-cli-parsing/SKILL.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

.NET CLI argument parsing

Choosing and implementing CLI args for .NET console apps and global dotnet tools (PackAsTool). State verified 2026-08-04 against primary sources; full worked example: ai-raccoon MCP server — docs/work/2026-08-04-cli-args-exploration.md, docs/plans/cli-args-parsing.md in the ai-raccoon repo.

Parser landscape (as of 2026-08)

Option Status Verdict
System.CommandLine 2.0.x GA Nov 2025, 2.0.10 current, MIT, net8.0 asset (zero deps), used by dotnet CLI, trim-friendly default choice for flat option sets
Spectre.Console.Cli 0.55.0 stable, still 1.0.0-alpha; very active good, but a command framework (DI, nested commands) — overkill for ~10 flat options
Microsoft.Extensions.Configuration.CommandLine + EnvironmentVariables ship in the ASP.NET Core shared framework (zero new packages); CreateBuilder(args) already layers CLI > env > appsettings key-value ONLY — not a parser: unknown --keys silently stored, no --help/validation, trailing valueless --key dropped, --key --other consumes next token as value
Cocona archived 2024 do not adopt
McMaster.Extensions.CommandLineUtils maintained, minimal third-party, thinner than the official parser
hand-rolled — rejected wherever 'official NuGet over hand-rolled' applies

Maintaining an existing Cocona tool (verified 2026-08-05, dotnet-ignore)

Cocona is archived — don't adopt it for new work — but tools already built on it need these behaviors (Cocona 2.2.0, observed on a real CLI):

  • Exceptions escaping a command handler do NOT propagate to your code: Cocona's internal HandleExceptionAndExitMiddleware catches them, prints the FULL exception (ex.ToString(), stack trace included) to stderr, and returns exit code 1. A try/catch around consoleApp.Run() in Program.cs never fires — it is dead code.
  • Setting Environment.ExitCode inside a handler is clobbered: the dispatcher writes the exit code from the handler result (0 on success).
  • Working pattern for clean errors + exit codes: make the handler lambdas return Task<int> — Cocona uses an int-returning handler's value as the process exit code. Wrap each command: static async Task<int> RunAndReportErrors(Func<Task> action) { try { await action(); return 0; } catch (Exception ex) { Console.Error.WriteLine($"Error: {ex.Message}"); return 1; } }.
  • CoconaAppOptions (2.2.0) has NO exception-handler hook (verified by reflection) — no built-in message-only error mode; the wrapper above is the way.

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 293 lines · 18 tokens per session scan A ab61d147421d

Subscribe to this mod's changes

dotnet-cli-parsing is a skill published in the GitHub repository Arasz/ai-raccoon (7 stars, last pushed today), licensed MIT. It adds 18 tokens to every session and 5,100 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-05.

Related

dotnet-cli-parsing compared with skills from other repositories

dotnet-cli-parsing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dotnet-cli-parsingArasz/ai-raccoonSkill7todayMITA18Claude Code, Codex
http-client-migrationGen-Verse/PAST-BenchSkill404mo agoApache-2.0A14Claude Code, Codex
dotnet-pinvokerootcastleco/rei-skillsSkill115d agononeA119Claude Code, Codex
azure-eventgrid-dotnetrootcastleco/rei-skillsSkill115d agononeA80Claude Code, Codex
directory-build-organizationrootcastleco/rei-skillsSkill115d agononeA142Claude Code, Codex
avalonia-viewmodels-zafirorootcastleco/rei-skillsSkill115d agononeA26Claude Code, Codex
Cursor rules for Aspnet AbpAmariahAK/atlarix-skillsSkill02mo agoApache-2.0A7Claude Code, Codex