Cyclin-dependent kinase 8 (CDK8) plays a crucial role in the transforming growth factor beta (TGF-β) signaling pathway, which is critical to the pathology of idiopathic pulmonary fibrosis (IPF). CDK8 promotes the epithelial-mesenchymal transition (EMT) and excessive extracellular matrix (ECM) deposition, making it a promising target for IPF treatment. This study focused on optimizing F059-1017, a previously identified CDK8 inhibitor, to enhance its potency. Through integrated structure-based modifications, a series of compounds was synthesized, and their inhibitory effects on CDK8 were tested. Results indicated that substituting with cyclopentanone significantly improved the inhibitory activity, and compound 4j demonstrated the best potency (IC