Before cutting a bolt to length, thread on the nut, then cut off the surplus and file off any sharp edges. Unthreading the nut will remove any roughness and ensure that the nut will go back on again. If pointed or over-long self tappers have to be used, tap the screw into the hole but don't tighten it. Withdraw the screw, cut it to length and remove sharp edges. Now drive it into the tapped hole and tighten.
Short screws are less likely to chafe internal halyards.
Don't forget to check that drill size and fasteners match the cleat. See the packaging for recommended sizes. Cleats for halyards or spinnaker pole uphauls can often be fixed right over the exit hole in the mast, which is neat and tidy . When working on spars, use a Pop rivet gun that will rebound from the job when the mandrel breaks. On metal spars, always put zinc chromate paste or silicone bath sealant on all stainless steel fastenings.