But [the meaning of walking after the Lord your God is] to walk after the attributes of the Holy One, blessed be He. As He clothes the naked, for it is written: "And the Lord God made for Adam and for his wife coats of skin, and clothed them," (Gen 3:21) so do thou also clothe the naked. The Holy One, blessed be He, visited the sick, for it is written: "And the Lord appeared unto him by the oaks of Mamre," (Gen 18:1 ... while Abraham was recovering from surgery) so do thou also visit the sick. The Holy One, blessed be He, comforted mourners, for it is written: "And it came to pass after the death of Abraham, that God blessed Isaac his son," (Gen 25:11) so do thou also comfort mourners. The Holy one, blessed be He, buried the dead, for it is written: "And He buried him in the valley," (Deut 34:6) so do thou also bury the dead. (Sotah 14a).
The ground rules seem to be to copy an action of God that was described in the Torah. Several of the things described in this collection were already described centuries earlier by Jesus in the teaching the Last Judgment:
For I was hungry, and you fed me; I was thirsty, and you gave me drink:, I was a stranger, and you took me in: Naked, and you clothed me: I was sick, and you visited me; I was in prison, and you came unto me. (Matthew 25:35-36)
The Talmud was kind enough to trace the source of some of these as imitations of God: visiting the sick and clothing the naked.
Possible sources for the others are:
- God fed the hungry: "Who fed you in the wilderness with manna" (Deut 8:16)
- God gave drink to the thirsty: "who brought forth water out of the rock" (Deut 8:15)
- God took in the stranger: "I have also established my covenant with them, to give them the land of Canaan, the land of their pilgrimage, wherein they were strangers." (Exodus 6:4)
- God visited the prisoner: "But the LORD was with Joseph, and showed him mercy, and gave him favor in the sight of the keeper of the prison" (Gen 39:21)