This research aimed to develop teaching materials to improve students' computational thinking skills in solving smart coffee agroforestry problems through machine learning, using the RBL-STEM makerspace. Computational thinking skill goes beyond coding and programming and is related to the students' higher-order thinking skills. This research uses the ADDIE development model in developing the learning materials. The learning material products consist of assessment instruments, students' worksheets, and lesson plans. The research employed questionnaires, validation sheets (including content, construct, programming, and language), and observation sheets to collect data regarding the instruments' effectiveness, practicality, and validity. We evaluated the effectiveness of the teaching materials in a single classroom using a paired-test, examining the significant difference between the pre-test and post-test scores. The research subjects are 42 students of the Science Education Department at the University of Jember for the academic year 2023-2024. The average overall score, including content, construct, programming, and language, is 92.97%. The results show that the learning materials satisfy in all aspects. We did in-depth interviews with some selected students at low, medium, and high levels of computational thinking skills and compared the interview results using NVIVO software to making project maps. Furthermore, the score of paired t-test shows α-value = 0.003< 0.05. We concluded that RBL-STEM makerspace learning materials significantly contribute to the development of students’ computational thinking skills. It implies that the learning materials developed in this research are ready to be used in the learning activities to foster students' computational thinking skills.