Right immersion is preceded by right mindfulness, right effort, right livelihood, right action, right speech, right thought and right view. These prerequisites are critical and should be investigated and practiced first. For example, before meditating on compassion, shouldn't we ask, "what is the right view for compassion?". Without right view, how could we even get to right immersion?
Prerequisites are important. And seven right steps preceding right immersion is a lot to consider. Is there then one simple thing to consider as a prerequisite for immersion? Fortunately, the Buddha instructs that the spectrum of ethics is a single prerequisite for exploring immersion:
DN34:1.6.102: Five spectrums of the teaching:
DN34:1.6.103: ethics, immersion, wisdom, freedom, and knowledge and vision of freedom.
Indeed, in MN8, the Buddha gently scolds Cunda for diving in too readily to immersion without considering proper prerequisites. Immersion without ethics is just peaceful meditations:
MN8:11.4: But in the training of the Noble One these are not called ‘self-effacement’;
MN8:11.5: they’re called ‘peaceful meditations’.
Living ethically, we build a strong base for right immersion:
MN8:12.2: ‘Others will be cruel, but here we will not be cruel.’
MN8:12.3: ‘Others will kill living creatures, but here we will not kill living creatures.’
MN8:12.4: ‘Others will steal, but here we will not steal.’
MN8:12.5: ‘Others will be unchaste, but here we will not be unchaste.’
MN8:12.6: ‘Others will lie, but here we will not lie.’
MN8:12.7: ‘Others will speak divisively, but here we will not speak divisively.’
MN8:12.8: ‘Others will speak harshly, but here we will not speak harshly.’
MN8:12.9: ‘Others will talk nonsense, but here we will not talk nonsense.’
MN8:12.10: ‘Others will be covetous, but here we will not be covetous.’
(omitted for brevity...)
Living each moment with a heart open to love, compassion, rejoicing and equanimity requires skill. And guarding that heart with right mindfulness also requires skill. Living each moment ethically is the skillful practice that allows us to meditate well. That's why the spectrum of ethics precedes immersion. And only after a long discourse on ethics does the Buddha encourage Cunda to meditate:
MN8:17.3: Here are these roots of trees, and here are these empty huts. Practice absorption, Cunda! Don’t be negligent! Don’t regret it later! This is my instruction.”
Living with love allows us to meditate with love. Living with compassion allows us to meditate with compassion. Living with rejoicing allows us to meditate with rejoicing. Living with equanimity allows us to meditate with equanimity.
And in return, meditation gives us the insights to fully live without the limits of greed, hate and delusion.
MN43:35.2: Greed, hate, and delusion are makers of limits.
MN43:35.3: A mendicant who has ended the defilements has given these up, cut them off at the root, made them like a palm stump, and obliterated them, so they are unable to arise in the future.
MN43:35.4: The unshakable release of the heart is said to be the best kind of limitless release of the heart.
MN43:35.5: That unshakable release of the heart is empty of greed, hate, and delusion.