An improved nanopatterning procedure has been developed to obtain YBCO nanowires with cross sections as small as 50x50 nm^2, protected by an Au capping layer. To probe the effective role of the Au protecting layer, we have measured the current-voltage characteristics and the resistive transition in temperature of the nanowires. Critical current densities up to 10^8 A/cm^2 have been achieved at T=4.2 K, approaching the theoretical depairing current limit. The resistance, measured as a function of temperature close to Tc, has been fitted with a thermal activated phase slip model, including the effect of the gold layer. The extracted values of the superconducting coherence length and of the London penetration depth give current densities consistent with the measured ones. These results cannot be achieved with same nanowires, without the Au capping layer.