C# Patterns

C# Patterns is a skill for Claude Code, Codex from AmariahAK/atlarix-skills. It costs 3 tokens per session (322 once invoked), scanned A, original, Apache-2.0.

A guide for C# projects built with .NET, a platform for creating applications and services. It covers asynchronous code, application layers, dependency injection, exceptions, and tests.

In plain words
What is it for?
Use it when structuring .NET applications, wiring dependencies, handling external calls, writing asynchronous code, or testing C# services.
Why use it?
It helps avoid blocked server threads, missing cancellation, tangled business logic, and unclear error handling.

Skill for Claude CodeCodex

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

Good fit Use it when structuring .NET applications, wiring dependencies, handling external calls, writing asynchronous code, or testing C# services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amariahak/atlarix-skills/csharp
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 AmariahAK/atlarix-skills --skill csharp
Clone the repo
git clone --depth 1 https://github.com/AmariahAK/atlarix-skills

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 C# Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/amariahak/atlarix-skills/csharp/github.svg)](https://agentmods.dev/skills/amariahak/atlarix-skills/csharp)
Your own site
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/csharp"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/csharp/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 C# Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/amariahak/atlarix-skills/csharp"><img src="https://agentmods.dev/badge/skills/amariahak/atlarix-skills/csharp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 322 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00003 $0.00322
Opus 5.5 $0.00001 $0.00129
Sonnet 5.5 $0.00001 $0.00064
Haiku 4.5 $0.00000 $0.00032

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

Security

Grade A, and why

C# Patterns 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 2mo 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.

skills/csharp/SKILL.md · 52 lines

What it actually says

C# Patterns

When to use this skill

Use this skill when working in C# projects (.NET) and you want patterns for async correctness, clear layering, and safe dependency injection.

Core patterns

Async correctness

  • avoid .Result / .Wait()
  • propagate CancellationToken
  • set timeouts for external calls

Layering

  • controllers/handlers: request/response wiring only
  • services: business logic
  • repositories: persistence and queries

Exceptions

  • throw meaningful exceptions at boundaries
  • don’t catch and ignore
  • log with context (no secrets)

Testing

  • unit tests for pure logic
  • integration tests for DB/wiring

Atlarix tool notes

  • Explore: locate *.csproj and key entry points; inspect DI registrations.
  • Build: run dotnet test.
  • Debug: follow the first app frame in stack traces; check DI and config.
  • Review: check async/cancellation correctness and error handling.

Common mistakes to avoid

  • Blocking on async tasks
  • Missing cancellation tokens
  • Controllers that embed business logic

Mini-checklist

  • Async end-to-end
  • Layers separated
  • Tests cover critical behavior
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. 2mo ago First seen · 52 lines · 3 tokens per session scan A c9651805e905

Subscribe to this mod's changes

C# Patterns is a skill published in the GitHub repository AmariahAK/atlarix-skills (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 3 tokens to every session and 322 once invoked, about $0.0000 per session on Opus 5.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-09-03.

Related

C# Patterns compared with skills from other repositories

C# Patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
C# PatternsAmariahAK/atlarix-skillsSkill02mo agoApache-2.0A3Claude Code, Codex
csharp-expertpersonamanagmentlayer/pclSkill461mo agoApache-2.0A70Claude Code
add-sliceSSWConsulting/SSW.VerticalSliceArchitectureSkill4182d agoMITA125Claude Code
worker-servicesmanagedcode/dotnet-skillsSkill52716d agoMITA109Claude Code, Codex
aspnet-coremanagedcode/dotnet-skillsSkill52716d agoMITA122Claude Code, Codex
minimal-apismanagedcode/dotnet-skillsSkill52716d agoMITA105Claude Code, Codex
web-apimanagedcode/dotnet-skillsSkill52716d agoMITA115Claude Code, Codex