"...those who suffer according to God's will should commit themselves to their faithful Creator and continue to do good." - 1 Peter 4:19
"...we are his workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them." - Ephesians 2:10
"In our good works nothing is our own."
- John Calvin
But why cannot our good works be the whole or part of our righteousness before God?
Because the righteousness which can stand before the judgment-seat of God, must be perfect throughout and wholly conformable to the divine law; but even our best works in this life are all imperfect and defiled with sin.
Heidelberg Catechism Q. 62.
Salvation is by works. What???! It's true! Our salvation is by the works of Christ! Salvation is truly by the works of Christ on our behalf in his life, death, resurrection and ascension. Our Lord Jesus Christ fulfilled the Law on our behalf and merited eternal life by fulfilling the Law. Those who believe in him shall never perish, but have everlasting life!! Romans 10:4 says "For Christ is the end of the law so that there may be righteousness for everyone who believes." The Greek word 'telos' suggests the goal or purpose of the Law.
"In this sense we shall concede not only a partial righteousness in works, as our adversaries themselves hold, but also that it is approved by God as if it were whole and perfect. But if we recall the foundation that supports it, every difficulty will be solved. A work begins to be acceptable only when it is undertaken with pardon. Now whence does this pardon arise, save that God contemplates us and our all in Christ? Therefore, as we ourselves, when we have been engrafted in Christ, are righteous in God’s sight because our iniquities are covered by Christ’s sinlessness, so our works are righteous and are thus regarded because whatever fault is otherwise in them is buried in Christ’s purity, and is not charged to our account. Accordingly, we can deservedly say that by faith alone not only we ourselves but our works as well are justified."
John Calvin, Institutes, 3.17.10.