شعار Sota Dotnet

Sota Dotnet

المجتمع
martinholovsky
sota-dotnet

State-of-the-art C# / .NET engineering rules (.NET LTS releases, modern C#) that Claude applies when writing or auditing .NET code. Covers modern idioms (records, nullable reference types, pattern matching, spans, file-scoped namespaces), API/null/immutability/`IDisposable` design, async/await & concurrency (ConfigureAwait, channels, cancellation, TPL), security (OWASP .NET, deserialization — BinaryFormatter removed in .NET 9, EF/Dapper SQL injection, ASP.NET Core auth, Data Protection, crypto), performance (GC, Span and Memory, BenchmarkDotNet, Native AOT), and build/tooling/CI (dotnet CLI, NuGet lockfiles & supply chain, Roslyn analyzers, nullable). Trigger keywords - C#, .NET, dotnet, ASP.NET Core, async, await, Task, record, nullable reference types, Span, EF Core, Dapper, LINQ, NuGet, Roslyn analyzer, BinaryFormatter, Native AOT, BenchmarkDotNet, IDisposable, ConfigureAwait. Use for BOTH building .NET services/libraries and auditing them.

نظرة عامة

الناشرmartinholovsky
المستودعSOTA-skills
اسم المهارةsota-dotnet
النجوم
28
التفريعات
3
الملفات المرفقة
6
الترخيصCC-BY-4.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 6

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها martinholovsky على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Sota Dotnet في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-dotnet
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/martinholovsky/SOTA-skills.git /tmp/SOTA-skills
mkdir -p .claude/skills
cp -r /tmp/SOTA-skills/skills/sota-dotnet .claude/skills/sota-dotnet
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Sota Dotnet في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Sota Dotnet تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Sota Dotnet بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

SOTA C# / .NET (2026)

Expert-level rules for producing and auditing production .NET. The runtime is memory-safe, so risk concentrates in injection, deserialization, async correctness, and dependency supply chain. Written for .NET 10 LTS (released Nov 2025, supported to Nov 2028) and C# 14 (records, nullable reference types, pattern matching, spans, extension members, the field keyword) — flag where a control needs a specific version. Every rule states the why; every rules file ends with an audit checklist of grep/analyzer patterns.

Purpose

Two consumers, one source of truth:

  • BUILD mode — generating C#/.NET: follow the rules as defaults. Enable nullable reference types and treat analyzer warnings as errors; prefer immutability and the async-all-the-way model. Deviate only with a comment.
  • AUDIT mode — reviewing existing code: hunt violations with the audit checklists, classify by severity, report in the finding format below. SQL string-building and legacy deserialization are presumed exploitable.

BUILD mode

  1. Before writing, read the rules files relevant to the task (see index). A web API touching untrusted input + a DB + async needs 02, 03, 04; a parser of untrusted bytes also gets a fuzz target (rules/06 §4).
  2. Apply the top-10 non-negotiables (below) unconditionally.
  3. New projects: target the latest LTS TFM (verify at the .NET support policy page), <Nullable>enable</Nullable>, <TreatWarningsAsErrors>true</TreatWarningsAsErrors>, <AnalysisLevel>latest-Recommended</AnalysisLevel> plus <AnalysisModeSecurity>All</AnalysisModeSecurity> (Recommended alone leaves most security CA rules off — rules/06 §2), NuGet lockfile + RestoreLockedMode in CI, and dotnet format from day one (rules/06).
  4. Async all the way down — never block on async (.Result/.Wait()/ GetAwaiter().GetResult()) (rules/03). Use CancellationToken end to end.
  5. Prefer the BCL and well-known libraries; parameterize all data access; use the framework's auth/Data Protection rather than rolling your own (rules/04).
  6. When you take a sharp path (reflection, unsafe, DynamicMethod, suppressing a nullable/analyzer warning), leave a // NOTE(sota): explaining why.

AUDIT mode

Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.

Work each relevant rules file's audit checklist against the target. Run the greps and the Roslyn analyzers (incl. the security CA rules); confirm hits manually. Check the dependency tree against known-CVE databases.

Severity conventions

