csharp

csharp is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 30 tokens per session (789 once invoked), scanned A, original, MIT.

A C# and .NET programming guide covering ASP.NET Core web APIs, asynchronous code, LINQ, and Entity Framework, a tool for working with databases.

In plain words
What is it for?
Use it for .cs files, web APIs, Unity games, desktop applications, and services that read or write database data.
Why use it?
It helps developers write current C# code with safer data handling, asynchronous operations, and common .NET application patterns.

Skill for Claude CodeCodex

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

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/g1joshi/agent-skills/csharp
Any agent
npx skills add G1Joshi/Agent-Skills --skill csharp
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-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 csharp

README.md
[![agentmods](https://agentmods.dev/badge/skills/g1joshi/agent-skills/csharp.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/csharp)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/csharp"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/csharp.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 789 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.1 $0.00030 $0.00789
Opus 5 $0.00015 $0.00394
Sonnet 5 $0.00006 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 2d ago against content hash 2a2db29cc32e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

csharp 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 2d 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/languages/csharp/SKILL.md · 149 lines

How it starts

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

C#

Modern C# development with .NET 8+, async patterns, and Entity Framework.

When to Use

  • Working with .cs files
  • Building ASP.NET Core web APIs
  • Unity game development
  • Desktop apps with WPF/MAUI

Quick Start

public record User(string Id, string Name, string Email);

public class UserService
{
    public async Task<User?> GetUserAsync(string id)
    {
        return await _repository.FindByIdAsync(id);
    }
}

Core Concepts

Records & Nullable

// Records for immutable data
public record User(string Id, string Name, string Email)
{
    public string DisplayName => Name.ToUpperInvariant();
}

// With-expressions for copies
var updated = user with { Name = "New Name" };

// Nullable reference types
public User? FindUser(string id)
{
    return users.FirstOrDefault(u => u.Id == id);
}

Async/Await

public async Task<List<User>> GetUsersAsync()
{
    // Parallel async operations
    var tasks = ids.Select(id => GetUserAsync(id));
    var users = await Task.WhenAll(tasks);
    return users.ToList();
}

// Async streams
public async IAsyncEnumerable<User> StreamUsersAsync()
{
    await foreach (var user in _repository.GetAllAsync())
    {
        yield return user;
    }
}

// Cancellation
public async Task<User> GetUserAsync(string id, CancellationToken ct)
{
    return await _client.GetFromJsonAsync<User>($"/users/{id}", ct);
}

Common Patterns

LINQ

// Query syntax
var adults = from user in users
             where user.Age >= 18
             orderby user.Name
             select user;

// Method syntax (preferred)
var result = users
    .Where(u => u.IsActive)
    .OrderBy(u => u.Name)
    .Select(u => new UserDto(u.Id, u.Name))
    .ToList();

// Grouping
var byCountry = users
    .GroupBy(u => u.Country)
    .ToDictionary(g => g.Key, g => g.ToList());

Pattern Matching

string GetStatus(object obj) => obj switch
{
    User { IsActive: true } => "Active user",
    User { IsActive: false } => "Inactive user",
    null => "No data",
    _ => "Unknown"
};

// List patterns
if (numbers is [var first, _, var last])
{
    Console.WriteLine($"First: {first}, Last: {last}");
}

Read the full file on GitHub · 149 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. 2d ago First seen · 149 lines · 30 tokens per session scan A 2a2db29cc32e

Subscribe to this mod's changes

csharp is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 6mo ago), licensed MIT. It adds 30 tokens to every session and 789 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

unity-csharp-architecture-and-ecs

Architectural patterns, Data-Oriented Technology Stack (DOTS), Unity ECS, Burst Compiler, C# Job System, memory management, zero-allocation C# patterns, and frame-budget optimization for high-performance Unity game development.

hamzabellouch/agent-skills · 54 tokens

dotnet-maui-wpf-desktop

Production architectural patterns, MVVM clean architecture, async thread synchronization, high-performance UI rendering, native interop, and memory optimization for enterprise Windows and cross-platform desktop applications using WPF, .NET MAUI, and Windows App SDK.

hamzabellouch/agent-skills · 56 tokens

dotnet-framework-4.8-expert

Expert .NET Framework 4.8 specialist mastering legacy enterprise applications. Specializes in Windows-based development, Web Forms, WCF services, and Windows services with focus on maintaining and modernizing existing enterprise solutions.

saeed-vayghan/gemini-agent-skills · 52 tokens

csharp-developer

Expert C# developer specializing in modern .NET development, ASP.NET Core, and cloud-native applications. Masters C# 12 features, Blazor, and cross-platform development with emphasis on performance and clean architecture.

saeed-vayghan/gemini-agent-skills · 47 tokens

dotnet-core-expert

Expert .NET Core specialist mastering .NET 10 with modern C# features. Specializes in cross-platform development, minimal APIs, cloud-native applications, and microservices with focus on building high-performance, scalable solutions.

saeed-vayghan/gemini-agent-skills · 49 tokens

azure-ai-agents-persistent-dotnet

Azure AI Agents Persistent SDK for .NET. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools.

sickn33/agentic-awesome-skills · 37 tokens