This means that the devil may convince you that you are such a good person. He will cite your admirable qualities and will show you your acts of charity. He will teach you to put your trust in those so that you take pride in how good you are. But the devil is a liar. Do not believe him.
On the other hand, he is also willing to flaunt your sins in your face. He will remind you of regrettable and shameful things you have thought, spoken, and done. He will use these to prove to you how wicked you are and convince you that not even God could forgive these. He makes your sins heavy so that they would crush you in despair. But the devil is a liar. Do not believe him.
Martin Luther addressed both ends of that spectrum and points you to the only place where you will find assurance and comfort from either extreme. He points you to the mercies of God, revealed, obtained, and delivered by faith in Jesus Christ. Those mercies were demonstrated to the Old Testament people. Some were examples of piety and goodness; others were exposed as blatant sinners who were guilty of murder, intrigue, slave trading, incest, and so on. But none of them was saved by their goodness or rejected by God because they were sinners. God's mercy saved them and sustained them.
Luther urges us to take these examples to heart so that we are not deluded by Satan to take pride in how good we have been or lose heart because of the sins we have done. All are saved by faith in Jesus. All are consoled by the mercies of God. God does not lie when he reveals these things to us. Contrary to Satan, God desires your salvation and wants to grant you peace. Here is something from Luther on how this relates to the patriarchs and to us.
"Moreover, examples of this kind are recounted to us for the purpose of teaching and consolation, and for the strengthening of our faith, in order that we may consider the immeasurable mercy of God, who has saved not only the righteous--namely, Abraham, Isaac, and Jacob--but also the unrighteous--namely, Judah, Tamar, Reuben, Simeon, and Levi, who were outstanding sinners. Consequently, no one should be presumptuous about his own righteousness or wisdom, and no one should despair on account of his sins." (Martin Luther, Lectures on Genesis (chapters 38-44), Luther's Works: American Edition, pp 10-11)