Due to the difficulties in precisely manipulating DNA repair pathways, high-fidelity targeted integration of large transgenes triggered by double-strand breaks is inherently inefficient. Here, we exploit prime editors to devise a robust knock-in (KI) strategy named primed micro-homologues-assisted integration (PAINT), which utilizes reverse-transcribed single-stranded micro-homologues to boost targeted KIs in different types of cells. The improved version of PAINT, designated PAINT 3.0, maximizes editing efficiency and minimizes off-target integration, especially in dealing with scarless in-frame KIs. Using PAINT 3.0, we target a reporter transgene into housekeeping genes with editing efficiencies up to 80%, more than 10-fold higher than the traditional homology-directed repair method. Moreover, the use of PAINT 3.0 to insert a 2.5-kb transgene achieves up to 85% KI frequency at several therapeutically relevant genomic loci, suggesting its potential for clinical applications. Finally, PAINT 3.0 enables high-efficiency non-viral genome targeting in primary T cells and produces functional CAR-T cells with specific tumor-killing ability. Thus, we establish that the PAINT method is a powerful gene editing tool for large transgene integrations and may open new avenues for cell and gene therapies and genome writing technologies.