In this work, we employ well-established relations for compressible turbulent mean flows, including the velocity transformation and algebraic temperature–velocity (TV) relation, to systematically improve the algebraic Baldwin–Lomax (BL) wall model for high-speed zero-pressure-gradient air boundary layers. Any new functions or coefficients fitted by ourselves are avoided. Twelve published direct numerical simulation (DNS) datasets are employed for a priori inspiration and a posteriori examination, with Mach numbers up to 14 under adiabatic, cold and heated walls. The baseline BL model is the widely used one with semilocal scalings. Three targeted modifications are made. First, we employ a total-stress-based transformation (Griffin et al., Proc. Natl Acad. Sci. USA, vol. 118, issue 34, 2021, e2111144118) to the inner-layer eddy viscosity for improved scaling up to the logarithmic region. Second, we utilize the van Driest transformation in the outer layer based on the compressible defect velocity scaling. Third, considering the difficulty in modelling the rapidly varying and singular turbulent Prandtl number near the temperature peak in cold-wall cases, we design a two-layer strategy and use the TV relation to formulate the inner-layer temperature. Numerical results prove that the modifications take effect as designed. The prediction accuracy for mean streamwise velocity is notably improved for diabatic cases, especially in the logarithmic region. Moreover, a significant improvement in mean temperature is realized for both adiabatic and diabatic cases. The mean relative errors of temperature to DNS for all cases are down to 0.4 % in the logarithmic wall-normal coordinate and 3.4 % in the outer coordinate, around one-third of those in the baseline model.