A transparent coating that repels a wide variety of liquids, prevents staining, is capable of self-repair and is robust towards mechanical damage can have a broad technological impact, from solar cell coatings to self-cleaning optical devices. Here we employ colloidal templating to design transparent, nanoporous surface structures. A lubricant can be firmly locked into the structures and, owing to its fluidic nature, forms a defect-free, self-healing interface that eliminates the pinning of a second liquid applied to its surface, leading to efficient liquid repellency, prevention of adsorption of liquid-borne contaminants, and reduction of ice adhesion strength. We further show how this method can be applied to locally pattern the repellent character of the substrate, thus opening opportunities to spatially confine any simple or complex fluids. The coating is highly defect-tolerant due to its interconnected, honeycomb wall structure, and repellency prevails after the application of strong shear forces and mechanical damage. The regularity of the coating allows us to understand and predict the stability or failure of repellency as a function of lubricant layer thickness and defect distribution based on a simple geometric model.