The extreme sensitivity of inorganic CsPbI3 perovskites to moisture imposes stringent humidity requirements during fabrication, severely limiting their practical applications. Herein, 3-iodopropyltrimethoxysilane (IPTMS) is introduced as a multifunctional additive into the perovskite precursor to address these limitations. During thermal annealing, IPTMS molecules undergo an in situ hydrolysis-driven cross-linking reaction, consuming residual water while constructing a hydrophobic polysiloxane network at grain boundaries, thus effectively shielding films against moisture infiltration. Concurrently, IPTMS can modulate crystallization kinetics via slowing down crystal growth to generate high-quality films. Furthermore, the iodine groups in IPTMS can favorably interact with the electron-rich sites in the CsPbI3 film, resulting in a notable reduction of trap states and enhanced stability of the perovskite octahedral framework. Consequently, the optimized inverted devices deliver a champion efficiency of 20.36% with much improved long-term device stability. Besides, the incorporation of IPTMS endows the fabrication of efficient devices even in a high humid atmosphere, yielding an impressive efficiency of 19.50%.