.NET Core Skills
A-rankCommon everyday C#/.NET coding skills useful to all .NET developers. Skill bundle covering C# scripting, P/Invoke patterns, and NuGet trusted publishing.
Install This Skill
/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.
# Use the CLI tab, or browse the source:
open https://github.com/dotnet/skills/tree/main/plugins/dotnetGet new skills in your inbox. What we added, what we rejected, and why. See a past issue.
Skill bundle — 3 sub-skills
upstream is a skill bundleThis 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-scriptsdotnet-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-pinvokenuget-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-publishingGet new skills in your inbox. What we added, what we rejected, and why. See a past issue.
Related Skills
Quick Stats
Source repo · this pathAuthor
.NET Foundation
@dotnet
Tags
Keep exploring
.NET Core Skills is one of 193 skills in the directory.