AgentStack
SKILL verified MIT Self-run

Csharp Style

skill-nice3point-revit-skills-csharp-style · by Nice3point

>

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-nice3point-revit-skills-csharp-style

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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 Csharp Style? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

C# Style

Naming and layout

  • Give every identifier its full domain meaning; never use a single-character or abbreviated name.
  • Suffix a method returning Task or Task with Async.
  • Use file-scoped namespaces.
  • Order members: private fields, constructor, public properties, public methods, private methods.

Language features

  • Use the newest language feature that makes intent clearer without hiding control flow or allocation.
  • Use is null / is not null for null checks; never the empty property pattern is { } as a null check.
  • Combine predicates over one expression with and/or/not patterns; parenthesize when precedence is not obvious.
  • Use collection expressions ([…]) for clear collection literals.

Nullability and annotations

  • Enable nullable reference types; keep public and internal contracts null-safe.
  • Express real, IDE- or compiler-visible contracts with annotations from the JetBrains and System.Diagnostics.CodeAnalysis sets — both are large, so reach for whichever fits rather than a fixed few.
  • Apply [Pure] to side-effect-free members and [NotNullWhen] to Try-style methods with an out result as a habit; add the rest ([PublicAPI], [MustUseReturnValue], [MemberNotNull], [DoesNotReturnIf], [StringSyntax], …) wherever their exact condition holds.

Asynchronous code

  • Use Task/Task; reserve async void for a framework-required event handler.
  • Flow CancellationToken through I/O, broker, storage, and long-running work.
  • Never block an async flow with .Result, .Wait(), or synchronous sleeps.

Data contracts

  • Use record for DTOs, message contracts, and configuration-style data.
  • Use init properties unless a caller must mutate after construction.
  • Keep a contract stable and explicit once another process or service depends on it.

Error handling

  • Validate untrusted input at a public boundary.
  • Prefer a semantic exception over a generic Exception.
  • Catch only at a boundary that can add context, clean up, or choose recovery — never a broad catch with no recovery.

Performance

  • Measure a hot path before micro-optimizing.
  • Remove repeated parsing, allocation, and intermediate collections before reaching for a lower-level primitive.
  • Use Span/ReadOnlySpan only when it materially removes copying without obscuring ownership.
  • Keep expensive work out of constructors and deserialization paths; dispose owned streams and pooled resources in their owner scope.

Review

  • [ ] Identifiers carry full domain meaning; async methods end in Async.
  • [ ] Nullability is explicit and annotations match real contracts.
  • [ ] Async paths flow CancellationToken and never block.
  • [ ] Shared data contracts are immutable record types.
  • [ ] Exceptions are semantic and caught only where recovery or context is added.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.