Conversion of carbon dioxide (CO2) to carbon monoxide (CO) and other value-added carbon products is an important challenge for clean energy research. Here we report modular optimization of covalent organic frameworks (COFs), in which the building units are cobalt porphyrin catalysts linked by organi...