il-copy-inspection

Community

Audit IL struct copies to verify compiler outputs

AuthorJeremyKuhne
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Find how the compiler emits copies of value-type structs in IL, including defensive copies and boxing, to ground-truth compiler behavior beyond source code.

Core Features & Use Cases

  • IL-level copy detection: Identify IL opcodes that copy struct values (ldobj, stobj, cpobj, box, unbox.any, ldfld for value types) and map them to source lines.
  • Post-build verification: Provide ground-truth for source-level defensive-copy rules by correlating IL copies with the original C# code.
  • Use Case: Audit a readonly invocation on a struct to determine if the compiler emitted a defensive copy and where it occurs in the IL.

Quick Start

Inspect the IL of a method to locate where a struct is copied during a call

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: il-copy-inspection
Download link: https://github.com/JeremyKuhne/touki/archive/main.zip#il-copy-inspection

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.