Superconducting nanowire single-photon detector (SNSPD) with near-unity system efficiency is a key enabling, but still elusive technology for numerous quantum fundamental theory verifications and quantum information applications. The key challenge is to have both a near-unity photon-response probability and absorption efficiency simultaneously for the meandered nanowire with a finite filling ratio, which is more crucial for NbN than other superconducting materials (e.g., WSi) with lower transition temperatures. Here, we overcome the above challenge and produce NbN SNSPDs with a record system efficiency by replacing a single-layer nanowire with twin-layer nanowires on a dielectric mirror. The detector at 0.8 K shows a maximal system detection efficiency (SDE) of 98% at 1590 nm and a system efficiency of over 95% in the wavelength range of 1530-1630 nm. Moreover, the detector at 2.1K demonstrates a maximal SDE of 95% at 1550 nm using a compacted two-stage cryocooler. This type of detector also shows the robustness against various parameters, such as the geometrical size of the nanowire, and the spectral bandwidth, enabling a high yield of 73% (36%) with an SDE of >80% (90%) at 2.1K for 45 detectors fabricated in the same run. These SNSPDs made of twin-layer nanowires are of important practical significance for batch production.