SeverityMeaningExamples
CRITICALExploitable on reachable inputSQL via string interpolation/concat into FromSqlRaw/ExecuteSqlRaw/Dapper, BinaryFormatter/NetDataContractSerializer/LosFormatter or JSON TypeNameHandling.All on untrusted data, command injection, deserialization gadget
HIGHLikely incident or security weaknessMissing auth on an endpoint, disabled cert validation (ServerCertificateCustomValidationCallback => true), MD5/SHA-1 or DES/ECB for security, Random for tokens, blocking on async causing deadlock/thread-pool starvation, secrets in config/source
MEDIUMCorrectness/maintainability hazardasync void (non-handler), missing ConfigureAwait(false) in a library, IDisposable not disposed / no using, nullable warnings suppressed with !, swallowed exceptions, mutable static state
LOWIdiom/perf debtSync-over-collection LINQ on hot path, needless allocations/boxing, class where a record/struct fits, not using Span/pooling on hot path
INFOStyle/doc/hygieneformatting, naming, missing XML docs, nullable annotations absent (not enabled)

Finding format

Expands the router's canonical row (file:line | rule | severity | effort | fix, which wins on a cross-domain roll-up); evidence block and report order: sota rules/03 §2 and §5.

[SEVERITY] File.cs:LINE — short title
  Rule: rules/NN-name.md § section
  Evidence: the offending line(s), verbatim
  Impact: one sentence — what executes/leaks/deadlocks, under what input
  Fix: concrete replacement code or action
  Effort: trivial | small | medium | large

Group findings by severity, CRITICAL first. End with: counts per severity, the three highest-leverage fixes, and which checklists/analyzers were run.

Rules index

