Skip to content
Back to skills

Exec Csharp

ASecurity

C#/.NET execution idioms to embed into Codex prompts when the target project is C# — nullable reference types, async correctness, and .NET conventions.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
ai-agentsc#express

Security analysis

A100/100

Scanned November 20, 2026

npx -y skills add anhnguyen0905/codex-mcp --skill exec-csharp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Exec Csharp?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Exec Csharp
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anhnguyen0905-exec-csharp/badge)](https://www.skillsdirectory.com/skills/anhnguyen0905-exec-csharp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: exec-csharp
description: C#/.NET execution idioms to embed into Codex prompts when the target project is C# — nullable reference types, async correctness, and .NET conventions.
---

# C# / .NET Idioms (embed when project is C#)

```
C#/.NET standards:
- Nullable reference types: honor the project's <Nullable> setting; no ! null-forgiving to silence
  warnings — narrow or guard instead. Validate args with ArgumentNullException.ThrowIfNull at boundaries.
- Async: async all the way — no .Result/.Wait()/.GetAwaiter().GetResult() (deadlock risk); pass and
  honor CancellationToken through call chains; ConfigureAwait(false) in library code; return Task,
  never async void except event handlers.
- Errors: throw specific exceptions with context; catch the narrowest type you can handle; never
  swallow; use try/finally or using/await using for IDisposable/IAsyncDisposable resources.
- Immutability: prefer records and init-only setters for DTOs; expose IReadOnlyList/IReadOnlyDictionary,
  not mutable collections; readonly fields where possible.
- Idioms: LINQ over manual loops when clearer; pattern matching and switch expressions; string
  interpolation over concatenation; var when the type is obvious. Dispose enumerators/streams.
- DI & config: constructor injection via the built-in container; bind config with IOptions<T>; no
  service-locator or static state for dependencies. Follow the project's layering.
- Follow .editorconfig / analyzers already configured; match namespace and folder structure.
- Tests: the repo's framework (xUnit/NUnit/MSTest) + assertion lib (FluentAssertions if present);
  Arrange-Act-Assert; descriptive Method_Scenario_Expected names consistent with existing tests.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.