managedcode/dotnet-skills/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 man
Agent skill · version 0.0.0-main.1794330588.g268856b · from managedcode/dotnet-skills
Install
npx yarkr-cli add skill:managedcode/dotnet-skills/dotnet-pinvokeWithout Node.js, on macOS and Linux (curl or wget):
curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:managedcode/dotnet-skills/dotnet-pinvoke
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:managedcode/dotnet-skills/dotnet-pinvokeOn Windows, in PowerShell:
irm https://yarkr.com/install.ps1 | iex; yarkr add skill:managedcode/dotnet-skills/dotnet-pinvokeWorks with Claude Code, Codex, opencode, Cursor, any harness over MCP.