Modular polyketide synthases (PKSs) are multidomain, assembly line enzymes that biosynthesize complex antibiotics such as erythromycin and rapamycin. The modular characteristic of PKSs has made them an ideal platform for custom production of designer polyketides by combinatorial biosynthesis. However, engineered hybrid PKS pathways often exhibit significant loss of enzyme activity, and a general principle for PKS reprogramming has not been established. Here we present a strategy for designing hybrid PKSs that is applicable to diverse PKSs. We reveal that two conserved motifs, located at the post-acyltransferase linker and near the acyl carrier protein, are robust cut sites for constructing functional hybrid PKS pathways. Through mixing various PKS pathways at these cut sites, we demonstrate custom production of polyketides with different starter units, extender units, and variable reducing states. Furthermore, we expand the applicability of these cut sites to construct hybrid pathways involving cis-AT PKS, trans-AT PKS, and even nonribosomal peptide synthetase, illustrating the generality of our strategy for the engineering of assembly line enzymes. Collectively, our findings enable plug-and-play reprogramming of modular PKSs and facilitate the synthetic biology application of assembly line enzymes towards bioproduction of designer molecules.