Devarim / Deuteronomy 12:28
שְׁמֹר וְשָׁמַעְתָּ אֵת כָּל־הַדְּבָרִים הָאֵלֶּה אֲשֶׁר אָנֹכִי מְצַוֶּךָּ לְמַעַן יִיטַב לְךָ וּלְבָנֶיךָ אַחֲרֶיךָ עַד־עוֹלָם כִּי תַעֲשֶׂה הַטּוֹב וְהַיָּשָׁר בְּעֵינֵי יְהוָה אֱלֹהֶיךָ׃
Keep and listen to all these words that I command you, so that it may go well with you and with your children after you for ever, when you do what is good and right in the eyes of the Eternal your Almighty.
Pshat פְּשָׁט
Good and right
Rashi: "keep" is the learning you must keep inside yourself so as not to forget. Let a light commandment be as dear to you as a weighty one. "Good" is in the eyes of Heaven, "right" in the eyes of people. Haamek Davar: one who tangles a matter and tires the sages to untangle it is not good before the Eternal nor right before people. One who takes care in advance does what is good and right, and for this it will go well with him and his children.
How Rashi and Haamek Davar explain it
Remez רֶמֶז
To keep is to wait
Kitzur Ba'al HaTurim: "keep and listen": an ignorant man does not fear sin. And next to "the good and the right" comes the verse about war: only the righteous go out to war. Degel Machaneh Ephraim: the voice from Chorev is the thoughts of return that come to a person every day. "Keep" means "wait": whoever stands and waits for the word of the Eternal will surely hear.
How Kitzur Ba'al HaTurim and Degel Machaneh Ephraim explain it
Drash דְּרָשׁ
A little and a lot
Sifrei: heard a little, in the end you will hear a lot. Kept what you heard, in the end you will keep what you did not hear. One who merits learning Torah gives merit to his generations too. Let a light commandment be as dear as a weighty one. "Good" is in the eyes of Heaven, "right" in the eyes of people, in the words of Rabbi Akiva. Rabbi Yishmael says the reverse, and both lean on the verse: "And you will find favour in the eyes of the Almighty and people".
How Sifrei explain it
Sod סוֹד
Waiting for the commandment
Avodat Yisrael: one who serves the Creator as a servant does only what is commanded and does not want to be commanded more. One who serves out of love longs: when will a commandment come to me, and I will fulfil it? "Keep" means "wait", as the father of Yosef (Joseph) kept his dream. The servant cleaves to the Creator through the worlds and sees Him in His works, but the lover cleaves to Him Himself, with no partition. And one who serves out of love shines his righteousness on others too: "you and your children after you".
How Avodat Yisrael explain it