OnnxSlim is a Python library and CLI tool for optimizing ONNX models through graph rewriting. It applies elimination of redundant operations (e.g., no-op reshapes, slices, unsqueezes) and fusion of common patterns (Conv+BN, Conv+Add, GELU, etc.), combined with dead node elimination and shape inference. The architecture is modular: a core optimization pipeline orchestrates pattern matchers, a shape inference engine, and a vendored onnx_graphsurgeon for graph manipulation. The tool is used in production by NVIDIA TensorRT-Model-Optimizer, HuggingFace Optimum, and Ultralytics, confirming its practical value. The codebase demonstrates strong engineering with comprehensive tests, a clean CLI, and a well-organized package structure.