Step 1: Consider the habit you want to build, e.g. “I want to meditate 10 minutes every day”
Step 2: Make it the absolute smallest possible version of itself; so small that it requires zero motivation/willpower, e.g. “I want to close my eyes and take 3 deep breaths every day”
Step 3: Place this habit immediately following an existing habit, e.g. “After I brush my teeth in the morning, I will close my eyes and take 3 deep breaths”
Step 4: Do this activity, and after each time you do it, reward yourself with a small celebration. It sounds ridiculous but I literally just say “Victory!” and force a smile on my face. The small rush of good-feeling-chemicals will keep you coming back.
-ethanbond (on hackernews) summarizing BJ Fogg