The shear behavior of clays is critically important for the stability and safety of nuclear waste repositories and clay gouges. These contexts expose clayey geomaterials to high pressures and temperatures. Under such varying thermodynamic conditions, the shear behavior of these materials becomes complex, necessitating thorough investigations. This study aims to elucidate the effect of temperature on the shear behavior of three clayey materials--kaolinite, illite, and montmorillonite--through molecular dynamics simulations. The research replicates a geotechnical shear setup at the molecular scale, varying the environmental temperature including sub-freezing temperatures below 300 K and elevated temperatures in the range of 300-500 K and hydrostatic pressure. The results reveal stick-slip behavior, enabling the calculation of nanoscale cohesion, friction angle, and shear modulus across different temperatures. Thermal effects are notably significant for illite and kaolinite, both exhibiting a marked decrease in shear properties with increasing temperature. Kaolinite demonstrates a high shear modulus of up to 40 GPa, indicating substantial shear strength compared to montmorillonite and illite. Illite displays the highest friction angle among the studied materials, approximately 5 degrees. For montmorillonite, the influence of temperature on shear behavior is comparatively less pronounced. This study provides critical insights into the nanoscale mechanical behavior of clay minerals under varying thermal conditions, contributing to the broader understanding of geomaterial stability in high-stake environments such as nuclear waste containment.