Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile -a claude-code
Open on GitHub

What 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 -t flag
  • 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-code

2Manually: put the files in place

~/.claude/skills/ilspy-decompile/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ilspy-decompile/

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

Similar skills

All skills for Programming languages →

From the same set32

database-performance Enforces database access performance patterns for .NET, separating read and write models, banning in-memory joins, and preventing N+1 queries. CX Codex +1 664installs api-design A skill for designing public APIs that only extend, so new releases don't break the code that already depends on them. CX Codex +1 660installs dotnet-project-structure A skill that tells your agent how to lay out a .NET solution: .slnx, Directory.Build.props, central package versions and SourceLink. CX Codex +1 658installs type-design-performance A skill that steers .NET type design toward performance: sealed classes, readonly structs, deferred enumeration, the right collection for the job. CX Codex +1 655installs microsoft-extensions-configuration A skill for Claude and other AI editors that guides binding appsettings.json to strongly-typed classes and validating configuration at startup. CX Codex +1 577installs serialization Tells the agent which serialization format to use in .NET: schema-based over reflection, System.Text.Json with source generators for JSON. Useful when designing APIs, messaging or event storage. CX Codex +1 569installs crap-analysis A skill that computes CRAP scores from coverage and cyclomatic complexity to flag .NET code that is risky to touch. CX Codex +1 556installs dotnet-slopwatch Detects LLM reward hacking in .NET code, catching disabled tests, silenced compiler warnings, and empty catch blocks. It validates changes right after an agent makes them. CX Codex +1 552installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor