ilspy-decompile — Claude Code skill: what it does, how to install
Decompiles .NET assemblies using ilspycmd. It helps inspect NuGet package internals, runtime libraries, and compiled binaries directly in the agent session.
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a claude-codeWhat ilspy-decompile does
The skill runs the ilspycmd command-line utility to inspect compiled .dll files. The agent locates assemblies inside ~/.nuget/packages or project build folders, then reconstructs C# code or displays intermediate language instructions with the -il flag.
Running decompilation requires the .NET SDK and ilspycmd installed globally or available via dnx. You can extract the full assembly into a project folder using -p -o or inspect a specific class with the -t parameter.
Reference assemblies from the SDK contain only API signatures without code implementations. ReadyToRun images and trimmed AOT binaries reduce readability or omit methods, so analyzing regular untrimmed builds is necessary.
What it helps with
- inspect NuGet package implementations directly from assembly files
- decompile compiled .NET libraries into C# project structures
- extract a single class implementation using the
-tflag - examine intermediate language bytecode with
-il
Example prompts for the agent
- Decompile the class Namespace.ClassName from MyLibrary.dll using ilspycmd.
- Inspect the NuGet package under ~/.nuget/packages and export the project into ./decompiled.
How to install ilspy-decompile
1Skills CLI (Vercel)
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a claude-code2Manually: put the files in place
~/.claude/skills/ilspy-decompile/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ilspy-decompile/
1Skills CLI (Vercel)
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a codex2Manually: put the files in place
.agents/skills/ilspy-decompile/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a cursor2Manually: put the files in place
.cursor/skills/ilspy-decompile/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Aaronontheweb/dotnet-skills ilspy-decompile2Manually: put the files in place
.github/skills/ilspy-decompile/SKILL.md1Skills CLI (Vercel)
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a gemini-cli2Platform CLI
gemini skills install https://github.com/Aaronontheweb/dotnet-skills --path skills/ilspy-decompileManually: put the files in place
.devin/skills/ilspy-decompile/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ilspy-decompile
How do I install ilspy-decompile in Claude Code?
Run npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a claude-code. The skill file is placed in ~/.claude/skills/ilspy-decompile/SKILL.md.
What does the ilspy-decompile skill do?
It allows the agent to decompile compiled .NET assemblies into C# source files or IL bytecode using ilspycmd. This helps inspect third-party NuGet packages and runtime binaries.
What are the prerequisites for running ilspy-decompile?
You need the .NET SDK and the ilspycmd CLI tool. Install it with dotnet tool install --global ilspycmd or run it via dnx ilspycmd.
Source text
SKILL.md · MIT
--- name: ilspy-decompile description: Understand implementation details of .NET code by decompiling assemblies. Use when you want to see how a .NET API works internally, inspect NuGet package source, view framework implementation, or understand compiled .NET binaries. allowed-tools: Bash(dnx:*) --- # .NET Assembly Decompilation with ILSpy Use this skill to understand how .NET code works internally by decompiling compiled assemblies. ## Prerequisites - .NET SDK installed - ILSpy command-line tool available via one of the following: - `dnx ilspycmd` (if available in your SDK or runtime) - `dotnet tool install --global ilspycmd` Both forms are shown below. Use the one that works in your environment. > Note: ILSpyCmd options may vary slightly by version. > Always verify supported flags with `ilspycmd -h`. ## Quick start ```bash # Decompile an assembly to stdout ilspycmd MyLibrary.dll # or dnx ilspycmd MyLibrary.dll # Decompile to an output folder ilspycmd -o output-folder MyLibrary.dll ``` ## Common .NET Assembly Locations ### NuGet packages ```bash ~/.nuget/packages/<package-name>/<version>/lib/<tfm>/ ``` ### .NET runtime libraries ```bash dotnet --list-runtimes ``` ### .NET SDK reference assemblies ```bash dotnet --list-sdks ``` > Reference assemblies do not contain implementations. ### Project build output ```bash ./bin/Debug/net8.0/<AssemblyName>.dll ./bin/Release/net8.0/publish/<AssemblyName>.dll ``` ## Core workflow 1. Identify what you want to understand 2. Locate the assembly 3. List types 4. Decompile the target ## Commands ### Basic decompilation ```bash ilspycmd MyLibrary.dll ilspycmd -o ./decompiled MyLibrary.dll ilspycmd -p -o ./project MyLibrary.dll ``` ### Targeted decompilation ```bash ilspycmd -t Namespace.ClassName MyLibrary.dll ilspycmd -lv CSharp12_0 MyLibrary.dll ``` ### View IL code ```bash ilspycmd -il MyLibrary.dll ``` ## Notes on modern .NET builds - ReadyToRun images may reduce readability - Trimmed or AOT builds may omit code - Prefer non-trimmed builds ## Legal note Decompiling assemblies may be subject to license restrictions.
© Aaronontheweb · MIT · Aaronontheweb/dotnet-skills