Your nail polish is certainly going to last longer if you apply it on clean nails. Nails with any sort of impurity on them hamper the smoothness of the surface and increase chances of chirping off. Wash your hands well with soap and warm water. Dry the nails with a soft cloth before you apply the polish. You should file your nails and remove any dead skin cuticle before you polish your nails.
Use a basecoat to make a firm base. Apply an even layer of base coat on the nail. Let the coat dry before you proceed. A hurry will only get you smudged polish.
When the base coat is dry, apply the nail polish with smooth strokes. You can use two coats to strengthen the colour and make it last longer. However, both the layers should be thin. You should also paint the tips of the nails as well to reduce chances of chipping off. Same goes for the edges. Unpolished edges increase chirpiness.
Once the nail polish colour is dry, apply a top coat. The top coat protects the nail and the design from chirping off. Use a clear polish topcoat so that the nail polish shows through.
Avoid doing any crafts using nails or fingers without putting your gloves on. Exposure to water, especially in dish washing and cloth washing can increase polish chirpiness because the polish wears off. Avoid using your nails as tools for opening cans and locks.