add-options-class

add-options-class is a skill for Claude Code, Codex from fpindej/netrock. It costs 9 tokens per session (283 once invoked), scanned A, original, MIT.

A .NET pattern for defining typed application settings with required fields and startup validation. It connects settings to appsettings.json and the app's dependency-injection system.

In plain words
What is it for?
Adding configuration for infrastructure or Web API features, documenting required production settings, and keeping configuration names and validation rules in one place.
Why use it?
It catches missing or invalid configuration when the application starts instead of allowing configuration errors to appear later.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fpindej/netrock/add-options-class
Any agent
npx skills add fpindej/netrock --skill add-options-class
Clone the repo
git clone --depth 1 https://github.com/fpindej/netrock

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 add-options-class

README.md
[![agentmods](https://agentmods.dev/badge/skills/fpindej/netrock/add-options-class.svg)](https://agentmods.dev/skills/fpindej/netrock/add-options-class)
Your own site
<a href="https://agentmods.dev/skills/fpindej/netrock/add-options-class"><img src="https://agentmods.dev/badge/skills/fpindej/netrock/add-options-class.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 283 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00009 $0.00283
Opus 5 $0.00005 $0.00142
Sonnet 5 $0.00002 $0.00057
Haiku 4.5 $0.00001 $0.00028

Measured 5d ago against content hash d9a5b6f8828c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-options-class scanned grade A with 0 findings 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 5d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-options-class/SKILL.md · 38 lines

What it actually says

Adds a typed options/configuration class.

Steps

  1. Create in the appropriate layer:
    • Infrastructure: src/backend/MyProject.Infrastructure/{Area}/Options/{Name}Options.cs
    • WebApi: src/backend/MyProject.WebApi/Options/{Name}Options.cs
  2. Structure:
    /// <summary>
    /// Configuration for {area}. Maps to "{SectionName}" in appsettings.json.
    /// </summary>
    public sealed class {Name}Options
    {
        public const string SectionName = "{Section}";
    
        /// <summary>
        /// Gets or sets the ...
        /// </summary>
        [Required]
        public string Value { get; init; } = string.Empty;
    }
    
  3. Add section to appsettings.json (and appsettings.Development.json if dev differs - dev/test appsettings excluded from production publish via StripDevConfig)
  4. Register in DI extension:
    services.AddOptions<{Name}Options>()
        .BindConfiguration({Name}Options.SectionName)
        .ValidateDataAnnotations()
        .ValidateOnStart();
    
  5. Update docs/before-you-ship.md if this is a must-configure production setting
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. 5d ago First seen · 38 lines · 9 tokens per session scan A d9a5b6f8828c

Subscribe to this mod's changes

add-options-class is a skill published in the GitHub repository fpindej/netrock (231 stars, last pushed 6d ago), licensed MIT. It adds 9 tokens to every session and 283 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.