FileRead this when...
rules/01-idioms.mdWriting/reviewing any C#: records & record struct, nullable reference types, pattern matching/switch expressions, spans, LINQ discipline, var, expression vs statement, file-scoped namespaces, error handling, modern C# 12–14 features, undefined enum values from input (Enum.IsDefined)
rules/02-design-api.mdDesigning types/APIs: nullable reference type discipline, int? over a magic int and using TryParse's bool (its out is 0 on failure), immutability, IDisposable/IAsyncDisposable and using, exceptions, value vs reference types, internal/visibility, DI (the built-in container), options pattern, UseExceptionHandler first in the pipeline; ASP.NET Core rate limiting and request limits (AddRateLimiter/UseRateLimiter after authentication, RequireRateLimiting/[EnableRateLimiting], per-caller partitions, 503 default rejection, auth endpoints; Kestrel MaxRequestBodySize, FormOptions, MaxConcurrentConnections defaults); a compiled worked minimal-API example; failures that end the process (an uncatchable StackOverflowException) and parser depth (MaxDepth, Newtonsoft below 13.0.1)
rules/03-async-concurrency.mdAnything async/Task/threads: async-all-the-way, never block (.Result/.Wait()), ConfigureAwait(false) in libraries, CancellationToken flow, async void, Channel<T>, IAsyncEnumerable, TPL/Parallel, thread-safety, ValueTask, injected TimeProvider/FakeTimeProvider for testable time, System.Threading.Lock (.NET 9+, CS9216)
rules/04-security.mdAny input crossing a trust boundary: SQL (EF Core/Dapper parameterization), legacy serializers (BinaryFormatter removed .NET 9 — and its opt-back-in package) + JSON TypeNameHandling + DataSet.ReadXml, command/path injection (Path.Combine dropping the root, Zip Slip, regex timeouts, \z not $ for whole-input anchoring), SSRF (address check in SocketsHttpHandler.ConnectCallback, lenient IPAddress.TryParse, redirects on by default, proxy blinds the callback), ASP.NET Core authn/authz, antiforgery/CORS, Data Protection, crypto (RandomNumberGenerator, AES-GCM, Pbkdf2 over the legacy Rfc2898DeriveBytes ctor, no hard-coded TLS version), secrets; OWASP .NET; default-deny FallbackPolicy; JsonSerializerOptions.Strict; SqlQueryRaw; escape hatches into raw memory: unsafe code and P/Invoke; ASP.NET Core defaults that fail open — attribute-less cookies, open redirect, Html.Raw/MarkupString, verb-less actions that skip antiforgery, JWT validation switched off, forwarded headers that trust any peer; XML consumers (XPathDocument, XSLT) that inherit an unsafe reader; a shared Data Protection key ring; SPKI pinning on top of chain validation; legacy System.Web config (request/event validation off, the web.config chain and allowOverride)
rules/05-performance.mdLatency/throughput/memory work: GC (gen/SOH/LOH, server vs workstation, DATAS on by default with Server GC), allocation reduction, Span<T>/Memory<T>/ArrayPool, struct/record struct, BenchmarkDotNet, async overhead, Native AOT / trimming, string handling
rules/06-build-tooling-ci.mdSetting up or auditing build/CI: SDK/TFM targeting (and whether it is past end of support), Directory.Build.props, nullable + warnings-as-errors, Roslyn analyzers (incl. security CA rules — off by default, opted in with AnalysisModeSecurity), dotnet format, NuGet lockfiles + supply chain (lock mode, source mapping, signed packages, strong name vs publisher signature, CVE scan, package code that runs at build — build/*.targets, analyzers, ExcludeAssets), vetting a new dependency and the insecure defaults of what you consume, SBOM, runtime/framework patch level (Kestrel CVE-2025-55315, incl. the 2.3.x Kestrel.Core package), signatureValidationMode=require (measured enforced on Linux; bypassed by a warm package cache and DOTNET_NUGET_SIGNATURE_VERIFICATION=false; config file name matched case-insensitively). Test strategy lives in sota-testing; this owns .NET build/test mechanics (xUnit/NUnit, Testcontainers). Also: suppressions that name a rule and a reason (IDE0079 is IDE-only, so no CLI gate), exempting tests by project (IsTestProject in Directory.Build.targets) or .editorconfig path, the implicit unlocked restore (RestoreLockedMode; --locked-mode with no lock file passes), build-time SBOM for AOT/single-file, ASan on the P/Invoke native side.

Top-10 non-negotiables

  1. No string-built SQL. Parameterize: EF Core LINQ or parameters (FromSql/interpolated FromSql, never FromSqlRaw/ExecuteSqlRaw with concatenation); Dapper with parameters. Interpolated/concatenated SQL is CRITICAL. (rules/04)
  2. No unsafe deserialization. BinaryFormatter is removed in .NET 9+ (throws); never reintroduce it or NetDataContractSerializer/LosFormatter/SoapFormatter, and never use Json.NET TypeNameHandling.Auto/All or JsonSerializer with an unrestricted type resolver on untrusted data. Use System.Text.Json with known types. (rules/04)
  3. Async all the way; never block on async. No .Result, .Wait(), .GetAwaiter().GetResult() on a hot/request path (deadlock + thread-pool starvation). async void only for event handlers. (rules/03)
  4. Flow CancellationToken end to end through async APIs and honor it. (rules/03)
  5. ConfigureAwait(false) in library code (code with no sync context that doesn't need to resume on the original context). (rules/03)
  6. Nullable reference types enabled and honored. <Nullable>enable</Nullable>; don't paper over warnings with the null-forgiving !. (rules/01, rules/02)
  7. Deterministic disposal. Everything IDisposable/IAsyncDisposable is in a using/await using or owned by a DI-managed lifetime — HttpClient via IHttpClientFactory, not new-per-call. (rules/02)
  8. Crypto uses the right primitives. RandomNumberGenerator (never Random) for tokens/keys/IVs; AES-GCM (not ECB); no MD5/SHA-1 for security; ASP.NET Core Data Protection for at-rest tokens; never disable TLS cert validation. (rules/04)
  9. AuthN/AuthZ enforced server-side on every non-public endpoint ([Authorize]/policies/endpoint auth), antiforgery for cookie-auth POSTs, CORS locked to known origins. (rules/04)
  10. Analyzers + nullable + lockfile gate CI. TreatWarningsAsErrors, Roslyn analyzers (security CA rules explicitly opted in — AnalysisModeSecurity), dotnet format --verify-no-changes, NuGet locked-mode restore + CVE scan. (rules/06)

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Sota Dotnet؟

State-of-the-art C# / .NET engineering rules (.NET LTS releases, modern C#) that Claude applies when writing or auditing .NET code. Covers modern idioms (records, nullable reference types, pattern matching, spans, file-scoped namespaces), API/null/immutability/`IDisposable` design, async/await & concurrency (ConfigureAwait, channels, cancellation, TPL), security (OWASP .NET, deserialization — BinaryFormatter removed in .NET 9, EF/Dapper SQL injection, ASP.NET Core auth, Data Protection, crypto), performance (GC, Span and Memory, BenchmarkDotNet, Native AOT), and build/tooling/CI (dotnet CLI...

لماذا تستخدم Sota Dotnet على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Sota Dotnet عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Sota Dotnet في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-dotnet. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Sota Dotnet؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Sota Dotnet؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Sota Dotnet معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Sota Dotnet مجانية؟

نعم. نشرها martinholovsky على GitHub بموجب ترخيص CC-BY-4.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