— No reviews yet
0 installs
13 views
0.0% view→install
Install
$ agentstack add skill-ngxtm-devkit-language ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of C# Language Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
C# Language Patterns
Priority: P0 (CRITICAL)
Modern C# standards for type-safe, performant, maintainable code.
Implementation Guidelines
- Nullable Reference Types: Enable
enable. Use?for nullable, avoid!except when compiler can't infer. - Records:
recordfor immutable DTOs,record structfor stack-allocated value types. - Pattern Matching:
ispatterns,switchexpressions, property/positional patterns. - Async/Await: Always use
CancellationToken.ValueTaskfor hot paths.ConfigureAwait(false)in libraries. - LINQ: Prefer method syntax. Avoid multiple enumerations (
ToList()once). UseAsNoTracking()for read-only EF queries. - Generics: Constraints (
where T : class, new()), covariance (out T), contravariance (in T). - Spans:
Span,ReadOnlySpanfor zero-allocation slicing. - Primary Constructors: C# 12+
class Foo(int x)for concise DI. - Collection Expressions: C# 12+
[1, 2, 3]syntax. - Raw String Literals:
"""multi-line"""for SQL, JSON templates.
Anti-Patterns
- No
async void: Useasync Task. Exception: event handlers. - No
Task.Result/.Wait(): Deadlock risk. Alwaysawait. - No
DateTime.Now: UseDateTimeOffset.UtcNowfor timezone safety. - No string concat in loops: Use
StringBuilderorstring.Join. - No
!abuse: Prefer null checks or??over null-forgiving.
Code
// Record with primary constructor
public record UserDto(string Name, string Email);
// Pattern matching with switch expression
string GetStatus(Order order) => order switch
{
{ Status: OrderStatus.Pending } => "Waiting",
{ Status: OrderStatus.Shipped, TrackingNumber: not null } => "In Transit",
{ IsCancelled: true } => "Cancelled",
_ => "Unknown"
};
// Async with cancellation token
async Task GetUserAsync(int id, CancellationToken ct = default)
{
return await _db.Users
.AsNoTracking()
.FirstOrDefaultAsync(u => u.Id == id, ct);
}
// Span for zero-allocation parsing
ReadOnlySpan GetFirstWord(ReadOnlySpan text)
{
int idx = text.IndexOf(' ');
return idx logger)
{
public async Task GetAsync(int id) => await repo.GetByIdAsync(id);
}
Reference & Examples
For advanced patterns, spans, and nullable annotations: See [references/REFERENCE.md](references/REFERENCE.md).
Related Topics
best-practices | security | tooling
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ngxtm
- Source: ngxtm/devkit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.