The Sūtra of the Great Vow of Kṣitigarbha Bodhisattva (Kṣitigarbha Sūtra) is a story about the Buddha teaching to his mother in the Palace of Trāyastriṃśa Heaven about the merits of Kṣitigarbha. It was translated into Chinese, assumedly from Sanskrit, by the monk Śiksānanda from Khotan circa 700....
At that time Kṣitigarbha Bodhisattva addressed the Buddha, “I see that when a thought arises in the sentient beings in Jambudvīpa only sin results. The loose wholesome benefit obtained and mostly regress to where they started from. If they encounter evil conditions these thoughts increase. It is like a person walking on muddy road carrying heavy rocks. As the person become more distressed the load becomes more difficult to carry and he sinks in deeper with every step. The person may meet an acquaintance that can help him to lessen the burden or carry the entire load. The acquaintance can help because of his great strength and will advise the person to stay on firm ground. If he can find flat ground then he will be able to avoid the treacherous path and not experience the problem further.
“World Honored One, the bad habits of sentient beings vary from very small to immeasurably large. All sentient beings have these habits. At the ends of their lives their parents and family dependents should help them with resources to establish virtue for the road ahead. This can be done either by hanging banners and a canopy and an oil lamp, or reciting sūtras, or making offerings to the image of Buddha and other holy images. Even reciting Buddhas', bodhisattvas', and Pratyekabuddhas' names so that the names are heard by the dying person or by their inner consciousness. If the bad karmic conditions created a person are such that the result is that the person should fall into an evil destiny but their family dependents perform these spiritual practices at the time when the person is near death then their sins will be absolved. If it is possible, for seven days after the body has died perform virtuous practices it will lead many beings to avoid evil rebirths and be reborn in the human or heavenly realms and experience wonderful joy. The family dependents will also benefit immeasurably.
“For this reason, today I face the World Honored Buddha, the eight kinds of demigods, humans, and non-humans to urge the beings of Jambudvīpa that, when they are approaching their deaths be careful to not harm or kill other living beings, to not create evil karmic conditions, to not worship or pray to spirits or demons. Why is this? Because all killing and making sacrifices do not even have a small benefit for the dead but the karmic results of their sins will be increased in severity. If, in future lives or in the present life, a person can obtain sagehood or gain rebirth in the human or a heavenly realm, then the person's karmic conditions when approaching the end of his life make be created by unwholesome actions committed by his family dependents. This may hinder the dying person in his next rebirth to a wholesome location. How much worse would it be for people near death who had not planted such virtuous roots? Each will have to experience the results of their karmic conditions suffering an evil rebirth. How could they endure their family dependents increasing the karmic results? For example, if someone has come from a great distance and to have not eaten for three days, carrying a load of more than a hundred jin [50 kg]. Then they just happen to meet with a neighbor who gives him a little more to carry and because of this his load becomes even more difficult to carry. World Honored One, I see that the sentient beings in Jambudvīpa are able to do some small benevolent deeds in accordance with the teachings of the Buddha. Even though only as small as a grain of sand or dust all of those deeds will still benefit themselves.”
When this was said an elder in the assembly named Mahapratbhana. He had long realized non-production who was appearing in the body of an elder to teach and transform beings from the ten directions. He joined palms with respect and asked Kṣitigarbha Bodhisattva, “Buddha, after sentient beings in Jambudvīpa die young and old family dependents should cultivate virtue, including abstaining from eating meat and performing charitable deeds. Will the person who has died recieve sufficient benefit to liberate them?”
Kṣitigarbha Bodhisattva replied, “Elder, today, for the benefit of all sentient beings in present and future generations, I will talk briefly about the use of the power of the Buddha. Elder, when sentient beings in present and future generations are approaching their deaths and hear a Buddha's, a bodhisattva's, or a Pratyekabuddha's name, regardless whether that person is a sinner or not, they will be liberated.
“If a man or a woman does not plant wholesome roots during their life but rather commits many sins then after their death their young and old family perform holy acts for their benefit then one seventh of the merit will be obtained by the dying person and six sevenths of the merit will be retained by the family members. For this reason virtuous men and women in this and future generations should cultivate virtuosity when they are healthy because they will receive all the merit.
“Impermanence is a great demon that can arrive at any time. A dead person's spirit roams in the dark, not knowing sin or virtue for forty-nine days, as if foolish and deaf. Either in private or together the karmic results are debated. After the decision has been made the person will be reborn according to the karmic results. In the time in between rebirth the person will suffer countless worries. How much worse will it be for those that will fall into an evil rebirth? Within these forty-nine days those that have died and are yet to be reborn hope that their family and relatives will cultivate virtue to save them. After that time they will follow the results of their karma. If a sinner he may experience a hundred thousand years without a day of freedom. If a person's karmic result is the five-fold relentless retribution then they will fall into Avici Hell for thousands or tens of thousands of kalpas, endlessly suffering many miseries.
“Moreover, Elder, thus the family and relatives of sentient beings who sin should prepare vegetarian offerings after they die to assist them on their karmic path. While the vegetarian food is being prepared and before it is eaten do not throw the rice washing water and vegetable leaves on the ground. Even any food that is offered to the Sangha, nobody should eat it. If this is not followed with diligence, the dead person will receive any strength from the offering. If the purity of the offering is protected with diligence and dedicated to the Sangha then the dead person will receive one seventh of the merit. Therefore, Elder, if the sentient beings of Jambudvīpa are able to make vegetarian offerings for their mother and father and other family members with a sincere heart then the living and the dead will both benefit.”
When this was said a trillion nayuta spirits and devils in the Palace of Trāyastriṃśa Heaven made immeasurable resolve to attain enlightenment. The elder Mahapratbhana bowed and retired.