dotnet

سه مهارت کاربردی برای اجرای C#، اتصال امن به native library و انتشار NuGet

این bundle برای توسعه‌دهندگان .NET سه مسیر تخصصی را پوشش می‌دهد: اجرای برنامه‌های file-based با C# و .NET CLI، پیاده‌سازی و عیب‌یابی P/Invoke و LibraryImport برای اتصال به کتابخانه‌های C/C++، و راه‌اندازی trusted publishing برای انتشار امن NuGet با OIDC در GitHub Actions.

با این مهارت‌ها می‌توانید بدون ساخت پروژه کامل، ایده‌های C# را سریع آزمایش کنید، مرز managed/native را ایمن‌تر بسازید و کلیدهای دائمی NuGet را با توکن‌های کوتاه‌عمر جایگزین کنید.

چه چیزی می‌گیرید

  • اجرای برنامه‌های تک‌فایلی و چندفایلی C# با .NET CLI و directiveهایی مانند `#:include` و `#:ref`
  • طراحی و بازبینی declarationهای P/Invoke و LibraryImport، شامل string marshalling و مدیریت حافظه
  • الگوهای cross-platform برای SafeHandle و تشخیص crash، memory leak و corruption در interop
  • پیکربندی NuGet trusted publishing با OIDC در GitHub Actions، بدون API key دائمی
  • راهنمایی مرحله‌به‌مرحله برای ویرایش repository و workflowهای انتشار

برای چه کاری خوب است

  • توسعه‌دهندگان .NET که می‌خواهند ایده‌های C# را سریع و بدون ساخت project کامل آزمایش کنند
  • تیم‌هایی که باید یک کتابخانه C یا C++ را از داخل .NET فراخوانی و پایدارسازی کنند
  • maintainerهای packageهای NuGet که به انتشار keyless و امن در GitHub Actions نیاز دارند

برای چه کاری نیست

  • اسکریپت‌های عمومی و زبان‌مستقل، automation با Python یا PowerShell، یا پروژه‌های کامل .NET
  • COM interop، C++/CLI یا کدی که هیچ وابستگی native ندارد
  • انتشار به private feedها یا Azure Artifacts؛ trusted publishing این bundle برای nuget.org است

دربارهٔ این اسکیل

Install This Skill

CLIManual

/plugin marketplace add dotnet/skills
/plugin install dotnet@dotnet-agent-skills
# This entry installs as a plugin, so there is no single SKILL.md to download.
open https://github.com/dotnet/skills/tree/main/plugins/dotnet

Get new skills in your inbox. What we added, what we rejected, and why. See a past issue.

Email addressSubscribe

Skill bundle — 3 sub-skills

upstream is a skill bundle

This catalog entry is a skill bundle that ships 3 individual SKILL.md files. Each one is listed below — click through to read the full markdown on GitHub.

[csharp-scripts \\
Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file C# apps, small multi-file C# apps composed with \#:include\/\#:exclude\, or C# file-based apps linked with \#:ref\. Do not use for language-agnostic throwaway scripts, generic computations, Python/PowerShell-style automation, full projects, or existing app integration.\\
plugins/dotnet/skills/csharp-scripts](https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/csharp-scripts/SKILL.md) [dotnet-pinvoke \\
\> Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P/Invoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed/native boundary. DO NOT USE FOR: COM interop, C++/CLI mixed-mode assemblies, or pure managed code with no native dependencies.\\
plugins/dotnet/skills/dotnet-pinvoke](https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/dotnet-pinvoke/SKILL.md) [nuget-trusted-publishing \\
\> Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet/login, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask\_user for guided repo setup.\\
plugins/dotnet/skills/nuget-trusted-publishing](https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/nuget-trusted-publishing/SKILL.md)

Get new skills in your inbox. What we added, what we rejected, and why. See a past issue.

Email addressSubscribe

Related Skills

[Supabase Postgres Best Practices\\
\\
by Supabase\\
\\
A-rank\\
\\
PostgreSQL optimization across 8 categories including indexing, RLS policies, and migrations.\\
\\
Backend & APIsOpen Source\\
\\
ClaudeCodexCursorMulti\\
\\
2.8K\\
\\
Open](https://agenticskills.io/skills/supabase-postgres)

[Better Auth Best Practices\\
\\
by Better Auth\\
\\
A-rank\\
\\
Best practices for implementing Better Auth authentication flows — OAuth, sessions, plugins.\\
\\
Backend & APIsOpen Source\\
\\
ClaudeCodexCursorMulti\\
\\
222\\
\\
Open](https://agenticskills.io/skills/better-auth)

[Using Neon\\
\\
by Neon\\
\\
A-rank\\
\\
Best practices for Neon Serverless Postgres including branching and connection pooling.\\
\\
Backend & APIsOpen Source\\
\\
ClaudeCodexCursorMulti\\
\\
100\\
\\
Open](https://agenticskills.io/skills/using-neon)

Quick Stats

Source repo · this path

Stars5,607

Forks439

Last commit2026-10-08

Contributors23

LicenseMIT

Category Backend & APIs

Source [dotnet/skills](https://github.com/dotnet/skills/tree/main/plugins/dotnet "https://github.com/dotnet/skills/tree/main/plugins/dotnet")

Author

[.F\\
\\
.NET Foundation\\
\\
@dotnet](https://github.com/dotnet)

Tags

dotnetcsharpp-invokescripting

Report this skill

Keep exploring

.NET Core Skills is one of 193 skills in the directory.

دانلود ZIP