In computer programming and software development, a shim is a small library, piece of code, or transparent wrapper designed to intercept API calls, transparently alter the parameters passed, handle compatibility issues, or map legacy functions to new software interfaces without changing the underlying code itself. Shims are frequently used during software upgrades, cross-platform compatibility layers, and testing mock frameworks to ensure older modules can communicate seamlessly with modern systems.