.NET P/Invoke skill: what it does and how to install it
Creates and reviews .NET P/Invoke and LibraryImport declarations for native libraries, including types, strings, memory ownership and handles.
Summary generated from the skill's documentation.
Install
$ npx skills add dotnet/skills --skill dotnet-pinvokeRun it in a terminal. If your agent is already running, start a new session so it picks the skill up.
About this skill
What it does. Maps C and C++ headers to DllImport or LibraryImport declarations, covering type sizes, string encoding, calling conventions, memory ownership, SafeHandle, callbacks and cross-platform library loading. It also provides migration guidance, interop analyser checks and runtime validation steps.
When to use it. For wrapping native libraries, reviewing interop signatures, migrating to source-generated imports, or diagnosing crashes, leaks and corruption at the managed/native boundary. It does not apply to COM interop, C++/CLI assemblies or purely managed code.
History
Repo stars
5.5kAbout +384 since 9 Jul 2026
Before 1 Oct 2026 the curve is estimated from public event data.
Stars are counted for the whole repository, which holds 18 skills.
Show as a table
| Date | Repo stars |
|---|---|
| 1 Oct 2026 | 5,531 |
| 24 Sept 2026 (estimated) | 5,519 |
| 17 Sept 2026 (estimated) | 5,494 |
| 10 Sept 2026 (estimated) | 5,419 |
| 3 Sept 2026 (estimated) | 5,258 |
| 27 Aug 2026 (estimated) | 5,233 |
| 20 Aug 2026 (estimated) | 5,221 |
| 13 Aug 2026 (estimated) | 5,221 |
| 6 Aug 2026 (estimated) | 5,171 |
| 30 Jul 2026 (estimated) | 5,159 |
| 23 Jul 2026 (estimated) | 5,159 |
| 16 Jul 2026 (estimated) | 5,147 |
| 9 Jul 2026 (estimated) | 5,147 |
Installs
2.5k
Tracking since . A chart appears once there are 7 days of data.
Installs via skills.sh
Similar skills
- Skill CreatorCreates new skills, improves existing ones and measures how well they perform with evals and benchmarks.
- Receiving Code ReviewHandles code review feedback with technical rigour, verifying suggestions before implementing them.
- Code ReviewReviews the changes since a commit or branch on two axes: the repo's coding standards and the originating spec.